Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370267 - NULLPOINTER OCCURS FROM STAX SPACE EVENT CALL TO UNMARSHALRECORD CHARACTERS
Summary: NULLPOINTER OCCURS FROM STAX SPACE EVENT CALL TO UNMARSHALRECORD CHARACTERS
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Denise Smith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 14:42 EST by Denise Smith CLA
Modified: 2022-06-09 10:07 EDT (History)
0 users

See Also:


Attachments
Proposed changes (9.60 KB, patch)
2012-01-31 14:47 EST, Denise Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denise Smith CLA 2012-01-31 14:42:05 EST
If there are comments/spaces after the <?xml version="1.0"?> but before the first startelement event then a nullpointer can occur.  This is because everything on unmarshalrecord is typically initialized on the first start element so in the characters event that gets called there can be a null unmarshalContext

 at 
org.eclipse.persistence.oxm.record.UnmarshalRecord.characters(UnmarshalRecord.java:1034)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parseEvent(XMLStreamReaderReader.java:152)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:83)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:72)
    at 
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:847)
    at 
org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:626)
    at
Comment 1 Denise Smith CLA 2012-01-31 14:47:33 EST
Created attachment 210331 [details]
Proposed changes
Comment 2 Denise Smith CLA 2012-02-01 13:21:52 EST
Fixed to handle this case in characters method of UnmarshalRecord.  Checked in to 2.3.3 and trunk
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:07:38 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink