Skip to Content
0
Former Member
Sep 08, 2010 at 11:46 AM

Null pointer exception

33 Views

Dear SDN,

I am trying to retrieve the attribute value of an attribute by using the following line of code

wdContext.nodenumberABC().getCurrentElement().getAttributeValue("number1").toString();

if when there is some value in the attribute it is able to retrieve the value, but when there is no value it is throwing the nullpointer exception.

I tried using try and catch to get hold of this but application is having poor performance taking some time to load.

can somebody please point me in a correct way of handling the null values without effecting the performance of the application

Appriciate your help

Thanks

RAD