Skip to content

Commit

Permalink
PDFBOX-5660: remove deprecated
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923024 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Jan 10, 2025
1 parent d7e1202 commit c3e2b30
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.GeneralSecurityException;
Expand Down Expand Up @@ -186,7 +186,7 @@ static void init() throws Exception
* answer is too old".
*/
@Test
void testTimeDifference() throws IOException
void testTimeDifference() throws IOException, URISyntaxException
{
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");

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

0 comments on commit c3e2b30

Please sign in to comment.