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.
From: https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator/issues/748
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.