Update of /var/cvs/src/org/mmbase/security/implementation/context
In directory james.mmbase.org:/tmp/cvs-serv27810

Modified Files:
        ContextAuthorization.java 
Log Message:
Resolved some useless use of private variables


See also: 
http://cvs.mmbase.org/viewcvs/src/org/mmbase/security/implementation/context


Index: ContextAuthorization.java
===================================================================
RCS file: 
/var/cvs/src/org/mmbase/security/implementation/context/ContextAuthorization.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- ContextAuthorization.java   3 Sep 2008 20:04:56 -0000       1.47
+++ ContextAuthorization.java   22 Dec 2008 17:12:36 -0000      1.48
@@ -35,7 +35,7 @@
  * @author Eduard Witteveen
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: ContextAuthorization.java,v 1.47 2008/09/03 20:04:56 michiel 
Exp $
+ * @version $Id: ContextAuthorization.java,v 1.48 2008/12/22 17:12:36 michiel 
Exp $
  * @see    ContextAuthentication
  */
 public class ContextAuthorization extends Authorization {
@@ -250,8 +250,7 @@
 
         // is our usercontext still valid?
         if(!manager.getAuthentication().isValid(user)) {
-            String msg = "the usercontext was expired";
-            throw new java.lang.SecurityException(msg);
+            throw new java.lang.SecurityException("the usercontext was 
expired");
         }
         // operations can be granted for the whole system...
         if(globalAllowedOperations.contains(operation)) {
@@ -430,8 +429,7 @@
                     }
                     log.debug("\tdid found the user with name " + named + " 
but is not we are looking for.");
                 } else {
-                    String msg = "dont know the type:" + type;
-                    throw new SecurityException(msg);
+                    throw new SecurityException("dont know the type:" + type);
                 }
             }
         }
@@ -468,21 +466,17 @@
         if (operation == Operation.CREATE) {
             // may link on both nodes
             if(!check(user, srcNodeNumber, "link")) {
-                String msg = "Operation 'link' on " + srcNodeNumber + " was 
NOT permitted to " + user.getIdentifier();
-                throw new SecurityException(msg);
+                throw new SecurityException("Operation 'link' on " + 
srcNodeNumber + " was NOT permitted to " + user.getIdentifier());
             }
             if (! check(user, dstNodeNumber, "link")) {
-                String msg = "Operation 'link' on " + dstNodeNumber + " was 
NOT permitted to " + user.getIdentifier();
-                throw new SecurityException(msg);
+                throw new SecurityException("Operation 'link' on " + 
dstNodeNumber + " was NOT permitted to " + user.getIdentifier());
             }
         } else if (operation == Operation.CHANGE_RELATION) {
             if(!check(user, srcNodeNumber, "link")) {
-                String msg = "Operation 'link' on " + srcNodeNumber + " was 
NOT permitted to " + user.getIdentifier();
-                throw new SecurityException(msg);
+                throw new SecurityException("Operation 'link' on " + 
srcNodeNumber + " was NOT permitted to " + user.getIdentifier());
             }
             if (! check(user, dstNodeNumber, "link")) {
-                String msg = "Operation 'link' on " + dstNodeNumber + " was 
NOT permitted to " + user.getIdentifier();
-                throw new SecurityException(msg);
+                throw new SecurityException("Operation 'link' on " + 
dstNodeNumber + " was NOT permitted to " + user.getIdentifier());
             }
             verify(user, nodeNumber, Operation.WRITE);
         } else {
@@ -520,16 +514,12 @@
             MMBase mmb = MMBase.getMMBase();
             builder =  mmb.getMMObject("typedef");
             if(builder == null) {
-                String msg = "builder 'typedef' not found";
-                //throw new NotFoundException(msg);
-                throw new SecurityException(msg);
+                throw new SecurityException("builder 'typedef' not found");
             }
         }
         MMObjectNode node = builder.getNode(n);
         if(node == null) {
-            String msg = "node " + n + " not found";
-            //throw new NotFoundException(msg);
-            throw new SecurityException(msg);
+            throw new SecurityException("node " + n + " not found");
         }
         return node;
     }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to