Bug 546879 - [9][model] clarify if module description for auto module exists()
Summary: [9][model] clarify if module description for auto module exists()
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug bulk move
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 15:54 EDT by Stephan Herrmann CLA
Modified: 2022-09-07 08:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2019-04-30 15:54:42 EDT
Checking validity of an IModuleDescription for an auto module has some surprises:

Auto modules never exists() because it cannot find an element info (since this thing is purely synthetic).

If some build path references a project root as a class folder (see bug 546877) then asking for its auto module will return a handle where getElementName() returns "" (because an library IPackageFragmentRoot pointing to a project has no name).

Also: In the situation of bug 546877, if both projects have module-info and B/src/module-info.java says "requires A", then this resolves to the *automatic* module A, although no automatic module with that name exists.

At least the case of an auto module with empty name should be avoided, I believe. Maybe AutoModule.exists() should answer !this.name.isEmpty() (e.g., all auto modules with a valid name exist).
Comment 1 Manoj N Palat CLA 2019-08-27 02:06:15 EDT
Bulk move out of 4.13
Comment 2 Eclipse Genie CLA 2022-09-07 08:47:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.