mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8297311: Improve exception message thrown by java.net.HostPortrange::toLowerCase(String s)
Reviewed-by: dfuchs, michaelm, rriggs
This commit is contained in:
parent
defe0607e3
commit
9ced2ea0ab
2 changed files with 59 additions and 1 deletions
|
@ -186,7 +186,8 @@ class HostPortrange {
|
|||
}
|
||||
sb.append((char)(c - CASE_DIFF));
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid characters in hostname");
|
||||
final String message = String.format("Invalid character \\u%04x in hostname", (int) c);
|
||||
throw new IllegalArgumentException(message);
|
||||
}
|
||||
}
|
||||
return sb == null ? s : sb.toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue