class ValLub { public void easyLub() { java.util.Map m = java.util.Collections.emptyMap(); lombok.val foo = (System.currentTimeMillis() > 0) ? m : java.util.Collections.emptyMap(); } public void sillyLubWithUnboxingThatProducesErrorThatVarIsPrimitive() { Integer i = 20; Double d = 20.0; lombok.val thisShouldBePrimitiveDouble = (System.currentTimeMillis() > 0) ? i : d; } public void hardLub() { java.util.List list = new java.util.ArrayList(); java.util.Set set = new java.util.HashSet(); lombok.val thisShouldBeCollection = (System.currentTimeMillis() > 0) ? list : set; thisShouldBeCollection.add(""); String foo = thisShouldBeCollection.iterator().next(); } }