Community
Participate
Working Groups
Observed while testing https://git.eclipse.org/r/#/c/131471/ (1) The type hierarchy for java.io.Serializable initially contained no subtypes. (2) I created "public class C1 implements Serializable" and now 8 subtypes (including C1) were found. (3) Delete C1.java, and now 7 subtypes are found. (4) Close the project then re-open (5) = (1) In all this the workspace only contained one modular project: module-info.java plus one interface. It didn't matter whether newTypeHierarchy() passed the current IJavaProject or not.
While debugging a different issue I observed that HierarchyResolver.setFocusType() has a problem: this.lookupEnvironment.getCachedType(compoundName) may return null because that method is not module-aware, then this.lookupEnvironment.askForType(..) may trip into reporting ProblemReporter.duplicateTypes() because the sought type did already exist. In that particular situation this didn't cause any harm (askForType did answer a valid binding), but perhaps there's still a connection to this bug?
(In reply to Stephan Herrmann from comment #0) > Observed while testing https://git.eclipse.org/r/#/c/131471/ > > (1) The type hierarchy for java.io.Serializable initially contained no > subtypes. > > (2) I created "public class C1 implements Serializable" and now 8 subtypes > (including C1) were found. > > (3) Delete C1.java, and now 7 subtypes are found. > > (4) Close the project then re-open > > (5) = (1) This could probably be explained by one observation in bug 541217 comment 6: types are associated to a module only when they were present as working copies. Creating C1 perhaps pulled in some more types as working copies, which were only discarded when the project was closed. Perhaps its all the same bug, but I'm not yet 100% sure.
Bulk move out of 4.11
I could no longer reproduce on HEAD, so assuming that bug 541217 indeed fixed it. *** This bug has been marked as a duplicate of bug 541217 ***