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 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>
Took the code from the patch submitted by Mario Ivankovits
in bug 520597 and made some improvements to make (hopefully)
better use of memory. Some basic tests added.
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...)
Progress on: Bug 126328: IlegalStateException : zip file closed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=126328
closes the loop hole with >1000 jars, and adds some extra sanity checks on potentially closed zip files (tested that the call is cheap) to give better error messages.
This is the beginning of a significant refactoring needed to cleanly support generics. We need to be much crisper about when we have an unresolved type (plain old TypeX) and when we have a resolved type. This refactoring renames TypeX to UnresolvedType and ResolvedTypeX to ResolvedType. In addition, it moves a number of methods that were defined on TypeX but which can only be answered by resolved types down onto ResolvedType. At the moment, ResolvedType still extends UnresolvedType - but a ResolvedType is *not* a UnresolvedType and this inheritance of convenience will be broken down the line so that ResolvedType does not extend UnresolvedType. Full signature information can only be known for ResolvedTypes.
Some more fixes for Bug 78954: Compiler cannot cope with 4000 jars on the classpath.
- ClassPathManager can now manage its set of open archives, rather than being 'unlimited' it now limits itself to 1000 open archives (which can be increased via a sys prop).
- BcelWorld is changed to add a tidy up method that can tell class path manager to close its archives (useful for the IDE)
- BcelWorld is also changed to ensure 'it' is the repository used to resolve classes, there were previously some situations where BCEL would start loading classes itself (creating duplicates in memory of things like java/lang/String etc). I'm not sure if this will alter our performance/memory characteristics.