summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPer-Åke Minborg <minborg@speedment.com>2016-10-27 23:30:31 -0700
committerHenri Sara <hesara@vaadin.com>2016-11-02 14:43:16 +0000
commit5b5f03faa0e0db7f2db71dd61623f370c9d843da (patch)
tree2d37d871dc762f7e2a8e03d719baa22a38b17c37 /server
parent557721f86e3de24b80efb6d80382a74699fa38d0 (diff)
downloadvaadin-framework-5b5f03faa0e0db7f2db71dd61623f370c9d843da.tar.gz
vaadin-framework-5b5f03faa0e0db7f2db71dd61623f370c9d843da.zip
Replace String.indexOf with String.contains
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7217
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/server/LocaleService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/server/LocaleService.java b/server/src/main/java/com/vaadin/server/LocaleService.java
index 33e54b207f..457f014dc5 100644
--- a/server/src/main/java/com/vaadin/server/LocaleService.java
+++ b/server/src/main/java/com/vaadin/server/LocaleService.java
@@ -203,10 +203,10 @@ public class LocaleService implements Serializable {
*
* We use timeformat to determine 12/24-hour clock
*/
- final boolean twelve_hour_clock = timeformat.indexOf("a") > -1;
+ final boolean twelve_hour_clock = timeformat.contains("a");
// TODO there are other possibilities as well, like 'h' in french
// (ignore them, too complicated)
- final String hour_min_delimiter = timeformat.indexOf(".") > -1 ? "."
+ final String hour_min_delimiter = timeformat.contains(".") ? "."
: ":";
// outWriter.print("\"tf\":\"" + timeformat + "\",");
localeData.twelveHourClock = twelve_hour_clock;