mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8284567: Collapse identical catch branches in java.base
Reviewed-by: darcy, iris, wetmore
This commit is contained in:
parent
40ddb7558c
commit
f4edb59a6e
17 changed files with 46 additions and 106 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2012 SAP SE. All rights reserved.
|
* Copyright (c) 2012 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -453,10 +453,9 @@ final class AixPollPort
|
||||||
// process event
|
// process event
|
||||||
try {
|
try {
|
||||||
ev.channel().onEvent(ev.events(), isPooledThread);
|
ev.channel().onEvent(ev.events(), isPooledThread);
|
||||||
} catch (Error x) {
|
} catch (Error | RuntimeException x) {
|
||||||
replaceMe = true; throw x;
|
replaceMe = true;
|
||||||
} catch (RuntimeException x) {
|
throw x;
|
||||||
replaceMe = true; throw x;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, Red Hat Inc.
|
* Copyright (c) 2020, 2022, Red Hat Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -170,9 +170,7 @@ public interface CgroupSubsystemController {
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
return result.isPresent() ? Long.parseLong(result.get()) : defaultRetval;
|
return result.isPresent() ? Long.parseLong(result.get()) : defaultRetval;
|
||||||
} catch (UncheckedIOException e) {
|
} catch (UncheckedIOException | IOException e) {
|
||||||
return defaultRetval;
|
|
||||||
} catch (IOException e) {
|
|
||||||
return defaultRetval;
|
return defaultRetval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, Red Hat Inc.
|
* Copyright (c) 2020, 2022, Red Hat Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -82,9 +82,7 @@ public class CgroupSubsystemFactory {
|
||||||
Optional<CgroupTypeResult> optResult = null;
|
Optional<CgroupTypeResult> optResult = null;
|
||||||
try {
|
try {
|
||||||
optResult = determineType("/proc/self/mountinfo", "/proc/cgroups", "/proc/self/cgroup");
|
optResult = determineType("/proc/self/mountinfo", "/proc/cgroups", "/proc/self/cgroup");
|
||||||
} catch (IOException e) {
|
} catch (IOException | UncheckedIOException e) {
|
||||||
return null;
|
|
||||||
} catch (UncheckedIOException e) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Red Hat Inc.
|
* Copyright (c) 2020, 2022, Red Hat Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -332,9 +332,7 @@ public class CgroupV2Subsystem implements CgroupSubsystem {
|
||||||
return CgroupUtil.readFilePrivileged(Paths.get(unified.path(), "io.stat"))
|
return CgroupUtil.readFilePrivileged(Paths.get(unified.path(), "io.stat"))
|
||||||
.map(mapFunc)
|
.map(mapFunc)
|
||||||
.collect(Collectors.summingLong(e -> e));
|
.collect(Collectors.summingLong(e -> e));
|
||||||
} catch (UncheckedIOException e) {
|
} catch (UncheckedIOException | IOException e) {
|
||||||
return CgroupSubsystem.LONG_RETVAL_UNLIMITED;
|
|
||||||
} catch (IOException e) {
|
|
||||||
return CgroupSubsystem.LONG_RETVAL_UNLIMITED;
|
return CgroupSubsystem.LONG_RETVAL_UNLIMITED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,7 +34,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import static sun.nio.ch.EPoll.EPOLLIN;
|
import static sun.nio.ch.EPoll.EPOLLIN;
|
||||||
import static sun.nio.ch.EPoll.EPOLLONESHOT;
|
import static sun.nio.ch.EPoll.EPOLLONESHOT;
|
||||||
import static sun.nio.ch.EPoll.EPOLL_CTL_ADD;
|
import static sun.nio.ch.EPoll.EPOLL_CTL_ADD;
|
||||||
import static sun.nio.ch.EPoll.EPOLL_CTL_DEL;
|
|
||||||
import static sun.nio.ch.EPoll.EPOLL_CTL_MOD;
|
import static sun.nio.ch.EPoll.EPOLL_CTL_MOD;
|
||||||
|
|
||||||
|
|
||||||
|
@ -304,10 +303,9 @@ final class EPollPort
|
||||||
// process event
|
// process event
|
||||||
try {
|
try {
|
||||||
ev.channel().onEvent(ev.events(), isPooledThread);
|
ev.channel().onEvent(ev.events(), isPooledThread);
|
||||||
} catch (Error x) {
|
} catch (Error | RuntimeException x) {
|
||||||
replaceMe = true; throw x;
|
replaceMe = true;
|
||||||
} catch (RuntimeException x) {
|
throw x;
|
||||||
replaceMe = true; throw x;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -310,10 +310,9 @@ final class KQueuePort
|
||||||
// process event
|
// process event
|
||||||
try {
|
try {
|
||||||
ev.channel().onEvent(ev.events(), isPooledThread);
|
ev.channel().onEvent(ev.events(), isPooledThread);
|
||||||
} catch (Error x) {
|
} catch (Error | RuntimeException x) {
|
||||||
replaceMe = true; throw x;
|
replaceMe = true;
|
||||||
} catch (RuntimeException x) {
|
throw x;
|
||||||
replaceMe = true; throw x;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -44,9 +44,6 @@ import jdk.internal.access.JavaNetUriAccess;
|
||||||
import jdk.internal.access.SharedSecrets;
|
import jdk.internal.access.SharedSecrets;
|
||||||
import sun.nio.cs.UTF_8;
|
import sun.nio.cs.UTF_8;
|
||||||
|
|
||||||
import java.lang.Character; // for javadoc
|
|
||||||
import java.lang.NullPointerException; // for javadoc
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a Uniform Resource Identifier (URI) reference.
|
* Represents a Uniform Resource Identifier (URI) reference.
|
||||||
*
|
*
|
||||||
|
@ -3451,9 +3448,7 @@ public final class URI
|
||||||
|
|
||||||
try {
|
try {
|
||||||
p = scanIPv4Address(start, n, false);
|
p = scanIPv4Address(start, n, false);
|
||||||
} catch (URISyntaxException x) {
|
} catch (URISyntaxException | NumberFormatException x) {
|
||||||
return -1;
|
|
||||||
} catch (NumberFormatException nfe) {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -100,13 +100,8 @@ public abstract class AsynchronousChannelProvider {
|
||||||
Object tmp = Class.forName(cn, true,
|
Object tmp = Class.forName(cn, true,
|
||||||
ClassLoader.getSystemClassLoader()).newInstance();
|
ClassLoader.getSystemClassLoader()).newInstance();
|
||||||
return (AsynchronousChannelProvider)tmp;
|
return (AsynchronousChannelProvider)tmp;
|
||||||
} catch (ClassNotFoundException x) {
|
} catch (ClassNotFoundException | SecurityException |
|
||||||
throw new ServiceConfigurationError(null, x);
|
InstantiationException | IllegalAccessException x) {
|
||||||
} catch (IllegalAccessException x) {
|
|
||||||
throw new ServiceConfigurationError(null, x);
|
|
||||||
} catch (InstantiationException x) {
|
|
||||||
throw new ServiceConfigurationError(null, x);
|
|
||||||
} catch (SecurityException x) {
|
|
||||||
throw new ServiceConfigurationError(null, x);
|
throw new ServiceConfigurationError(null, x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,7 +24,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package java.util;
|
package java.util;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides a skeletal implementation of the {@code Map}
|
* This class provides a skeletal implementation of the {@code Map}
|
||||||
|
@ -493,9 +492,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ClassCastException unused) {
|
} catch (ClassCastException | NullPointerException unused) {
|
||||||
return false;
|
|
||||||
} catch (NullPointerException unused) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -831,9 +831,7 @@ public class Hashtable<K,V>
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ClassCastException unused) {
|
} catch (ClassCastException | NullPointerException unused) {
|
||||||
return false;
|
|
||||||
} catch (NullPointerException unused) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -866,12 +866,7 @@ public class URLClassPath {
|
||||||
if (check) {
|
if (check) {
|
||||||
URLClassPath.check(url);
|
URLClassPath.check(url);
|
||||||
}
|
}
|
||||||
} catch (MalformedURLException e) {
|
} catch (@SuppressWarnings("removal") AccessControlException | IOException e) {
|
||||||
return null;
|
|
||||||
// throw new IllegalArgumentException("name");
|
|
||||||
} catch (IOException e) {
|
|
||||||
return null;
|
|
||||||
} catch (@SuppressWarnings("removal") AccessControlException e) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1026,9 +1021,7 @@ public class URLClassPath {
|
||||||
/* put it in the global hashtable */
|
/* put it in the global hashtable */
|
||||||
lmap.put(urlNoFragString, newLoader);
|
lmap.put(urlNoFragString, newLoader);
|
||||||
}
|
}
|
||||||
} catch (PrivilegedActionException pae) {
|
} catch (PrivilegedActionException | MalformedURLException e) {
|
||||||
continue;
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -341,12 +341,8 @@ final class ParserSAX
|
||||||
mPh = PH_BEFORE_DOC; // before parsing
|
mPh = PH_BEFORE_DOC; // before parsing
|
||||||
try {
|
try {
|
||||||
setinp(is);
|
setinp(is);
|
||||||
} catch (SAXException saxe) {
|
} catch (SAXException | IOException | RuntimeException e) {
|
||||||
throw saxe;
|
throw e;
|
||||||
} catch (IOException ioe) {
|
|
||||||
throw ioe;
|
|
||||||
} catch (RuntimeException rte) {
|
|
||||||
throw rte;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
panic(e.toString());
|
panic(e.toString());
|
||||||
}
|
}
|
||||||
|
@ -529,12 +525,8 @@ final class ParserSAX
|
||||||
} while (mPh == PH_DOCELM_MISC);
|
} while (mPh == PH_DOCELM_MISC);
|
||||||
mPh = PH_AFTER_DOC; // parsing is completed
|
mPh = PH_AFTER_DOC; // parsing is completed
|
||||||
|
|
||||||
} catch (SAXException saxe) {
|
} catch (SAXException | IOException | RuntimeException e) {
|
||||||
throw saxe;
|
throw e;
|
||||||
} catch (IOException ioe) {
|
|
||||||
throw ioe;
|
|
||||||
} catch (RuntimeException rte) {
|
|
||||||
throw rte;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
panic(e.toString());
|
panic(e.toString());
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -92,8 +92,7 @@ public class NetProperties {
|
||||||
String def = props.getProperty(key);
|
String def = props.getProperty(key);
|
||||||
try {
|
try {
|
||||||
return System.getProperty(key, def);
|
return System.getProperty(key, def);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException | NullPointerException e) {
|
||||||
} catch (NullPointerException e) {
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -115,8 +114,7 @@ public class NetProperties {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val = System.getProperty(key, props.getProperty(key));
|
val = System.getProperty(key, props.getProperty(key));
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException | NullPointerException e) {
|
||||||
} catch (NullPointerException e) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
|
@ -144,8 +142,7 @@ public class NetProperties {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val = System.getProperty(key, props.getProperty(key));
|
val = System.getProperty(key, props.getProperty(key));
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException | NullPointerException e) {
|
||||||
} catch (NullPointerException e) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -510,17 +510,7 @@ public class FtpURLConnection extends URLConnection {
|
||||||
is = new FtpInputStream(ftp, ftp.list(null));
|
is = new FtpInputStream(ftp, ftp.list(null));
|
||||||
msgh.add("content-type", "text/plain");
|
msgh.add("content-type", "text/plain");
|
||||||
msgh.add("access-type", "directory");
|
msgh.add("access-type", "directory");
|
||||||
} catch (IOException ex) {
|
} catch (IOException | FtpProtocolException ex) {
|
||||||
FileNotFoundException fnfe = new FileNotFoundException(fullpath);
|
|
||||||
if (ftp != null) {
|
|
||||||
try {
|
|
||||||
ftp.close();
|
|
||||||
} catch (IOException ioe) {
|
|
||||||
fnfe.addSuppressed(ioe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw fnfe;
|
|
||||||
} catch (FtpProtocolException ex2) {
|
|
||||||
FileNotFoundException fnfe = new FileNotFoundException(fullpath);
|
FileNotFoundException fnfe = new FileNotFoundException(fullpath);
|
||||||
if (ftp != null) {
|
if (ftp != null) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1465,9 +1465,6 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||||
}
|
}
|
||||||
return poster;
|
return poster;
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
|
||||||
disconnectInternal();
|
|
||||||
throw e;
|
|
||||||
} catch (ProtocolException e) {
|
} catch (ProtocolException e) {
|
||||||
// Save the response code which may have been set while enforcing
|
// Save the response code which may have been set while enforcing
|
||||||
// the 100-continue. disconnectInternal() forces it to -1
|
// the 100-continue. disconnectInternal() forces it to -1
|
||||||
|
@ -1475,7 +1472,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||||
disconnectInternal();
|
disconnectInternal();
|
||||||
responseCode = i;
|
responseCode = i;
|
||||||
throw e;
|
throw e;
|
||||||
} catch (IOException e) {
|
} catch (RuntimeException | IOException e) {
|
||||||
disconnectInternal();
|
disconnectInternal();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -243,9 +243,7 @@ public class NTLMAuthentication extends AuthenticationInfo {
|
||||||
}
|
}
|
||||||
conn.setAuthenticationProperty(getHeaderName(), response);
|
conn.setAuthenticationProperty(getHeaderName(), response);
|
||||||
return true;
|
return true;
|
||||||
} catch (IOException e) {
|
} catch (IOException | GeneralSecurityException e) {
|
||||||
return false;
|
|
||||||
} catch (GeneralSecurityException e) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -110,9 +110,7 @@ class WindowsFileAttributeViews {
|
||||||
// retry succeeded
|
// retry succeeded
|
||||||
x = null;
|
x = null;
|
||||||
}
|
}
|
||||||
} catch (SecurityException ignore) {
|
} catch (SecurityException | WindowsException | IOException ignore) {
|
||||||
} catch (WindowsException ignore) {
|
|
||||||
} catch (IOException ignore) {
|
|
||||||
// ignore exceptions to let original exception be thrown
|
// ignore exceptions to let original exception be thrown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue