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.
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 untypedsize
method check the type of the expression on whichsize()
is called, and check a type method such asadd
to find the actual element type.