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

Bug 424900

Summary: [java8] Circular dependencies cause NPE in BinaryTypeBinding.sortFields
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.2.1   
Target Milestone: 2.4 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 416781    

Description Stephan Herrmann CLA 2014-01-05 10:55:10 EST
Test CompilationOrder.testB21_circularDependency1() currently throws an NPE during sortFields because:

- class A is still creating its fields, current is the cache field
- creating the field's type requires to create the unannotated version of A$Q
- TypeSystem.getUnannotatedType() needs to resolve this type
- this triggers loading A$Q
- loading includes reading its "playedBy" attribute
- the playedBy attribute mentions a dependent type with A.b as its anchor
- field A.b needs to be looked up
- field lookup needs sorting
- sorting throws NPE because not all fields have been created yet.

I'm disabling this test for now.
Comment 1 Stephan Herrmann CLA 2015-05-02 18:38:31 EDT
Problem no longer occurs, assumably due to fix for bug 461250.

Test re-enabled via commit 0aa17c5150a7187d681438c4a1f265260617dbd5.

*** This bug has been marked as a duplicate of bug 461250 ***