Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315090 - [JavaTypes] Resolve types lazily
Summary: [JavaTypes] Resolve types lazily
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 10:50 EDT by Sebastian Zarnekow CLA
Modified: 2013-08-23 07:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Zarnekow CLA 2010-05-31 10:50:50 EDT
Assuming the following scenario:

class Foo {
  private UnknownType unusedField;
  private String usedField;
}

The class foo is contained in a referenced bundle while the UnknownType is not available. As the field is never read, there won't be any problems at runtime. However, the class-loader based implementation will call type.getDeclaredFields which in turn will throw an undocumented NoClassDefFoundError. As there is no way to query the declared fields individually, there won't be any information about any field of Foo available, if the NoClassDefFoundError were caught.

I'm currently not aware of a robust strategy that provides a lot information about the types and still does not crash on an incomplete class-path.