function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
geosowgeosow 

Winter '12 Issue - NullPointerException with dom.Xmlnode.getText()

I have an issue in my sandbox that was moved to Winter '12 over this last weekend.  The following code does not throw an error in the Summer '11 production org.  I could add a try/catch but I'm wondering if this is a glimpse into bigger problems with the dom class?  Any thoughts?

for (dom.Xmlnode x:parent.getChildElements()) {
      	   
   if (x.getText() == 'shipping_address') {system.debug('*****found shipping*****'); foundShipping = true;}

}

//x.getText() throws a System.NullPointerException in Winter'12 but not in Summer'11

 

Best Answer chosen by Admin (Salesforce Developers) 
geosowgeosow

Hi Ryan,

 

The NullPointerException in our Winter '12 sandbox continued until mid-day on Tuesday (9/20).  We could test successfully in our production org.  On Wednesday the issue seems to be resolved.  I didn't change anything so I'm assuming it was a push fix to the sandbox?  Anyhow, this is resolved.  Thanks.

All Answers

spraetzspraetz

Need some more information.  Could you please log a case?

geosowgeosow

Hi Ryan,

 

The NullPointerException in our Winter '12 sandbox continued until mid-day on Tuesday (9/20).  We could test successfully in our production org.  On Wednesday the issue seems to be resolved.  I didn't change anything so I'm assuming it was a push fix to the sandbox?  Anyhow, this is resolved.  Thanks.

This was selected as the best answer
spraetzspraetz

Yeah, it may have been resolved in yesterday's patch.