src/java.base/share/classes/sun/net/www/MimeEntry.java
Print this page
rev 10537 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>
*** 286,331 ****
String separator = "; ";
boolean needSeparator = false;
int action = getAction();
if (action != MimeEntry.UNKNOWN) {
! sb.append("action=" + actionKeywords[action]);
needSeparator = true;
}
String command = getLaunchString();
if (command != null && command.length() > 0) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("application=" + command);
needSeparator = true;
}
if (getImageFileName() != null) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("icon=" + getImageFileName());
needSeparator = true;
}
String extensions = getExtensionsAsList();
if (extensions.length() > 0) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("file_extensions=" + extensions);
needSeparator = true;
}
String description = getDescription();
if (description != null && !description.equals(getType())) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("description=" + description);
}
return sb.toString();
}
--- 286,331 ----
String separator = "; ";
boolean needSeparator = false;
int action = getAction();
if (action != MimeEntry.UNKNOWN) {
! sb.append("action=").append(actionKeywords[action]);
needSeparator = true;
}
String command = getLaunchString();
if (command != null && command.length() > 0) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("application=").append(command);
needSeparator = true;
}
if (getImageFileName() != null) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("icon=").append(getImageFileName());
needSeparator = true;
}
String extensions = getExtensionsAsList();
if (extensions.length() > 0) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("file_extensions=").append(extensions);
needSeparator = true;
}
String description = getDescription();
if (description != null && !description.equals(getType())) {
if (needSeparator) {
sb.append(separator);
}
! sb.append("description=").append(description);
}
return sb.toString();
}