@@ -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; |
@@ -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); |
@@ -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; |
@@ -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; | |||
} | |||
@@ -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; |
@@ -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. |
@@ -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. |
@@ -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); |
@@ -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); | |||
} |
@@ -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; | |||
} | |||
@@ -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); | |||
} | |||