infinispan/infinispan — pull request #805 by maniksurtani (2012-01-09 17:39:02+00:00)
Title: Static analysis of 'core' module

* Remove redundant casts, unused variables and parameters
* Remove unnecessary breaks out of loops, return statements and local variables
* Simplify conditions, bitwise operations and boolean constructs
* Static methods where sensible
* Remove redundant initializers
* Static inner classes where possible
* Foreach loops and JDK provided utils for array and collection copying where possible
* Provide size initializers for collections where possible

This patch is guaranteed to give anyone reading it a headache! Essentially, I've used my IDE's static code analysis tools on the core module and have addressed what I thought was sensible. Most of it is stylistic, or minor performance tweaks such as removing redundant or unused variables, initializing collections properly or removing manual array/collection copying.