Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Reports Collection.addAll() and Map.putAll() calls after instantiation of a collection using a constructor call without arguments. Such constructs can be replaced with a single call to a parametrized constructor which simplifies code. Also for some collections the replacement might be more performant.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
'String.indexOf()' expression is replaceable with 'contains()'
Reports any String.indexOf() expressions which can be replaced with a call to the String.contains() method available in Java 5 and newer.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Reports for loops which iterate over collections or arrays, and can be replaced with an enhanced for loop (i.e. the foreach iteration syntax).
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
fixes for 137235 (contributed by Ron): more intelligent logic for determining if a path entry is a jar/zip (don't just rely on suffix, some new .bndl files seem to be becoming popular...)
Use ant's TaskLogger for all output from our task, rather than writing directly to sys out / err. This commit also fixes the issue that running ant -verbose did not produce verbose output from iajc (it does now). I ran into this with a client yesterday, and it had me stumped for a while!