quintonm    2003/01/28 12:28:19

  Modified:    src/java/org/apache/turbine/services/intake Tag:
                        TURBINE_2_2_BRANCH IntakeTool.java
  Log:
  Correction to previous commit.  This will still allows groups and pullMap to be 
initialized even when there are no groups defined.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.2   +10 -12    
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/IntakeTool.java
  
  Index: IntakeTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/IntakeTool.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- IntakeTool.java   28 Jan 2003 20:23:24 -0000      1.7.2.1
  +++ IntakeTool.java   28 Jan 2003 20:28:19 -0000      1.7.2.2
  @@ -87,20 +87,18 @@
       public IntakeTool()
       {
           String[] groupNames = TurbineIntake.getGroupNames();
  +        int groupCount = 0;
           if(groupNames != null)
           {
  -            groups = new HashMap((int)(1.25*groupNames.length + 1));
  -            pullMap = new HashMap((int)(1.25*groupNames.length + 1));
  +            groupCount = groupNames.length;
  +        }
  +        groups = new HashMap((int) (1.25 * groupCount + 1));
  +        pullMap = new HashMap((int) (1.25 * groupCount + 1));
   
  -            for (int i=groupNames.length-1; i>=0; i--)
  -            {
  -                pullMap.put(groupNames[i], new PullHelper(groupNames[i]));
  -            }
  -             }
  -             else
  -             {
  -                     Log.warn("You do not have any groups defined for intake!!!!");
  -             }
  +        for (int i = groupNames.length - 1; i >= 0; i--)
  +        {
  +            pullMap.put(groupNames[i], new PullHelper(groupNames[i]));
  +        }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to