Author: tilman
Date: Thu Aug 13 09:06:16 2026
New Revision: 1937090
Log:
PDFBOX-5660: remove outdated
Modified:
pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Modified:
pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
==============================================================================
---
pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Thu Aug 13 09:06:13 2026 (r1937089)
+++
pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/SigUtils.java
Thu Aug 13 09:06:16 2026 (r1937090)
@@ -427,7 +427,7 @@ public class SigUtils
/**
* Like {@link URL#openStream()} but will follow redirection from http to
https.
*
- * @param urlString
+ * @param urlString http URL string
* @return
* @throws IOException
* @throws URISyntaxException
@@ -435,10 +435,9 @@ public class SigUtils
public static InputStream openURL(String urlString) throws IOException,
URISyntaxException
{
URL url = new URI(urlString).toURL();
- if (!urlString.startsWith("http"))
+ if (!url.getProtocol().startsWith("http"))
{
- // so that ftp is still supported
- return url.openStream();
+ throw new IOException(url.getProtocol() + " protocol not
supported");
}
HttpURLConnection con = (HttpURLConnection) url.openConnection();
int responseCode = con.getResponseCode();