One Star

global map

It seems that when I call global map in tMap with ((Integer)globalMap.get("sipr")) it returns null pointer exception.
I insert variable into global Map from tJavaRow with globalMap.put("sipr",sipr); type is integer
any suggestions???
5 REPLIES
One Star

Re: global map

Hi,
That most likely means that the put has not been executed before the get, or the put has put a null sipr. You can verify this with the debugger.
Daniel
One Star

Re: global map

It probalby puts NULL. What do I do?
I am not a java programer so any hint to write a code would be nice.
Thank you
One Star

Re: global map

Hi Guys,
Yup, it returns null and you must handle the null value properly. You could put a condition like this :
((Integer)globalMap.get("sipr")) == null ? 0: ((Integer)globalMap.get("sipr"))
One Star

Re: global map

Thanks. It worked.
One Star

Re: global map

You're welcome :-)