mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8258422: Cleanup unnecessary null comparison before instanceof check in java.base
Reviewed-by: chegar, aefimov
This commit is contained in:
parent
ff54b77b76
commit
022bc9f0cb
22 changed files with 69 additions and 81 deletions
|
@ -66,8 +66,8 @@ public abstract class Negotiator {
|
|||
} catch (ReflectiveOperationException roe) {
|
||||
finest(roe);
|
||||
Throwable t = roe.getCause();
|
||||
if (t != null && t instanceof Exception)
|
||||
finest((Exception)t);
|
||||
if (t instanceof Exception exception)
|
||||
finest(exception);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ final class HttpsClient extends HttpClient
|
|||
// unconnected sockets have not been implemented.
|
||||
//
|
||||
Throwable t = se.getCause();
|
||||
if (t != null && t instanceof UnsupportedOperationException) {
|
||||
if (t instanceof UnsupportedOperationException) {
|
||||
return super.createSocket();
|
||||
} else {
|
||||
throw se;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue