--- a/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Thu Jun 07 09:30:42 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Thu Jun 07 13:46:22 2018 -0400
@@ -52,14 +52,14 @@
this.v = v;
}
- static PskKeyExchangeMode ofInt(int v) {
+ static PskKeyExchangeMode ofInt(int v) throws IOException {
for(PskKeyExchangeMode mode : values()) {
if (mode.v == v) {
return mode;
}
}
- return null;
+ throw new IOException("invalid key exchange mode: " + v);
}
}