cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components PortalManagerImpl.java
Date Fri, 06 Feb 2004 15:13:54 GMT
cziegeler    2004/02/06 07:13:54

  Modified:    src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components
                        PortalManagerImpl.java
  Log:
  Hopefully fixing ClassCastException
  
  Revision  Changes    Path
  1.2       +11 -8     cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java
  
  Index: PortalManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortalManagerImpl.java	9 Jan 2004 11:20:22 -0000	1.1
  +++ PortalManagerImpl.java	6 Feb 2004 15:13:54 -0000	1.2
  @@ -1881,13 +1881,16 @@
                   }
   
                   while (keys.hasMoreElements()) {
  -                    currentKey = (String)keys.nextElement();
  -                    if (deleteGlobal != null && currentKey.equals(deleteGlobal))
{
  -                        store.remove(currentKey);
  -                    } else if (deleteRole != null && currentKey.startsWith(deleteRole))
{
  -                        store.remove(currentKey);
  -                    } else if (deleteUser != null && currentKey.startsWith(deleteUser))
{
  -                        store.remove(currentKey);
  +                    Object k = keys.nextElement();
  +                    if ( k instanceof String ) {
  +                        currentKey = (String)k;
  +                        if (deleteGlobal != null && currentKey.equals(deleteGlobal))
{
  +                            store.remove(currentKey);
  +                        } else if (deleteRole != null && currentKey.startsWith(deleteRole))
{
  +                            store.remove(currentKey);
  +                        } else if (deleteUser != null && currentKey.startsWith(deleteUser))
{
  +                            store.remove(currentKey);
  +                        }
                       }
                   }
               }
  
  
  

Mime
View raw message