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

ConvertForLoopOperation cannot work with Javac #748

Closed
mickaelistria opened this issue Aug 26, 2024 · 3 comments
Closed

ConvertForLoopOperation cannot work with Javac #748

mickaelistria opened this issue Aug 26, 2024 · 3 comments

Comments

@mickaelistria
Copy link

ConvertForLoopOperation uses the type of .size() method on collections to determine the type. While it's fine with JDT, Javac does not consider the type argument in the .size() method, simply because the method is always the same, so it doesn't make sense to create such separation.
The ConvertForLoopOperation could instead of this untyped size method check the type of the expression on which size() is called, and check a type method such as add to find the actual element type.

@akurtakov
Copy link

Is this smth for @jjohnstn to look at ?

@jjohnstn
Copy link

jjohnstn commented Sep 9, 2024

@mickaelistria Can this be closed now that the JDT patch has been merged?

@mickaelistria
Copy link
Author

yes, thanks!

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

No branches or pull requests

3 participants