Browse Source

Replace String.indexOf with String.contains

Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7217
tags/8.0.0.alpha6
Per-Åke Minborg 7 years ago
parent
commit
5b5f03faa0
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      server/src/main/java/com/vaadin/server/LocaleService.java

+ 2
- 2
server/src/main/java/com/vaadin/server/LocaleService.java View 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;

Loading…
Cancel
Save