[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] NPE when cloning Global



Peter Antman wrote:

Hi,
I am back, trying to update the k2 adapter to the latest JBoss stuff,
but I have som problems with the current version in cvs:

When doing like this:

Global g = Global.instance();
Global myGlobal = g.getClone(null);

I get an NPE in intialization of Property (this is verrifyable by
running the SubscribeXPathTest:

       at org.jutils.init.Property.clone(Property.java:356)
       at org.xmlBlaster.util.Global.clone(Global.java:610)
       at org.xmlBlaster.util.Global.getClone(Global.java:592)
       at clustertest.ServerHelper.initHeron(ServerHelper.java:86)
       at clustertest.ServerHelper.setUp(ServerHelper.java:191)
       at clustertest.ServerHelper.<init>(ServerHelper.java:45)
       at clustertest.SubscribeXPathTest.setUp(SubscribeXPathTest.java:62)

Its the tree map in property that us not set yet when the clone is done:

p.jutilsMap = (TreeMap)((TreeMap)this.jutilsMap).clone();

Should I fix this. Or do you do it, or is it an incorrect way of using
Global?

p.jutilsMap = this.jutilsMap != null ? (TreeMap)((TreeMap)this.jutilsMap).clone():null;


//Peter


Peter, nice you came back.
Please fix it yourself.
When do you plan to work/finish on it?
We could wait with release 0.80 until you are ready.
Note that we have session support now in xmlBlaster.

regards,

Marcel