Comment Re:Here's Oracle's Example (Score 1) 675
- Examining Exhibit J, I believe the Android implementation was copy-pasted from Sun's. In fact, it was a pretty lousy, newbie-ish job trying to mask it.
Just looking at the bad parameters and local variable names makes me want to punch the idiot who named them. And what's with all the magic numbers hard-coded? On the other hand, I praise the Sun developers for their implementation.
About the iteration structures, I also prefer using the for iterator instead of a while structure, it makes more sense when you want to scope the variable. Unfortunately the structure becomes a bit top-heavy with all the inlining. - Examining Exhibit I, I'd first ask what is the problem. API documentations should be one and the same, it's a standardization FFS! The only strange thing I find with that Javadoc, is why java.security.Security is a java class, and not a java interface.
You could argue that the class design is really trivial, and how two different implementation could be identical under the KISS principle, but it's really hard to believe it's a clean room implementation. It's a bastardized version of Sun's code.