Community
Participate
Working Groups
Build ID: I20090515-1143 Steps To Reproduce: 1. Configure the JDT to report "Boxing and unboxing conversions", at least to warning level. 2. Write: > Boolean boxed = true; > boolean unboxed = Boolean.TRUE; 3. Check that none of the proposed quick fixes actually fixes the problem. More information: I would like to have the following fixes available: When autoboxing (Boolean boxed = true;): * Box manually > Boolean boxed = Boolean.valueOf(true); In cases where it is possible, it would be nice to be able to replace the described line with a more natural: > Boolean boxed = Boolean.TRUE; When auto-unboxing (boolean unboxed = Boolean.TRUE) * Unbox manually > boolean unboxed = Boolean.TRUE.booleanValue(); Once again, it would be nice, in such a simple case, to simply have: > boolean unboxed = true; Though I have only covered the case of boolean/Boolean variables in this report, I have experienced similar problems with Integer/int and Long/long types, and would like to see similar solutions adopted for all auto types where autoboxing/unboxing applies.
*** This bug has been marked as a duplicate of bug 204352 ***