[jboss-cvs] Picketbox SVN: r107 - trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 13 17:26:14 EDT 2010


Author: anil.saldhana at jboss.com
Date: 2010-09-13 17:26:14 -0400 (Mon, 13 Sep 2010)
New Revision: 107

Modified:
   trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/SecurityAssociation.java
Log:
suppress warnings

Modified: trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/SecurityAssociation.java
===================================================================
--- trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/SecurityAssociation.java	2010-09-13 17:51:56 UTC (rev 106)
+++ trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/SecurityAssociation.java	2010-09-13 21:26:14 UTC (rev 107)
@@ -894,10 +894,9 @@
     * and implements push, pop and peek stack operations on the thread local
     * ArrayList.
     */
-   @SuppressWarnings("unused")
+   @SuppressWarnings( {"unchecked","unused", "rawtypes" } )
    private static class RunAsThreadLocalStack
-   {
-      @SuppressWarnings("unchecked")
+   {  
       ThreadLocal local;
 
       RunAsThreadLocalStack(boolean threadLocal)
@@ -908,21 +907,18 @@
             local = new ArrayListInheritableLocal();
       }
       
-      @SuppressWarnings({"unchecked"})
       int size()
       {
          ArrayList stack = (ArrayList) local.get();
          return stack.size();
       }
 
-      @SuppressWarnings("unchecked")
       void push(RunAsIdentity runAs)
       {
          ArrayList stack = (ArrayList) local.get();
          stack.add(runAs);
       }
-
-      @SuppressWarnings({"unchecked"})
+ 
       RunAsIdentity pop()
       {
          ArrayList stack = (ArrayList) local.get();
@@ -938,7 +934,6 @@
        * with the value at depth.
        * @return The run-as identity if one exists, null otherwise.
        */
-      @SuppressWarnings({"unchecked"})
       RunAsIdentity peek(int depth)
       {
          ArrayList stack = (ArrayList) local.get();
@@ -1032,7 +1027,7 @@
       }
    }
 
-   @SuppressWarnings({"unchecked", "unused"})
+   @SuppressWarnings({"unchecked", "rawtypes", "unused"})
    private static class SubjectThreadLocalStack
    {
       ThreadLocal local;
@@ -1050,7 +1045,7 @@
          ArrayList stack = (ArrayList) local.get();
          return stack.size();
       }
-
+ 
       void push(SubjectContext context)
       {
          ArrayList stack = (ArrayList) local.get();
@@ -1104,7 +1099,7 @@
       }
    }
 
-   @SuppressWarnings("unchecked")
+   @SuppressWarnings("rawtypes")
    private static class ArrayListLocal extends ThreadLocal
    {
       protected Object initialValue()
@@ -1114,7 +1109,7 @@
       
    }
 
-   @SuppressWarnings("unchecked")
+   @SuppressWarnings({"unchecked", "rawtypes"})
    private static class ArrayListInheritableLocal extends InheritableThreadLocal
    {
       /**
@@ -1149,17 +1144,18 @@
       
    }
 
-   @SuppressWarnings({"unchecked","unused"})
    private static class HashMapInheritableLocal<T> 
    extends InheritableThreadLocal<HashMap<String,Object>>
    {
+      
       /**
        * Override to make a copy of the parent as not doing so results in multiple
        * threads sharing the unsynchronized map of the parent thread.
        * @param parentValue - the parent HashMap
        * @return a copy of the parent thread map
-       */ 
-      protected HashMap<String,Object> childValue(Object parentValue)
+       */
+      @Override
+      protected HashMap<String, Object> childValue(HashMap<String, Object> parentValue)
       {
          HashMap<String,Object> map = (HashMap<String,Object>) parentValue;
          /* It seems there are scenarios where the size can change during the copy so there is
@@ -1181,7 +1177,6 @@
       protected HashMap<String,Object> initialValue()
       {
          return new HashMap<String,Object>();
-      }
-      
+      }      
    }
 }
\ No newline at end of file



More information about the jboss-cvs-commits mailing list