eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Bug 541383 - module deprecation may not be detected against SourceModuleBinding
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
From https://bugs.eclipse.org/bugs/show_bug.cgi?id=541383
> ModuleDeclaration.analyseModuleGraph(CompilationUnitScope) may not detect that a required SourceModuleBinding is deprecated, because ensureAnnotationsResolved() may not have run at that point in time.
>
> To wit: use Deprecated9Test.testBug533063_2() (as proposed via https://git.eclipse.org/r/#/c/132799/) remove the line this.moduleMap.clear() and watch the test fail.
>
> Insert requiredModule.getAnnotationTagBits() before asking isDeprecated() and see it pass again. Could such a call influence compilation order in unwanted ways?
>
> In fact, SourceModuleBinding.isDeprecated() may want to call ensureAnnotationsResolved() for good measure.
The mentioned change to Deprecated9Test.testBug533063_2() still reproduces the issue.
Contributor guide
Assessment
This issue has not been assessed yet.