summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/main/java/com/vaadin/client/Util.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java6
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java7
-rw-r--r--server/src/main/java/com/vaadin/server/DragAndDropService.java2
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java2
11 files changed, 14 insertions, 18 deletions
diff --git a/client/src/main/java/com/vaadin/client/Util.java b/client/src/main/java/com/vaadin/client/Util.java
index a27e92bd82..517727e75e 100644
--- a/client/src/main/java/com/vaadin/client/Util.java
+++ b/client/src/main/java/com/vaadin/client/Util.java
@@ -1249,8 +1249,7 @@ public class Util {
private static HasChildMeasurementHintConnector getPossibleChildMeasurementHintParentConnector(
ComponentConnector candidate) {
ServerConnector parent = candidate.getParent();
- if (parent != null
- && parent instanceof HasChildMeasurementHintConnector) {
+ if (parent instanceof HasChildMeasurementHintConnector) {
return (HasChildMeasurementHintConnector) parent;
}
return null;
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
index 3d8aa14862..383d67ce70 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java
@@ -247,8 +247,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
int cellCount = days.getCellCount(i);
for (int j = 0; j < cellCount; j++) {
Widget widget = days.getWidget(i, j);
- if (widget != null
- && widget instanceof VAbstractCalendarPanel.Day) {
+ if (widget instanceof VAbstractCalendarPanel.Day) {
Day curday = (Day) widget;
if (curday.getDate().equals(date)) {
curday.addStyleDependentName(CN_FOCUSED);
@@ -358,8 +357,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>>
int cellCount = days.getCellCount(i);
for (int j = 0; j < cellCount; j++) {
Widget widget = days.getWidget(i, j);
- if (widget != null
- && widget instanceof VAbstractCalendarPanel.Day) {
+ if (widget instanceof VAbstractCalendarPanel.Day) {
Day curday = (Day) widget;
if (curday.getDate().equals(date)) {
curday.addStyleDependentName(CN_SELECTED);
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
index 4ae90a7569..edb46ae4e5 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java
@@ -676,7 +676,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*/
@Override
public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof FileItem)) {
+ if (!(obj instanceof FileItem)) {
return false;
}
final FileItem fi = (FileItem) obj;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
index d7be9c54e8..a486ec2443 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
@@ -325,7 +325,7 @@ public class PropertysetItem
@Override
public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof PropertysetItem)) {
+ if (!(obj instanceof PropertysetItem)) {
return false;
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
index 78ef1f8d58..425a5c1f60 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
@@ -65,7 +65,7 @@ public final class RowItem implements Item {
@Override
public Property getItemProperty(Object id) {
- if (id instanceof String && id != null) {
+ if (id instanceof String) {
for (ColumnProperty cp : properties) {
if (id.equals(cp.getPropertyId())) {
return cp;
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java
index ef8dde86f4..c549c18738 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java
@@ -59,7 +59,7 @@ public class DoubleValidator extends AbstractStringValidator {
@Override
public void validate(Object value) throws InvalidValueException {
- if (value != null && value instanceof Double) {
+ if (value instanceof Double) {
// Allow Doubles to pass through the validator for easier
// migration. Otherwise a TextField connected to an double property
// with a DoubleValidator will fail.
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java
index a65c7884f2..f5a004215e 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java
@@ -60,7 +60,7 @@ public class IntegerValidator extends AbstractStringValidator {
@Override
public void validate(Object value) throws InvalidValueException {
- if (value != null && value instanceof Integer) {
+ if (value instanceof Integer) {
// Allow Integers to pass through the validator for easier
// migration. Otherwise a TextField connected to an integer property
// with an IntegerValidator will fail.
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java
index f23326e4f3..45b16f0381 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java
@@ -1939,8 +1939,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (pids != null) {
for (Object id : pids) {
Property<?> p = i.getItemProperty(id);
- if (p != null
- && p instanceof Property.ValueChangeNotifier) {
+ if (p instanceof Property.ValueChangeNotifier) {
((Property.ValueChangeNotifier) p)
.addValueChangeListener(
getCaptionChangeListener());
@@ -1953,7 +1952,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
case PROPERTY:
final Property<?> p = getContainerProperty(itemId,
getItemCaptionPropertyId());
- if (p != null && p instanceof Property.ValueChangeNotifier) {
+ if (p instanceof Property.ValueChangeNotifier) {
((Property.ValueChangeNotifier) p)
.addValueChangeListener(getCaptionChangeListener());
captionChangeNotifiers.add(p);
@@ -1964,7 +1963,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (getItemIconPropertyId() != null) {
final Property p = getContainerProperty(itemId,
getItemIconPropertyId());
- if (p != null && p instanceof Property.ValueChangeNotifier) {
+ if (p instanceof Property.ValueChangeNotifier) {
((Property.ValueChangeNotifier) p)
.addValueChangeListener(getCaptionChangeListener());
captionChangeNotifiers.add(p);
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);
}