lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earwin Burrfoot <>
Subject Java5 migration
Date Wed, 07 Oct 2009 23:44:20 GMT
I intend to fire up IDEA, run java5-specific code inspections and fix
whatever it finds, something automatically (with manual review
afterwards), something by hand.

1. Replace for/while loops that go through arrays/lists by index, or
through collections by iterators with for-each loops.
This just looks cleaner, no matter the case.

2. Remove explicit boxing-unboxing.
Autoboxing looks cleaner and has identical behaviour/performance (eg
autoboxing calls the very same Number.valueOf methods we just migrated

3. Parameterized classes without type parameters.
Some stuff was already converted, but I'd like the sources to be consistent.
I do not intend to add type parameters to the classes that don't have
them, only fix usage for those that already do (collections,
threadlocals I guess)

4. API migrations IDEA can detect for us, eg - Collections.EMPTY_* ->
Collections.empty*(), .indexOf(...) >= 0 -> .contains(...)

Can I merge some of these into single patch? If after this, there's
more than one patch, what is their preferred order?
And most important - is this needed right now? Are there any big
pending commits that will inevitably clash?

Kirill Zakharenko/Кирилл Захаренко (
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message