diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-12 08:00:02 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-10-12 09:00:02 +0300 |
commit | 13d406a7086cc1546eac3fa86f6263bfb436de85 (patch) | |
tree | c571de7cc72bdcad1d8473266dbcdd76a2b0487b /server | |
parent | d0b5741b81d214491c93d4d042c79e10bb4f192e (diff) | |
download | vaadin-framework-13d406a7086cc1546eac3fa86f6263bfb436de85.tar.gz vaadin-framework-13d406a7086cc1546eac3fa86f6263bfb436de85.zip |
Remove redundant null checks before an instanceof (#10173)
Diffstat (limited to 'server')
3 files changed, 3 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/server/DragAndDropService.java b/server/src/main/java/com/vaadin/server/DragAndDropService.java index 64926c531c..7b56153467 100644 --- a/server/src/main/java/com/vaadin/server/DragAndDropService.java +++ b/server/src/main/java/com/vaadin/server/DragAndDropService.java @@ -215,7 +215,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector { variables = (Map<String, Object>) variables.get("tra"); Transferable transferable = null; - if (sourceComponent != null && sourceComponent instanceof DragSource) { + if (sourceComponent instanceof DragSource) { transferable = ((DragSource) sourceComponent) .getTransferable(variables); } diff --git a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java index ce3b399973..9e15d5c0fe 100644 --- a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java @@ -141,7 +141,7 @@ public class PushRequestHandler .getAttributeName(vaadinServletConfig.getServletName()); Object framework = vaadinServletConfig.getServletContext() .getAttribute(attributeName); - if (framework != null && framework instanceof AtmosphereFramework) { + if (framework instanceof AtmosphereFramework) { return (AtmosphereFramework) framework; } diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index 993a6d3411..2b4723eaaa 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -1966,7 +1966,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, // Remove old renderer Connector oldRenderer = getState().renderer; - if (oldRenderer != null && oldRenderer instanceof Extension) { + if (oldRenderer instanceof Extension) { removeExtension((Extension) oldRenderer); } |