Repository navigation
[java] Fix #6867: Handle module imports in UnnecessaryFullyQualifiedName - #6868
Merged
Merged
Conversation
DragonFSKY
marked this pull request as ready for review
July 13, 2026 18:29
Contributor
|
(comment created at 2026-07-29 19:11:51+00:00 for b2aa545) |
…edName Signed-off-by: DragonFSKY <[email protected]>
DragonFSKY
force-pushed
the
fix/6867-module-import-scope
branch
from
July 17, 2026 09:41
eb22ebc to
6d968d7
Compare
UncleOwen
reviewed
Jul 20, 2026
# Conflicts: # docs/pages/release_notes.md
We always run the regression tests with the latest java version unless something different is specified.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the PR
UnnecessaryFullyQualifiedNamecould crash when reporting a type made availablethrough a module import because the rule did not handle the
MODULE_IMPORTscope. The module-import resolver also returned only the first matching type,
which discarded ambiguity when multiple imported modules exported types with
the same simple name.
This PR changes the module-import resolver to collect all matching exported
types, so ambiguous names are preserved and do not produce false positives. It
also adds reporting reasons for module imports and compact compilation units.
Regression coverage includes unambiguous module imports, ambiguous types across
modules and within one module, and implicit imports in compact compilation
units. A release-note entry is included as well.
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)