Community
Participate
Working Groups
I20051213-0010 From bug 120570. ICompilationUnit.findPrimaryType(..) should not throw an internal AFE it the target CU has an invalid CU name. Rather, it should return null. org.eclipse.jdt.internal.core.Assert$AssertionFailedException: Assertion failed; The source type has an invalid name: A.B at org.eclipse.jdt.internal.core.Assert.isTrue(Assert.java:89) at org.eclipse.jdt.internal.core.SourceType.<init>(SourceType.java:43) at org.eclipse.jdt.internal.core.CompilationUnit.getType(CompilationUnit.java:831) at org.eclipse.jdt.internal.core.CompilationUnit.findPrimaryType(CompilationUnit.java:531) ...
Good fine ! Thanks. Need to check all senders of Util.getNameWithoutJavaLikeExtension(String) ...
Changed SourceType constructor to not throw an IAE any longer and verified that all senders of Util.getNameWithoutJavaLikeExtension(String) are behaving correctly. Added regression test CompilationUnitTests#testFindPrimaryType2(). Released for 3.3 M1 in HEAD.
Verified for 3.3 M1 using build I20060807-0010