jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1690148 - in /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth: ./ acl/ authorize/ permissions/
Date Thu, 09 Jul 2015 19:37:13 GMT
Author: juanpablo
Date: Thu Jul  9 19:37:13 2015
New Revision: 1690148

URL: http://svn.apache.org/r1690148
Log:
StringBuffer -> StringBuilder

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/AuthorizationManager.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclEntryImpl.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclImpl.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/DefaultAclManager.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/GroupPermission.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/PagePermission.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/WikiPermission.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/AuthorizationManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/AuthorizationManager.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/AuthorizationManager.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/AuthorizationManager.java
Thu Jul  9 19:37:13 2015
@@ -62,7 +62,6 @@ import org.apache.wiki.preferences.Prefe
 import org.apache.wiki.tags.WikiTagBase;
 import org.apache.wiki.util.ClassUtil;
 import org.freshcookies.security.policy.LocalPolicy;
-import org.freshcookies.security.policy.PolicyException;
 
 /**
  * <p>Manages all access control and authorization; determines what authenticated
@@ -485,13 +484,12 @@ public class AuthorizationManager {
             }
             else
             {
-                StringBuffer sb = new StringBuffer( "JSPWiki was unable to initialize the
" );
-                sb.append( "default security policy (WEB-INF/jspwiki.policy) file. " );
-                sb.append( "Please ensure that the jspwiki.policy file exists in the default
location. " );
-                sb.append( "This file should exist regardless of the existance of a global
policy file. " );
-                sb.append( "The global policy file is identified by the java.security.policy
variable. " );
-                WikiSecurityException wse = new WikiSecurityException( sb.toString() );
-                log.fatal( sb.toString(), wse );
+                String sb = "JSPWiki was unable to initialize the default security policy
(WEB-INF/jspwiki.policy) file. " + 
+                            "Please ensure that the jspwiki.policy file exists in the default
location. " + 
+                		    "This file should exist regardless of the existance of a global policy
file. " +
+                            "The global policy file is identified by the java.security.policy
variable. ";
+                WikiSecurityException wse = new WikiSecurityException( sb );
+                log.fatal( sb, wse );
                 throw wse;
             }
         }

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java Thu
Jul  9 19:37:13 2015
@@ -208,7 +208,7 @@ public final class SecurityVerifier
             colWidth = "67%";
         }
 
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
 
         // Write the table header
         s.append( "<table class=\"wikitable\" border=\"1\">\n" );
@@ -311,7 +311,7 @@ public final class SecurityVerifier
      */
     private String printPermissionTest( Permission permission, Principal principal, int cols
)
     {
-        StringBuffer s = new StringBuffer();
+    	StringBuilder s = new StringBuilder();
         if ( permission == null )
         {
             s.append( "    <td colspan=\"" + cols + "\" align=\"center\" title=\"N/A\">"
);
@@ -367,7 +367,7 @@ public final class SecurityVerifier
         // Now, print a table with JSP pages listed on the left, and
         // an evaluation of each pages' constraints for each role
         // we discovered
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         Principal[] roles = authorizer.getRoles();
         s.append( "<table class=\"wikitable\" border=\"1\">\n" );
         s.append( "<thead>\n" );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclEntryImpl.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclEntryImpl.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclEntryImpl.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclEntryImpl.java Thu
Jul  9 19:37:13 2015
@@ -141,7 +141,7 @@ public class AclEntryImpl implements Acl
      */
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+    	StringBuilder sb = new StringBuilder();
 
         Principal p = getPrincipal();
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclImpl.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclImpl.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclImpl.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/AclImpl.java Thu Jul
 9 19:37:13 2015
@@ -168,7 +168,7 @@ public class AclImpl implements Acl, Ser
      */
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+    	StringBuilder sb = new StringBuilder();
 
         for( AclEntry entry : m_entries )
         {

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/DefaultAclManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/DefaultAclManager.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/DefaultAclManager.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/acl/DefaultAclManager.java
Thu Jul  9 19:37:13 2015
@@ -262,7 +262,7 @@ public class DefaultAclManager implement
 
         // Now, iterate through each permission in the map and generate an ACL string
 
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         for (Map.Entry<String, List<Principal>> entry : permissionPrincipals.entrySet())
{
             String action = entry.getKey();
             List<Principal> principals = entry.getValue();

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java Thu
Jul  9 19:37:13 2015
@@ -317,7 +317,7 @@ public class Group
      */
     public String toString()
     {
-        StringBuffer sb = new StringBuffer();
+    	StringBuilder sb = new StringBuilder();
         sb.append( "(Group " + getName() + ")" );
         return sb.toString();
     }

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/GroupPermission.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/GroupPermission.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/GroupPermission.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/GroupPermission.java
Thu Jul  9 19:37:13 2015
@@ -171,7 +171,7 @@ public final class GroupPermission exten
         String[] groupActions = actions.toLowerCase().split( ACTION_SEPARATOR );
         Arrays.sort( groupActions, String.CASE_INSENSITIVE_ORDER );
         m_mask = createMask( actions );
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for( int i = 0; i < groupActions.length; i++ )
         {
             buffer.append( groupActions[i] );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/PagePermission.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/PagePermission.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/PagePermission.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/PagePermission.java
Thu Jul  9 19:37:13 2015
@@ -24,7 +24,6 @@ import java.security.PermissionCollectio
 import java.util.Arrays;
 
 import org.apache.commons.lang.StringUtils;
-
 import org.apache.wiki.WikiPage;
 
 /**
@@ -191,7 +190,7 @@ public final class PagePermission extend
         String[] pageActions = StringUtils.split( actions.toLowerCase(), ACTION_SEPARATOR
);
         Arrays.sort( pageActions, String.CASE_INSENSITIVE_ORDER );
         m_mask = createMask( actions );
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for( int i = 0; i < pageActions.length; i++ )
         {
             buffer.append( pageActions[i] );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/WikiPermission.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/WikiPermission.java?rev=1690148&r1=1690147&r2=1690148&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/WikiPermission.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/permissions/WikiPermission.java
Thu Jul  9 19:37:13 2015
@@ -99,7 +99,7 @@ public final class WikiPermission extend
         String[] pageActions = actions.toLowerCase().split( "," );
         Arrays.sort( pageActions, String.CASE_INSENSITIVE_ORDER );
         m_mask = createMask( actions );
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         for( int i = 0; i < pageActions.length; i++ )
         {
             buffer.append( pageActions[i] );



Mime
View raw message