Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348447 - NPE if an exception is thrown by the SchemaResolver.
Summary: NPE if an exception is thrown by the SchemaResolver.
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: 2011-06-06 14:06 EDT by Denise Smith CLA
Modified: 2022-06-09 10:10 EDT (History)
1 user (show)

See Also:


Attachments
Proposed changes and updated test (6.06 KB, patch)
2011-06-07 10:38 EDT, 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 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