diff options
Diffstat (limited to 'server')
13 files changed, 6 insertions, 99 deletions
diff --git a/server/src/main/java/com/vaadin/data/TreeData.java b/server/src/main/java/com/vaadin/data/TreeData.java index 60f9d6fb29..ff5bc622c2 100644 --- a/server/src/main/java/com/vaadin/data/TreeData.java +++ b/server/src/main/java/com/vaadin/data/TreeData.java @@ -43,24 +43,14 @@ import com.vaadin.data.provider.TreeDataProvider; public class TreeData<T> implements Serializable { private static class HierarchyWrapper<T> implements Serializable { - private T item; private T parent; private List<T> children; - public HierarchyWrapper(T item, T parent) { - this.item = item; + public HierarchyWrapper(T parent) { this.parent = parent; children = new ArrayList<>(); } - public T getItem() { - return item; - } - - public void setItem(T item) { - this.item = item; - } - public T getParent() { return parent; } @@ -73,10 +63,6 @@ public class TreeData<T> implements Serializable { return children; } - public void setChildren(List<T> children) { - this.children = children; - } - public void addChild(T child) { children.add(child); } @@ -94,7 +80,7 @@ public class TreeData<T> implements Serializable { */ public TreeData() { itemToWrapperMap = new LinkedHashMap<>(); - itemToWrapperMap.put(null, new HierarchyWrapper<>(null, null)); + itemToWrapperMap.put(null, new HierarchyWrapper<>(null)); } /** @@ -491,7 +477,7 @@ public class TreeData<T> implements Serializable { } private void putItem(T item, T parent) { - HierarchyWrapper<T> wrappedItem = new HierarchyWrapper<>(item, parent); + HierarchyWrapper<T> wrappedItem = new HierarchyWrapper<>(parent); if (itemToWrapperMap.containsKey(parent)) { itemToWrapperMap.get(parent).addChild(item); } diff --git a/server/src/main/java/com/vaadin/event/ConnectorActionManager.java b/server/src/main/java/com/vaadin/event/ConnectorActionManager.java index 7363a53b87..8f121015f5 100644 --- a/server/src/main/java/com/vaadin/event/ConnectorActionManager.java +++ b/server/src/main/java/com/vaadin/event/ConnectorActionManager.java @@ -77,8 +77,4 @@ public class ConnectorActionManager extends ActionManager { super.handleAction(action, sender, target); } - private static final Logger getLogger() { - return Logger.getLogger(ConnectorActionManager.class.getName()); - } - } diff --git a/server/src/main/java/com/vaadin/event/EventRouter.java b/server/src/main/java/com/vaadin/event/EventRouter.java index b07efb6c53..04c05d3af8 100644 --- a/server/src/main/java/com/vaadin/event/EventRouter.java +++ b/server/src/main/java/com/vaadin/event/EventRouter.java @@ -254,8 +254,4 @@ public class EventRouter implements MethodEventSource { return listeners; } - private Logger getLogger() { - return Logger.getLogger(EventRouter.class.getName()); - } - } diff --git a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java index fce41b1415..00cbb4f7b4 100644 --- a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java @@ -485,10 +485,6 @@ public abstract class AbstractClientConnector return null; } - private static Logger getLogger() { - return Logger.getLogger(AbstractClientConnector.class.getName()); - } - /** * @deprecated As of 7.0, use {@link #markAsDirtyRecursive()} instead */ diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletService.java b/server/src/main/java/com/vaadin/server/VaadinPortletService.java index 077f91afed..41183ad9dd 100644 --- a/server/src/main/java/com/vaadin/server/VaadinPortletService.java +++ b/server/src/main/java/com/vaadin/server/VaadinPortletService.java @@ -72,11 +72,6 @@ public class VaadinPortletService extends VaadinService { return portlet; } - private String getPortalProperty(VaadinRequest request, - String propertyName) { - return ((VaadinPortletRequest) request).getPortalProperty(propertyName); - } - private String getParameter(VaadinRequest request, String name, String defaultValue) { VaadinPortletRequest portletRequest = (VaadinPortletRequest) request; diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponent.java b/server/src/main/java/com/vaadin/ui/AbstractComponent.java index bea9ef9e56..92aaa0cb36 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractComponent.java +++ b/server/src/main/java/com/vaadin/ui/AbstractComponent.java @@ -1455,7 +1455,4 @@ public abstract class AbstractComponent extends AbstractClientConnector + AbstractFieldState.class.getSimpleName()); } - private static final Logger getLogger() { - return Logger.getLogger(AbstractComponent.class.getName()); - } } diff --git a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java index 194a354ad0..7b8183d3bb 100644 --- a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java @@ -461,10 +461,6 @@ public class DragAndDropWrapper extends CustomComponent return file.getFileSize(); } - public StreamVariable getReceiver() { - return ProxyReceiver.this; - } - @Override public Exception getException() { if (wrappedEvent instanceof StreamingErrorEvent) { diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index ceeec79ac1..0105fd9b4e 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -3623,13 +3623,6 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, .forEach(this::removeColumn); } - private String getIdentifier(Column<T, ?> column) { - return columnKeys.entrySet().stream() - .filter(entry -> entry.getValue().equals(column)) - .map(entry -> entry.getKey()).findFirst() - .orElse(getGeneratedIdentifier()); - } - private String getGeneratedIdentifier() { String columnId = "" + counter; counter++; diff --git a/server/src/main/java/com/vaadin/ui/dnd/FileDropTarget.java b/server/src/main/java/com/vaadin/ui/dnd/FileDropTarget.java index bfb66c4fc4..59197cbc26 100644 --- a/server/src/main/java/com/vaadin/ui/dnd/FileDropTarget.java +++ b/server/src/main/java/com/vaadin/ui/dnd/FileDropTarget.java @@ -265,10 +265,6 @@ public class FileDropTarget<T extends AbstractComponent> return file.getFileSize(); } - public StreamVariable getReceiver() { - return FileReceiver.this; - } - @Override public Exception getException() { if (wrappedEvent instanceof StreamingErrorEvent) { diff --git a/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java index 274441824b..3017bc3e37 100644 --- a/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java +++ b/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java @@ -81,31 +81,6 @@ public class TestAbstractApplicationServletStaticFilesLocation { return location; } - private String testIncludedLocation(String base, String portletContextPath, - String servletPath, String pathInfo) throws Exception { - - HttpServletRequest request = createIncludeRequest(base, - portletContextPath, servletPath, pathInfo); - // Set request into replay mode - replay(request); - - String location = servlet.getService() - .getStaticFileLocation(servlet.createVaadinRequest(request)); - return location; - } - - private HttpServletRequest createIncludeRequest(String base, - String realContextPath, String realServletPath, String pathInfo) - throws Exception { - HttpServletRequest request = createRequest(base, "", "", pathInfo); - expect(request.getAttribute("javax.servlet.include.context_path")) - .andReturn(realContextPath).anyTimes(); - expect(request.getAttribute("javax.servlet.include.servlet_path")) - .andReturn(realServletPath).anyTimes(); - - return request; - } - private HttpServletRequest createNonIncludeRequest(String base, String realContextPath, String realServletPath, String pathInfo) throws Exception { diff --git a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java index ebde4b191a..3f07d1c178 100644 --- a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java +++ b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java @@ -32,7 +32,7 @@ public class GraphVizClassHierarchyCreator { } Set<Class> interfaces = new HashSet<>(); - for (Object cls : classesAndParents.toArray()) { + for (Object cls : classesAndParents) { for (Class<?> c : ((Class) cls).getInterfaces()) { addClassAndParentInterfaces(classesAndParents, c, packageToInclude); @@ -134,18 +134,4 @@ public class GraphVizClassHierarchyCreator { } - private static void addInterfaces(Set<Class> interfaces, Class<?> cls) { - if (interfaces.contains(cls)) { - return; - } - - if (cls.isInterface()) { - interfaces.add(cls); - } - - for (Class c : cls.getInterfaces()) { - addInterfaces(interfaces, c); - } - } - } diff --git a/server/src/test/java/com/vaadin/ui/ComponentTest.java b/server/src/test/java/com/vaadin/ui/ComponentTest.java index 1ea4867b93..58a8829d5e 100644 --- a/server/src/test/java/com/vaadin/ui/ComponentTest.java +++ b/server/src/test/java/com/vaadin/ui/ComponentTest.java @@ -22,6 +22,7 @@ import java.util.HashSet; import org.junit.Assert; import com.vaadin.server.ClientConnector; +import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.ServerRpcManager; import com.vaadin.shared.communication.ServerRpc; @@ -65,8 +66,7 @@ public class ComponentTest { * the component to update */ public static void updateDiffState(AbstractComponent component) { - component.getUI().getSession().getCommunicationManager() - .encodeState(component, component.getState()); + LegacyCommunicationManager.encodeState(component, component.getState()); } diff --git a/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java b/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java index fadbf28507..545871f9ce 100644 --- a/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java +++ b/server/src/test/java/com/vaadin/ui/RadioButtonGroupTest.java @@ -81,9 +81,4 @@ public class RadioButtonGroupTest { .key(dataObject); } - private static void assertSelectionOrder(Multi<String> selectionModel, - String... selectionOrder) { - Assert.assertEquals(Arrays.asList(selectionOrder), - new ArrayList<>(selectionModel.getSelectedItems())); - } } |