src/java.base/share/classes/java/security/PermissionCollection.java

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

@@ -177,17 +177,17 @@
      *
      */
     public String toString() {
         Enumeration<Permission> enum_ = elements();
         StringBuilder sb = new StringBuilder();
-        sb.append(super.toString()+" (\n");
+        sb.append(super.toString()).append(" (\n");
         while (enum_.hasMoreElements()) {
             try {
-                sb.append(" ");
+                sb.append(' ');
                 sb.append(enum_.nextElement().toString());
-                sb.append("\n");
-            } catch (NoSuchElementException e){
+                sb.append('\n');
+            } catch (NoSuchElementException e) {
                 // ignore
             }
         }
         sb.append(")\n");
         return sb.toString();