Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify code in ReloadableJavaParserVisitor#visitVariables() #4263

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

knutwannheden
Copy link
Contributor

No description provided.

@knutwannheden knutwannheden marked this pull request as draft June 17, 2024 09:58
@knutwannheden
Copy link
Contributor Author

Converted to draft, as this should be replicated to other Java parser versions (assuming it works correctly).

Comment on lines +1590 to +1591
type != null ? type.getType() : null,
type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do the same for our Java 21 parser to carry this improvement forward?

J.Identifier name = new J.Identifier(randomId(), EMPTY, Markers.EMPTY, emptyList(), n.getName().toString(),
type instanceof JavaType.Variable ? ((JavaType.Variable) type).getType() : type,
type instanceof JavaType.Variable ? (JavaType.Variable) type : null);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah we posted the same insight in the same minute. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants