[classad-users] java nullpointer exception


Date: Thu, 8 May 2003 11:56:35 -0500 (CDT)
From: Alessandro Maraschini <alessandro.maraschini@xxxxxxxxxx>
Subject: [classad-users] java nullpointer exception
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/




[← Prev in Thread] Current Thread [Next in Thread→]