File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
core/src/main/java/com/exadel/etoolbox/anydiff/comparison Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2020import org .apache .commons .lang3 .StringUtils ;
2121
2222import java .util .ArrayList ;
23- import java .util .Collections ;
2423import java .util .List ;
2524
2625/**
@@ -36,7 +35,10 @@ class TokenizerUtil {
3635 */
3736 static List <String > getTokens (String value ) {
3837 if (StringUtils .isBlank (value )) {
39- return Collections .singletonList (StringUtils .defaultString (value ));
38+ // We need a modifiable list here because {@link DiffRowGenerator} manipulates it
39+ List <String > singletonList = new ArrayList <>();
40+ singletonList .add (StringUtils .defaultString (value ));
41+ return singletonList ;
4042 }
4143 List <String > split = new ArrayList <>();
4244 StringBuilder builder = new StringBuilder ().append (value .charAt (0 ));
You can’t perform that action at this time.
0 commit comments