summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/PasswordField.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-15 08:41:45 +0200
committerMatti Hosio <mhosio@vaadin.com>2014-12-15 16:35:54 +0200
commit8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb (patch)
tree93bf9f429390e5643a55f503076a391469359ce2 /server/src/com/vaadin/ui/PasswordField.java
parent3b75f2b14833f78c00d0032cbd76b09fca058100 (diff)
downloadvaadin-framework-8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb.tar.gz
vaadin-framework-8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb.zip
Do not create default instances while reading designs (#7749)
Change-Id: I26cb6d8d43200d10ebf8c0ac22c538b4272f5ecd
Diffstat (limited to 'server/src/com/vaadin/ui/PasswordField.java')
-rw-r--r--server/src/com/vaadin/ui/PasswordField.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/PasswordField.java b/server/src/com/vaadin/ui/PasswordField.java
index 5f27eb59c9..974a1c2c10 100644
--- a/server/src/com/vaadin/ui/PasswordField.java
+++ b/server/src/com/vaadin/ui/PasswordField.java
@@ -91,12 +91,11 @@ public class PasswordField extends AbstractTextField {
@Override
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
- AbstractTextField def = designContext.getDefaultInstance(this
- .getClass());
Attributes attr = design.attributes();
- String value = DesignAttributeHandler.readAttribute("value", attr,
- def.getValue(), String.class);
- setValue(value);
+ if (attr.hasKey("value")) {
+ setValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class));
+ }
}
/*