Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345781 - NPEs in structural compare due to TypedElement.getType() returning null
Summary: NPEs in structural compare due to TypedElement.getType() returning null
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 16:00 EDT by Justin Spadea CLA
Modified: 2017-02-23 14:16 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2011-05-13 16:00:20 EDT
There are a few automated JUnits failing from this, here's the steps for one of them (hopefully it's all the same underlying issue):

1. Turn off autobuild

2. Create file.egl in the default package, with:
import pack2.Record2;

record Record1
    item1 Record2;
end

3. Build the project, get expected error markers since Record2 doesn't exist yet.

4. Create new package "pack2"

5. Create file2.egl in pack2, with:
package pack2;

Record Record2
end

6. Build the project, error markers go away

7. Delete file2.egl

8. Build the project - get NPE because the record's field.getType() returns null.

java.lang.NullPointerException
	at org.eclipse.edt.mof.egl.utils.TypeUtils.areStructurallyEquivalent(TypeUtils.java:372)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.processCompiledPart(AbstractProcessingQueue.java:226)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:172)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)



I've seen a similar NPE thrown at line 429. Try to build:

function tlf1()
end

library tlfs{includeReferencedFunctions=yes}
	function test()
		i int;
		tlf1();
	end
end
Comment 1 Justin Spadea CLA 2011-07-15 13:38:15 EDT
This appears to no longer be a problem. I know some NPE fixes were made in this code a while back which must have solved this bug.
Comment 2 Justin Spadea CLA 2011-09-08 14:35:19 EDT
Verified