Author: simonetripodi
Date: Sun Sep  4 16:20:44 2011
New Revision: 1165069

URL: http://svn.apache.org/viewvc?rev=1165069&view=rev
Log:
muted HttpSession.getAttrbibuteNames() warnings, it is known that Session 
attribute names are String
        

Modified:
    
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSessionScopeMap.java

Modified: 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSessionScopeMap.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSessionScopeMap.java?rev=1165069&r1=1165068&r2=1165069&view=diff
==============================================================================
--- 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSessionScopeMap.java
 (original)
+++ 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSessionScopeMap.java
 Sun Sep  4 16:20:44 2011
@@ -68,6 +68,7 @@ final class ServletSessionScopeMap imple
         if (value == null || !sessionExists()) {
             return false;
         }
+        @SuppressWarnings( "unchecked" ) // it is known that attribute names 
are String
         Enumeration<String> keys = session.getAttributeNames();
         while (keys.hasMoreElements()) {
             Object next = session.getAttribute(keys.nextElement());
@@ -82,6 +83,7 @@ final class ServletSessionScopeMap imple
     public Set<Entry<String, Object>> entrySet() {
         Set<Entry<String, Object>> set = new HashSet<Entry<String, Object>>();
         if (sessionExists()) {
+            @SuppressWarnings( "unchecked" ) // it is known that attribute 
names are String
             Enumeration<String> keys = session.getAttributeNames();
             String key;
             while (keys.hasMoreElements()) {
@@ -122,6 +124,7 @@ final class ServletSessionScopeMap imple
     public Set<String> keySet() {
         Set<String> set = new HashSet<String>();
         if (sessionExists()) {
+            @SuppressWarnings( "unchecked" ) // it is known that attribute 
names are String
             Enumeration<String> keys = session.getAttributeNames();
             while (keys.hasMoreElements()) {
                 set.add(keys.nextElement());
@@ -170,6 +173,7 @@ final class ServletSessionScopeMap imple
     public int size() {
         int n = 0;
         if (sessionExists()) {
+            @SuppressWarnings( "unchecked" ) // it is known that attribute 
names are String
             Enumeration<String> keys = session.getAttributeNames();
             while (keys.hasMoreElements()) {
                 keys.nextElement();
@@ -183,6 +187,7 @@ final class ServletSessionScopeMap imple
     public Collection<Object> values() {
         List<Object> list = new ArrayList<Object>();
         if (sessionExists()) {
+            @SuppressWarnings( "unchecked" ) // it is known that attribute 
names are String
             Enumeration<String> keys = session.getAttributeNames();
             while (keys.hasMoreElements()) {
                 list.add(session.getAttribute(keys.nextElement()));


Reply via email to