diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-26 13:26:20 +0200 |
---|---|---|
committer | Pekka Maanpää <pekkamaa@vaadin.com> | 2017-10-26 14:26:20 +0300 |
commit | 10bd7544fd22dccd7e8e32cb236eb50f102892d3 (patch) | |
tree | d0e6f2241dc2b612a0deeceeb30399e88e47ed6a /server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java | |
parent | 7c8f440781835dbcf72bfbc47ab8be2f669a40e4 (diff) | |
download | vaadin-framework-10bd7544fd22dccd7e8e32cb236eb50f102892d3.tar.gz vaadin-framework-10bd7544fd22dccd7e8e32cb236eb50f102892d3.zip |
Improve naming of fields and variables (#10242)
* Variable names to conform to naming convention.
* Use static constants where it makes sense
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java | 12 |
1 files changed, 6 insertions, 6 deletions
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 c508b693f8..4115edfde0 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java @@ -59,7 +59,7 @@ public class DesignAttributeHandler implements Serializable { return Logger.getLogger(DesignAttributeHandler.class.getName()); } - private static final Map<Class<?>, AttributeCacheEntry> cache = new ConcurrentHashMap<>(); + private static final Map<Class<?>, AttributeCacheEntry> CACHE = new ConcurrentHashMap<>(); // translates string <-> object private static final DesignFormatter FORMATTER = new DesignFormatter(); @@ -145,7 +145,7 @@ public class DesignAttributeHandler implements Serializable { */ public static Collection<String> getSupportedAttributes(Class<?> clazz) { resolveSupportedAttributes(clazz); - return cache.get(clazz).getAttributes(); + return CACHE.get(clazz).getAttributes(); } /** @@ -160,7 +160,7 @@ public class DesignAttributeHandler implements Serializable { if (clazz == null) { throw new IllegalArgumentException("The clazz can not be null"); } - if (cache.containsKey(clazz)) { + if (CACHE.containsKey(clazz)) { // NO-OP return; } @@ -184,7 +184,7 @@ public class DesignAttributeHandler implements Serializable { entry.addAttribute(attribute, getter, setter); } } - cache.put(clazz, entry); + CACHE.put(clazz, entry); } /** @@ -413,7 +413,7 @@ public class DesignAttributeHandler implements Serializable { private static Method findSetterForAttribute(Class<?> clazz, String attribute) { resolveSupportedAttributes(clazz); - return cache.get(clazz).getSetter(attribute); + return CACHE.get(clazz).getSetter(attribute); } /** @@ -429,7 +429,7 @@ public class DesignAttributeHandler implements Serializable { private static Method findGetterForAttribute(Class<?> clazz, String attribute) { resolveSupportedAttributes(clazz); - return cache.get(clazz).getGetter(attribute); + return CACHE.get(clazz).getGetter(attribute); } /** |