Skip to content

Commit

Permalink
Fix LoadIdnaTest for the new ""
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Sep 12, 2024
1 parent cd42306 commit 1fe6407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unicodetools/src/main/java/org/unicode/idna/LoadIdnaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private TestLine(String test) {

// type = Type.valueOf(parts.get(0));
try {
source = fromHex.transform(parts.get(col++));
source = getWithFallback(fromHex.transform(parts.get(col++)), "");

toUnicode = getWithFallback(fromHex.transform(parts.get(col++)), source);
toUnicodeErrors = parseEnumSet(parts.get(col++));
Expand Down Expand Up @@ -135,7 +135,7 @@ private Set<Errors> parseEnumSet(String toUnicodeRaw) {
}

private String getWithFallback(String string, String fallback) {
return string.isEmpty() ? fallback : string;
return string.isEmpty() ? fallback : string.equals("\"\"") ? "" : string;
}

@Override
Expand Down

0 comments on commit 1fe6407

Please sign in to comment.