Commits

Sebastian Sdorra committed ac38046

use joiner instead of while loop

  • Participants
  • Parent commits 6b2fa6a
  • Branches apache-shiro

Comments (0)

Files changed (1)

File scm-webapp/src/main/java/sonia/scm/security/ScmRealm.java

  */
 
 
+
 package sonia.scm.security;
 
 //~--- non-JDK imports --------------------------------------------------------
 
+import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.inject.Inject;
     {
       msg.append(" is member of ");
 
-      Iterator<String> groupIt = groups.iterator();
-
-      while (groupIt.hasNext())
-      {
-        msg.append(groupIt.next());
-
-        if (groupIt.hasNext())
-        {
-          msg.append(", ");
-        }
-      }
+      Joiner.on(", ").appendTo(msg, groups);
     }
     else
     {