Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348447

Summary: NPE if an exception is thrown by the SchemaResolver.
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: Denise Smith <denise.mahar>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.sdo-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed changes and updated test none

Description Denise Smith CLA 2011-06-06 14:06:05 EDT
If an exception is thrown by a SchemaResolver when processing an import or include we return null (Schema) in the SDOTypesGenerator.getSchema method.  A little further along a NullPointerException will be thrown due to that null Schema.

If an exception occurs in the SchemaResolver we should let the processing fail or catch it and throw a useful SDOException.   If a user wishes for us to skip an import/include and continue with processing then their SchemaResolver needs to return null and not throw an exception.

We should also update the javadoc on SchemaResolver to clearly explain this.
Comment 1 Denise Smith CLA 2011-06-07 10:38:49 EDT
Created attachment 197501 [details]
Proposed changes and updated test
Comment 2 Denise Smith CLA 2011-06-07 11:21:42 EDT
Checked in fix as described  so that we don't swallow any exceptions that were thrown from the schemaresolver.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:10:28 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink