Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.98.0, 1.0.0
-
None
-
The Result.EMPTY_RESULT object is now immutable. In previous releases, the object could be modified by a caller to no longer be empty. Code that relies on this behavior will now receive an UnsupportedOperationException.
Description
Again from larsgeorge
Result result2 = Result.EMPTY_RESULT;
System.out.println(result2);
result2.copyFrom(result1);
System.out.println(result2);
"What do you think happens when result1 has cells? Yep, you just modified the shared public EMPTY_RESULT to be not empty anymore."
Fix. Result should be non-modifiable post-construction.