Skip to content

Commit c3e2b30

Browse files
committed
PDFBOX-5660: remove deprecated
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923024 13f79535-47bb-0310-9956-ffa450edef68
1 parent d7e1202 commit c3e2b30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
import java.io.InputStreamReader;
3939
import java.net.InetAddress;
4040
import java.net.SocketTimeoutException;
41+
import java.net.URI;
4142
import java.net.URISyntaxException;
42-
import java.net.URL;
4343
import java.nio.file.Files;
4444
import java.nio.file.Paths;
4545
import java.security.GeneralSecurityException;
@@ -186,7 +186,7 @@ static void init() throws Exception
186186
* answer is too old".
187187
*/
188188
@Test
189-
void testTimeDifference() throws IOException
189+
void testTimeDifference() throws IOException, URISyntaxException
190190
{
191191
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
192192

@@ -211,7 +211,7 @@ void testTimeDifference() throws IOException
211211
String dateString;
212212
try
213213
{
214-
HttpsURLConnection con = (HttpsURLConnection) new URL("https://www.google.com/").openConnection();
214+
HttpsURLConnection con = (HttpsURLConnection) new URI("https://www.google.com/").toURL().openConnection();
215215
if (con.getResponseCode() != HttpsURLConnection.HTTP_OK)
216216
{
217217
System.out.println("Google returns " + con.getResponseCode());

0 commit comments

Comments
 (0)