summaryrefslogtreecommitdiffstats
path: root/compatibility-server
diff options
context:
space:
mode:
Diffstat (limited to 'compatibility-server')
-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
6 files changed, 8 insertions, 9 deletions
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);