src/java.base/share/classes/sun/net/www/MimeEntry.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

@@ -286,46 +286,46 @@
         String separator = "; ";
         boolean needSeparator = false;
 
         int action = getAction();
         if (action != MimeEntry.UNKNOWN) {
-            sb.append("action=" + actionKeywords[action]);
+            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=" + command);
+            sb.append("application=").append(command);
             needSeparator = true;
         }
 
         if (getImageFileName() != null) {
             if (needSeparator) {
                 sb.append(separator);
             }
-            sb.append("icon=" + getImageFileName());
+            sb.append("icon=").append(getImageFileName());
             needSeparator = true;
         }
 
         String extensions = getExtensionsAsList();
         if (extensions.length() > 0) {
             if (needSeparator) {
                 sb.append(separator);
             }
-            sb.append("file_extensions=" + extensions);
+            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=" + description);
+            sb.append("description=").append(description);
         }
 
         return sb.toString();
     }