Le 17/03/2012 12:41, sebb a écrit :
Eclipse complains about implicit boxing.But that's not why - I changed it because it makes the extra processing explicit. We're trying to make the code efficient, so using explicit conversions means we can review whether the conversion is necessary or could be avoided. Leaving the explicit conversion in the code shows that we did intend to do the conversion.
Should we code directly in bytecode to make the code even more explicit? Will we keep using inner classes when Java 8 lamba are available to make the code more explicit?
I tend to avoid magic syntax when it's ambiguous, but a trivial unboxing to access an array element is really harmless. That's the perfect example why this syntax was introduced in Java 5: to improve the readability.
Emmanuel Bourg
smime.p7s
Description: S/MIME Cryptographic Signature