]> source.dussan.org Git - vaadin-framework.git/commitdiff
Replace String.indexOf with String.contains
authorPer-Åke Minborg <minborg@speedment.com>
Fri, 28 Oct 2016 06:30:31 +0000 (23:30 -0700)
committerHenri Sara <hesara@vaadin.com>
Wed, 2 Nov 2016 14:43:16 +0000 (14:43 +0000)
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7217

server/src/main/java/com/vaadin/server/LocaleService.java

index 33e54b207fb51a84d0dabb03c1874a6e64489ca4..457f014dc5b64f1bd586009d2502a2aaacd7f500 100644 (file)
@@ -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;