[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NullPointerException in WizardStore
Hi,
> I get a Nullpointerexception in Wizardstore.
> The bug is, in containerForName:
> If ta==NULL, I get Nullpointerexception here /*1*/. The /*2*/ is not
> reached.
>
>
> public synchronized ObjectContainer containerForName (Transaction ta,
> String name)
> throws Exception {
> if (name == null)
> return null;
I suggest to drop this line,
> TransactionData taData = (TransactionData)ta.data; /*1*/
replace this line:
> if (ta == null /*2*/ || taData.nameTable == null) {
with:
if (ta == null /*2*/ || ((TransactionData)ta.data) == null) {
> ObjectID oid = (ObjectID)nameTable.elementForKey (name);
> return oid != null ? containerForID (ta, oid) : null;
> }
>
> if (ta != null) {
and this line with:
> ObjectID oid = (ObjectID)taData.nameTable.elementForKey
> (name);
ObjectID oid =(ObjectID)(TransactionData)ta.data).name...
> return (oid != null) ? containerForID (ta, oid) : null;
> }
> return null;
> }
> Does someone know how to fix it?
This is of course only a workaround. I guess Falko will make a better fix when
he is back from the Exolab Session.
Regards,
Gerd
--
________________________________________________________________
Gerd Mueller gerd@softwarebuero.de
softwarebuero m&b http://www.softwarebuero.de