Skip to content

Conversation

greg-at-moderne
Copy link
Contributor

@greg-at-moderne greg-at-moderne commented Jul 25, 2025

@greg-at-moderne greg-at-moderne self-assigned this Jul 25, 2025
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Jul 25, 2025
if (type instanceof JavaType.Array) {
JavaType.Array arrayType = (JavaType.Array) type;
return arrayType.getElemType();
} else if (type instanceof JavaType.Parameterized) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if (type instanceof JavaType.Parameterized) {
}
if (type instanceof JavaType.Parameterized) {

Comment on lines +261 to +262
} else if (type instanceof JavaType.Primitive) {
return type.toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if (type instanceof JavaType.Primitive) {
return type.toString();
}
if (type instanceof JavaType.Primitive) {
}
if (type instanceof JavaType.GenericTypeVariable) {

@timtebeek timtebeek changed the title Revert "Remove UseForEachLoop" Restore UseForEachLoop Jul 26, 2025
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.

Recipe to use for-each kind of a loop when iterating over a collection Recipe: for loop can be replaced with enhanced for
1 participant