}
final String df = ((SimpleDateFormat) dateFormat).toPattern();
- int timeStart = df.indexOf("H");
+ int timeStart = df.indexOf('H');
if (timeStart < 0) {
- timeStart = df.indexOf("h");
+ timeStart = df.indexOf('h');
}
- final int ampm_first = df.indexOf("a");
+ final int ampm_first = df.indexOf('a');
// E.g. in Korean locale AM/PM is before h:mm
// TODO should take that into consideration on client-side as well,
// now always h:mm a
// Convention is to name the mixin after the stylesheet. Strip
// .scss from filename
- String mixin = file.substring(file.lastIndexOf("/") + 1,
+ String mixin = file.substring(file.lastIndexOf('/') + 1,
file.length() - ".scss".length());
foundMixins.add(mixin);
try {
// Try to parse path for better readability
- path = path.substring(path.lastIndexOf(":") + 1,
- path.lastIndexOf("!"));
+ path = path.substring(path.lastIndexOf(':') + 1,
+ path.lastIndexOf('!'));
// Extract jar archive filename
- path = path.substring(path.lastIndexOf("/") + 1);
+ path = path.substring(path.lastIndexOf('/') + 1);
} catch (Exception e) {
// Parsing failed but no worries, we then use whatever
// remove the .gwt.xml extension
String classname = file.substring(0, file.length() - 8);
String packageName = locationString
- .substring(locationString.lastIndexOf("/") + 1);
+ .substring(locationString.lastIndexOf('/') + 1);
classname = packageName + "." + classname;
if (!WidgetSetBuilder.isWidgetset(classname)) {
// Only return widgetsets and not GWT modules to avoid
if (mt.equals("image/svg+xml")) {
type = TYPE_OBJECT;
- } else if ((mt.substring(0, mt.indexOf("/"))
+ } else if ((mt.substring(0, mt.indexOf('/'))
.equalsIgnoreCase("image"))) {
type = TYPE_IMAGE;
} else {
} else if (value.startsWith("rgb")) {
// RGB color format rgb/rgba(255,255,255,0.1)
- String[] colors = value.substring(value.indexOf("(") + 1,
+ String[] colors = value.substring(value.indexOf('(') + 1,
value.length() - 1).split(",");
int red = Integer.parseInt(colors[0]);
} else if (value.startsWith("hsl")) {
// HSL color format hsl/hsla(100,50%,50%,1.0)
- String[] colors = value.substring(value.indexOf("(") + 1,
+ String[] colors = value.substring(value.indexOf('(') + 1,
value.length() - 1).split(",");
int hue = Integer.parseInt(colors[0]);
}
// Calculates the extension of the file
- int dotIndex = fileName.indexOf(".");
- while (dotIndex >= 0 && fileName.indexOf(".", dotIndex + 1) >= 0) {
- dotIndex = fileName.indexOf(".", dotIndex + 1);
+ int dotIndex = fileName.indexOf('.');
+ while (dotIndex >= 0 && fileName.indexOf('.', dotIndex + 1) >= 0) {
+ dotIndex = fileName.indexOf('.', dotIndex + 1);
}
dotIndex++;