I have applied the patch against CVS HEAD.  I had to do it manually as the
patch for 2_3_branch is somewhat different.  Could you verify the patch?  It
would be nice to have a unit test demonstrating this problem exists and was
fixed!  I have added you to project.xml as well.

Eric

> -----Original Message-----
> From: Sam Solon [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 09, 2004 7:01 PM
> To: [EMAIL PROTECTED]
> Subject: [PATCH] IntakeTool remove method
>
>
> I found a problem with the "remove" method in IntakeTool that is
> triggered by a "removeAll".
>
> When there is more than one instance of a group and a "removeAll" is
> done the "remove" method is called for each of the instances of the
> group. If a mutiply instantiated group is the last one to be removed,
> it's parameter entries will already have been removed and "getStrings"
> returns null, which is not being handled in the code.
>
> I made the following patch against anoncvs TURBINE_2_3_BRANCH
>
> Index: IntakeTool.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/serv
> ices/intake/IntakeTool.java,v
> retrieving revision 1.17.2.2
> diff -u -r1.17.2.2 IntakeTool.java
> --- IntakeTool.java     27 Feb 2004 05:48:51 -0000      1.17.2.2
> +++ IntakeTool.java     27 Apr 2004 23:21:21 -0000
> @@ -406,14 +406,17 @@
>
>              pp.remove(INTAKE_GRP);
>
> -            for (int i = 0; i < groupKeys.length; i++)
> -            {
> -                if (!groupKeys[i].equals(group.getGID()))
> -                {
> -                    pp.add(INTAKE_GRP, groupKeys[i]);
> +           if (groupKeys != null)
> +           {
> +               for (int i = 0; i < groupKeys.length; i++)
> +               {
> +                           if (!groupKeys[i].equals(group.getGID()))
> +                           {
> +                       pp.add(INTAKE_GRP, groupKeys[i]);
> +                    }
>                  }
> -            }
> -
> +            }
> +
>              try
>              {
>                  TurbineIntake.releaseGroup(group);
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to