File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
examples/src/test/java/org/apache/pdfbox/examples/pdmodel Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3838import java .io .InputStreamReader ;
3939import java .net .InetAddress ;
4040import java .net .SocketTimeoutException ;
41+ import java .net .URI ;
4142import java .net .URISyntaxException ;
42- import java .net .URL ;
4343import java .nio .file .Files ;
4444import java .nio .file .Paths ;
4545import 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 ());
You can’t perform that action at this time.
0 commit comments