} else if (parent instanceof Window) {
// Sub window can define width based on caption
if (parent.getCaption() != null
- && !parent.getCaption().equals("")) {
+ && !parent.getCaption().isEmpty()) {
return true;
} else {
return false;
rawfilename = rawfilename.substring(0,
rawfilename.indexOf(quote));
firstFileFieldFound = true;
- } else if (firstFileFieldFound && readLine.equals("")) {
+ } else if (firstFileFieldFound && readLine.isEmpty()) {
atStart = true;
} else if (readLine.startsWith("Content-Type")) {
rawMimeType = readLine.split(": ")[1];
csrfToken = ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE;
} else {
String csrfToken = token.asString();
- if (csrfToken.equals("")) {
+ if (csrfToken.isEmpty()) {
csrfToken = ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE;
}
this.csrfToken = csrfToken;
String changeMessage = getMessage(reader);
- if (changeMessage == null || changeMessage.equals("")) {
+ if (changeMessage == null || changeMessage.isEmpty()) {
// The client sometimes sends empty messages, this is probably a bug
return;
}
static {
String debugProperty = System.getProperty("debug");
- if (debugProperty != null && !debugProperty.equals("")) {
+ if (debugProperty != null && !debugProperty.isEmpty()) {
debug = true;
}
}
// remove the .gwt.xml extension
String classname = files[i].substring(0, files[i].length() - 8);
String packageName = locationString
- .substring(locationString.lastIndexOf('/') + 1);
+ .substring(locationString.lastIndexOf('/') + 1);
classname = packageName + "." + classname;
if (!WidgetSetBuilder.isWidgetset(classname)) {
.getValue("Vaadin-Widgetsets");
if (value != null) {
String[] widgetsetNames = value.split(",");
- for (int i = 0; i < widgetsetNames.length; i++) {
- String widgetsetname = widgetsetNames[i].trim();
- if (!widgetsetname.equals("")) {
+ for (String widgetsetName : widgetsetNames) {
+ String widgetsetname = widgetsetName.trim();
+ if (!widgetsetname.isEmpty()) {
widgetsets.put(widgetsetname, location);
}
}
.getValue("Vaadin-Stylesheets");
if (value != null) {
String[] stylesheets = value.split(",");
- for (int i = 0; i < stylesheets.length; i++) {
- String stylesheet = stylesheets[i].trim();
- if (!stylesheet.equals("")) {
+ for (String stylesheet1 : stylesheets) {
+ String stylesheet = stylesheet1.trim();
+ if (!stylesheet.isEmpty()) {
addonStyles.put(stylesheet, location);
}
}
for (int i = 0; i < cssProperties.length; i++) {
String[] keyValuePair = cssProperties[i].split(":");
String key = keyValuePair[0].trim();
- if (key.equals("")) {
+ if (key.isEmpty()) {
continue;
}
if (key.equals("z-index")) {
value = "";
}
String symbol = value.replaceAll("[0-9\\.\\-]+", "");
- if (!symbol.equals("")) {
+ if (!symbol.isEmpty()) {
value = value.substring(0, value.indexOf(symbol))
.trim();
}
DesignRoot designAnnotation = annotatedClass
.getAnnotation(DesignRoot.class);
String filename = designAnnotation.value();
- if (filename.equals("")) {
+ if (filename.isEmpty()) {
// No value, assume the html file is named as the class
filename = annotatedClass.getSimpleName() + ".html";
}
@SuppressWarnings("unchecked")
@Override
public Result<T> convertToModel(String value, ValueContext context) {
- if (value == null || value.trim().equals("")) {
+ if (value == null || value.trim().isEmpty()) {
return Result.ok(null);
}
try {