Review request: 8003562: Provide a command-line tool to find static dependencies (original) (raw)
Ulf Zibis Ulf.Zibis at CoSoCo.de
Sat Dec 15 00:35:00 UTC 2012
- Previous message: Review request: 8003562: Provide a command-line tool to find static dependencies
- Next message: Review request: 8003562: Provide a command-line tool to find static dependencies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for your explanations Mandy.
Am 14.12.2012 21:54, schrieb Mandy Chung:
On 12/14/2012 3:54 AM, Ulf Zibis wrote: In many places the source is exhausting to read, e.g if (f.exists()) { ClassFileReader reader = ClassFileReader.newInstance(f); Archive archive = new Archive(f, reader); result.add(archive); } could simply be: if (f.exists()) result.add(new Archive(f, ClassFileReader.newInstance(f)));
... also spreading around the variable definitions at different places. Fixed.
Other examples:
484 while (arg != null) { ... 490 arg = iter.hasNext() ? iter.next() : null; 491 } Could be: 484 for (; iter.hasNext(); arg = iter.next()) { ... 491 }
224 Dependency.Finder finder = Dependencies.getClassDependencyFinder(); ... 238 findDependencies(finder, filter); ... 273 private void findDependencies(Dependency.Finder finder, 274 Dependency.Filter filter) Could be: 238 findDependencies(filter); ... 273 private void findDependencies(Dependency.Filter filter) { 274 Dependency.Finder finder = Dependencies.getClassDependencyFinder(); at least remove line 224 and use: 238 findDependencies(Dependencies.getClassDependencyFinder(), filter);
-Ulf
- Previous message: Review request: 8003562: Provide a command-line tool to find static dependencies
- Next message: Review request: 8003562: Provide a command-line tool to find static dependencies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]