jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Wed Jul 05 20:39:43 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Jun 30 12:04:27 2015 +0200
@@ -638,7 +638,7 @@
// set preference for redirection
followRedirects = httpInputSource.getFollowHTTPRedirects();
if (!followRedirects) {
- setInstanceFollowRedirects(urlConnection, followRedirects);
+ urlConnection.setInstanceFollowRedirects(followRedirects);
}
}
@@ -2193,20 +2193,6 @@
} // expandSystemIdStrictOn(String,String):String
/**
- * Attempt to set whether redirects will be followed for an <code>HttpURLConnection</code>.
- * This may fail on earlier JDKs which do not support setting this preference.
- */
- public static void setInstanceFollowRedirects(HttpURLConnection urlCon, boolean followRedirects) {
- try {
- Method method = HttpURLConnection.class.getMethod("setInstanceFollowRedirects", new Class[] {Boolean.TYPE});
- method.invoke(urlCon, new Object[] {followRedirects ? Boolean.TRUE : Boolean.FALSE});
- }
- // setInstanceFollowRedirects doesn't exist.
- catch (Exception exc) {}
- }
-
-
- /**
* Helper method for expandSystemId(String,String,boolean):String
*/
private static String expandSystemIdStrictOff(String systemId, String baseSystemId)