[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...

Gavin King gavin.king at jboss.com
Mon Jun 11 12:59:28 EDT 2007


  User: gavin   
  Date: 07/06/11 12:59:28

  Modified:    src/main/org/jboss/seam/contexts  BasicContext.java
  Log:
  workaround RI bug
  
  Revision  Changes    Path
  1.3       +12 -2     jboss-seam/src/main/org/jboss/seam/contexts/BasicContext.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BasicContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/BasicContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- BasicContext.java	10 Jun 2007 19:39:15 -0000	1.2
  +++ BasicContext.java	11 Jun 2007 16:59:28 -0000	1.3
  @@ -1,8 +1,9 @@
  -//$Id: BasicContext.java,v 1.2 2007/06/10 19:39:15 gavin Exp $
  +//$Id: BasicContext.java,v 1.3 2007/06/11 16:59:28 gavin Exp $
   package org.jboss.seam.contexts;
   
   import java.util.HashMap;
   import java.util.Map;
  +import java.util.Set;
   
   import org.jboss.seam.Component;
   import org.jboss.seam.ScopeType;
  @@ -46,7 +47,16 @@
   
      public String[] getNames()
      {
  -      return map.keySet().toArray(new String[0]);
  +      //yes, I know about the toArray() method,
  +      //but there is a bug in the RI!
  +      Set<String> keySet = map.keySet();
  +      String[] array = new String[ keySet.size() ];
  +      int i=0;
  +      for (String key: keySet)
  +      {
  +         array[i++] = key;
  +      }
  +      return array;
      }
   
      public boolean isSet(String name)
  
  
  



More information about the jboss-cvs-commits mailing list