mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8209031: SSLSocket should throw an exception when configuring DTLS
Reviewed-by: xuelei
This commit is contained in:
parent
7069bb6a72
commit
b27f471bdd
6 changed files with 70 additions and 166 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -112,7 +112,7 @@ public abstract class SSLServerSocketFactory extends ServerSocketFactory
|
|||
|
||||
try {
|
||||
return SSLContext.getDefault().getServerSocketFactory();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (NoSuchAlgorithmException | UnsupportedOperationException e) {
|
||||
return new DefaultSSLServerSocketFactory(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -121,7 +121,7 @@ public abstract class SSLSocketFactory extends SocketFactory
|
|||
|
||||
try {
|
||||
return SSLContext.getDefault().getSocketFactory();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (NoSuchAlgorithmException | UnsupportedOperationException e) {
|
||||
return new DefaultSSLSocketFactory(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue