File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
lib/src/main/java/com/diffplug/spotless Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -34,30 +34,27 @@ class ValuePerStep<T> extends AbstractList<T> {
34
34
}
35
35
36
36
@ Override
37
- public @ Nullable T set (int index , T exception ) {
37
+ public @ Nullable T set (int index , T newValue ) {
38
38
if (index < 0 || index >= size ) {
39
39
throw new IndexOutOfBoundsException ("Index: " + index + ", Size: " + size );
40
40
}
41
41
if (this .value == null ) {
42
42
this .valueIdx = index ;
43
- this .value = exception ;
43
+ this .value = newValue ;
44
44
return null ;
45
45
} else if (this .multipleValues != null ) {
46
46
T previousValue = (T ) multipleValues [index ];
47
- multipleValues [index ] = exception ;
47
+ multipleValues [index ] = newValue ;
48
48
return previousValue ;
49
49
} else {
50
50
if (index == valueIdx ) {
51
51
T previousValue = this .value ;
52
- this .value = exception ;
52
+ this .value = newValue ;
53
53
return previousValue ;
54
- } else if (value == null ) {
55
- // everything is assumed null anyway so we don't need to do anything
56
- return null ;
57
54
} else {
58
55
multipleValues = new Object [size ];
59
56
multipleValues [valueIdx ] = this .value ;
60
- multipleValues [index ] = exception ;
57
+ multipleValues [index ] = newValue ;
61
58
return null ;
62
59
}
63
60
}
You can’t perform that action at this time.
0 commit comments