If autounboxing had worked also when doing equality checking with the '==' operator you could write:
Long notNullSafeLong1 = new Long(11L)
Long notNullSafeLong2 = new Long(22L)
if ( notNullSafeLong1 == notNullSafeLong2) {
do suff
This would require implementing an override for == so that null==someLong is false and the special case Null==Null is true. Instead we have to use equal() and test for null
Long notNullSafeLong1 = new Long(11L)
Long notNullSafeLong2 = new Long(22L)
if ( (notNullSafeLong1 == null && notNullSafeLong2 == null) ||
(notNullSafeLong1 != null && notNullSafeLong2 != null &
notNullSafeLong1.equals(notNullSafeLong2)) {
do suff
This is alittle more verbose than the first example - if autounboxing had worked for the '==' operator.