aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-20 10:10:02 +0200
committerPéter Török <31210544+torok-peter@users.noreply.github.com>2017-10-20 11:10:02 +0300
commita9c83ba07e4dec90eb7d6e332b91adde9613ebb4 (patch)
tree7907a6c389ae740572197d949e27c6fd3c25491c /server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
parent0a26d0e44169f9643e7d30ba370b8ecbbe128a56 (diff)
downloadvaadin-framework-a9c83ba07e4dec90eb7d6e332b91adde9613ebb4.tar.gz
vaadin-framework-a9c83ba07e4dec90eb7d6e332b91adde9613ebb4.zip
Use .toLowerCase and .toUpperCase(Locale.ROOT) (#10182)
* Use .toLowerCase and .toUpperCase(Locale.ROOT) * Spaces * add spaces after if(
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.java7
1 files changed, 4 insertions, 3 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 e8fa278aba..c508b693f8 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
@@ -25,6 +25,7 @@ import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
@@ -330,7 +331,7 @@ public class DesignAttributeHandler implements Serializable {
if (builder.length() != 0) {
builder.append('-');
}
- builder.append(word.toLowerCase());
+ builder.append(word.toLowerCase(Locale.ROOT));
}
return builder.toString();
}
@@ -356,13 +357,13 @@ public class DesignAttributeHandler implements Serializable {
// written in lower case
if (matcher.group(1).isEmpty()) {
matcher.appendReplacement(result,
- matched.toLowerCase() + matcher.group(3));
+ matched.toLowerCase(Locale.ROOT) + matcher.group(3));
// otherwise the first character of the group stays uppercase,
// while the others are lower case
} else {
matcher.appendReplacement(result,
matcher.group(1) + matched.substring(0, 1)
- + matched.substring(1).toLowerCase()
+ + matched.substring(1).toLowerCase(Locale.ROOT)
+ matcher.group(3));
}
// in both cases the uppercase letter of the next word (or string's