[Spoon-discuss] Bug with enums

Lionel Seinturier Lionel.Seinturier at univ-lille1.fr
Wed Apr 1 14:24:00 CEST 2009


Hi Renaud,

Patch committed.

I'm not sure whether I can close the bug on the forge (I haven't been
able to find the option on the forge, sorry.) I let you do that.

Lionel.

On 01/04/2009 11:43, Renaud Pawlak wrote:
> Please do :)
> 
> Thanks!
> /Renaud
> 
> On Wed, Apr 1, 2009 at 8:21 AM, Lionel Seinturier
> <Lionel.Seinturier at univ-lille1.fr> wrote:
>> Dear all,
>>
>> I'm proposing the attached patch for bug:
>>
>> https://gforge.inria.fr/tracker/index.php?func=detail&aid=7291&group_id=73&atid=371
>>
>> I've run the examples and the patch does not seem to introduce regression.
>>
>> Does anymore mind if I commit the patch in trunk/spoon-core?
>>
>> Lionel.
>> --
>> Lionel Seinturier
>> Univ. Lille - Lab. LIFL - INRIA ADAM
>> http://www.lifl.fr/~seinturi
>>
>>
>> Index: src/main/java/spoon/reflect/visitor/DefaultJavaPrettyPrinter.java
>> ===================================================================
>> --- src/main/java/spoon/reflect/visitor/DefaultJavaPrettyPrinter.java
>> (revision 2033)
>> +++ src/main/java/spoon/reflect/visitor/DefaultJavaPrettyPrinter.java
>> (working copy)
>> @@ -816,7 +816,13 @@
>>                if (f.getDefaultExpression() != null) {
>>                        CtNewClass<?> nc = (CtNewClass<?>)
>> f.getDefaultExpression();
>>                        if (nc.getArguments().size() > 0) {
>> -                               write("(" + nc.getArguments().get(0) + ")");
>> +                               write("(");
>> +                               boolean first=true;
>> +                               for (CtExpression<?> ctexpr :
>> nc.getArguments()) {
>> +                                       if(first) first=false; else
>> write(",");
>> +                                       write(ctexpr.toString());
>> +                               }
>> +                               write(")");
>>                        }
>>                        scan(nc.getAnonymousClass());
>>                }
>>
>> _______________________________________________
>> Spoon-discuss mailing list
>> Spoon-discuss at lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/spoon-discuss
>>
> 
> 
> 

-- 
Lionel Seinturier
Univ. Lille - Lab. LIFL - INRIA ADAM
http://www.lifl.fr/~seinturi





More information about the Spoon-discuss mailing list