Skip to content

Commit e5bf2fe

Browse files
committed
Align comments with Unicode character they describe
1 parent c3fe756 commit e5bf2fe

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,11 +2234,12 @@ static String unicodeToASCII(String input) {
22342234
// (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61
22352235
// (halfwidth ideographic full stop).
22362236
char lastChar = input.charAt(length - 1); // fetch original last char
2237-
return switch (lastChar) { // "." full stop
2238-
// ideographic full stop
2239-
// fullwidth full stop
2240-
case '\u002E', '\u3002', '\uFF0E', '\uFF61' -> // halfwidth ideographic full stop
2241-
ascii + "."; // restore the missing stop
2237+
return switch (lastChar) {
2238+
case '\u002E', // "." full stop
2239+
'\u3002', // ideographic full stop
2240+
'\uFF0E', // fullwidth full stop
2241+
'\uFF61' // halfwidth ideographic full stop
2242+
-> ascii + "."; // restore the missing stop
22422243
default -> ascii;
22432244
};
22442245
} catch (IllegalArgumentException e) { // input is not valid

0 commit comments

Comments
 (0)