Author: tilman Date: Sun Nov 26 09:39:59 2023 New Revision: 1914134 URL: http://svn.apache.org/viewvc?rev=1914134&view=rev Log: PDFBOX-5660: replace deprecated
Modified: pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java Modified: pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java?rev=1914134&r1=1914133&r2=1914134&view=diff ============================================================================== --- pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java (original) +++ pdfbox/trunk/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java Sun Nov 26 09:39:59 2023 @@ -56,6 +56,7 @@ import java.security.cert.X509CRL; import java.security.cert.X509Certificate; import java.text.MessageFormat; import java.text.SimpleDateFormat; +import java.time.Duration; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Arrays; @@ -194,7 +195,7 @@ class TestCreateSignature // https://stackoverflow.com/questions/4442192/ NTPUDPClient timeClient = new NTPUDPClient(); InetAddress inetAddress = InetAddress.getByName("time.nist.gov"); - timeClient.setDefaultTimeout(5000); + timeClient.setDefaultTimeout(Duration.ofMillis(5000)); TimeInfo timeInfo; long returnTime; try