Alessandro,
Thanks for the bug report. It will be fixed in the next release of
the code. I don't have a release date set yet, but in the meantime,
there's a one-line fix. In condor/classad/ListExpr.java, at about line 61,
change
contents = new ArrayList(l);
to
contents = l == null ? new ArrayList(0) : new ArrayList(l);
Marvin
Marvin Solomon Professor
Computer Sciences Department University of Wisconsin
1210 W. Dayton St. Madison WI, 53706-1685, USA
(608) 263-2844 solomon@xxxxxxxxxxx
http://www.cs.wisc.edu/~solomon
Alessandro Maraschini wrote:
> Hi all,
> I'm using your classad1.1 java package and I found this strange
> behaviour:
>
> here follows a little test:
>
>
> String value = "{}";
>
> Expr toAdd = null ;
> System.out.println( "And the winner is.....");
> ClassAdParser cp = new ClassAdParser( value ) ;
> toAdd = cp.parse() ;
> if (toAdd!=null)
> System.out.println( toAdd );
> else
> System.out.println( "Sorry!\n" + cp.getErrorMsg() );
>
> and here is the output:
>
>
> And the winner is.....
> Exception in thread "main" java.lang.NullPointerException
> at java.util.ArrayList.<init>(ArrayList.java:128)
> at condor.classad.ListExpr.<init>(ListExpr.java:61)
> at condor.classad.Parser.parse(Parser.java:1007)
> at condor.classad.ClassAdParser.parse(ClassAdParser.java:240)
> at JobUiTest.<init>(JobUiTest.java:184)
> at JobUiTest.main(JobUiTest.java:507)
>
>
> ---
> While the same value "{}" is allowed and accepted by C++ classad
> library.
> Instead with the "[]" value not java nor c++ have any problem.
>
> Did you know this fact?
> Are you going to fix it (or did you already fix it) in the new release?
>
> thank you bye bye,
>
> Alessandro
>
>
>
> --
> ***
> Alessandro Maraschini
> GRID R&D Group
> Defence, Space & Environment Division
> DATAMAT S.p.A.
> Via Laurentina, 760 -I- 00143 Rome - Italy
> http://www.datamat.it
> mailto:alessandro.maraschini@xxxxxxxxxx
> Phone: +39 06 5027 4501
> Fax: +39 06 5027 2500
>
>
> Condor Classads Info:
> http://www.cs.wisc.edu/condor/classad/
Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/
|