aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main
diff options
context:
space:
mode:
authorPer-Åke Minborg <minborg@speedment.com>2016-10-28 22:54:08 -0700
committerHenri Sara <hesara@vaadin.com>2016-11-05 03:56:37 +0200
commit399d7cd5c498b67da9c244ffa7135e872b1507b6 (patch)
treee222133e23c194bf6cc9624232679d9dfc62beae /server/src/main
parent7f28a0fd47ef3451efabffb2ecb227d8ce9608e5 (diff)
downloadvaadin-framework-399d7cd5c498b67da9c244ffa7135e872b1507b6.tar.gz
vaadin-framework-399d7cd5c498b67da9c244ffa7135e872b1507b6.zip
Remove redundant casting
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7232
Diffstat (limited to 'server/src/main')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractTextField.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/Button.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/CheckBox.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/Panel.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/TabSheet.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/TextField.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java2
9 files changed, 9 insertions, 9 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
index 3be9ca668a..3ab5e32d18 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
@@ -510,7 +510,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout
// write default attributes
super.writeDesign(design, designContext);
- AbstractOrderedLayout def = (AbstractOrderedLayout) designContext
+ AbstractOrderedLayout def = designContext
.getDefaultInstance(this);
writeMargin(design, getMargin(), def.getMargin(), designContext);
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
index 5f481cb537..73bedc8470 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
@@ -707,7 +707,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
super.writeDesign(design, designContext);
// handle custom attributes (write only if a value is not the
// default value)
- AbstractSplitPanel def = (AbstractSplitPanel) designContext
+ AbstractSplitPanel def = designContext
.getDefaultInstance(this);
if (getSplitPosition() != def.getSplitPosition()
|| !def.getSplitPositionUnit().equals(getSplitPositionUnit())) {
diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
index 714f4b8e64..3b2c0e9914 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
@@ -281,7 +281,7 @@ public abstract class AbstractTextField extends AbstractField<String>
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- AbstractTextField def = (AbstractTextField) designContext
+ AbstractTextField def = designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
DesignAttributeHandler.writeAttribute("maxlength", attr, getMaxLength(),
diff --git a/server/src/main/java/com/vaadin/ui/Button.java b/server/src/main/java/com/vaadin/ui/Button.java
index c4d30c6100..cbd45ba454 100644
--- a/server/src/main/java/com/vaadin/ui/Button.java
+++ b/server/src/main/java/com/vaadin/ui/Button.java
@@ -621,7 +621,7 @@ public class Button extends AbstractFocusable
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
Attributes attr = design.attributes();
- Button def = (Button) designContext.getDefaultInstance(this);
+ Button def = designContext.getDefaultInstance(this);
String content = getCaption();
if (content != null) {
design.html(content);
diff --git a/server/src/main/java/com/vaadin/ui/CheckBox.java b/server/src/main/java/com/vaadin/ui/CheckBox.java
index a0ace05466..72d5f9a56c 100644
--- a/server/src/main/java/com/vaadin/ui/CheckBox.java
+++ b/server/src/main/java/com/vaadin/ui/CheckBox.java
@@ -207,7 +207,7 @@ public class CheckBox extends AbstractField<Boolean>
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- CheckBox def = (CheckBox) designContext.getDefaultInstance(this);
+ CheckBox def = designContext.getDefaultInstance(this);
Attributes attr = design.attributes();
DesignAttributeHandler.writeAttribute("checked", attr, getValue(),
def.getValue(), Boolean.class, designContext);
diff --git a/server/src/main/java/com/vaadin/ui/Panel.java b/server/src/main/java/com/vaadin/ui/Panel.java
index 7b1333d898..95dddb0003 100644
--- a/server/src/main/java/com/vaadin/ui/Panel.java
+++ b/server/src/main/java/com/vaadin/ui/Panel.java
@@ -348,7 +348,7 @@ public class Panel extends AbstractSingleComponentContainer
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
// handle tabindex
- Panel def = (Panel) designContext.getDefaultInstance(this);
+ Panel def = designContext.getDefaultInstance(this);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java
index cef21eff49..91bb3a61fc 100644
--- a/server/src/main/java/com/vaadin/ui/TabSheet.java
+++ b/server/src/main/java/com/vaadin/ui/TabSheet.java
@@ -1592,7 +1592,7 @@ public class TabSheet extends AbstractComponentContainer
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- TabSheet def = (TabSheet) designContext.getDefaultInstance(this);
+ TabSheet def = designContext.getDefaultInstance(this);
Attributes attr = design.attributes();
// write tabs
diff --git a/server/src/main/java/com/vaadin/ui/TextField.java b/server/src/main/java/com/vaadin/ui/TextField.java
index b6eec11795..a851eb5e28 100644
--- a/server/src/main/java/com/vaadin/ui/TextField.java
+++ b/server/src/main/java/com/vaadin/ui/TextField.java
@@ -83,7 +83,7 @@ public class TextField extends AbstractTextField {
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- AbstractTextField def = (AbstractTextField) designContext
+ AbstractTextField def = designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
DesignAttributeHandler.writeAttribute("value", attr, getValue(),
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
index 44248d095b..00fb32392c 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
@@ -382,7 +382,7 @@ public class DesignAttributeHandler implements Serializable {
return "";
}
@SuppressWarnings("unchecked")
- Converter<String, Object> converter = (Converter<String, Object>) getFormatter()
+ Converter<String, Object> converter = getFormatter()
.findConverterFor(sourceType);
if (converter != null) {
return converter.convertToPresentation(value, new ValueContext());