File: Use-URL-constructors-instead-of-toURL.patch

package info (click to toggle)
starjava-topcat 4.10.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,520 kB
  • sloc: java: 78,168; xml: 35,531; sh: 68; makefile: 24
file content (27 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Mark Taylor <m.b.taylor@bristol.ac.uk>
Date: Mon, 5 Aug 2024 15:28:32 +0100
Subject: Use URL constructors instead of toURL()

URL constructors are deprecated at Java 20, but this
didn't work on Debian.

Reverts e2ee0407cd45ce10a0179a2662b21662458aa9e7 for the test file
---
 src/testcases/uk/ac/starlink/topcat/HelpTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/testcases/uk/ac/starlink/topcat/HelpTest.java b/src/testcases/uk/ac/starlink/topcat/HelpTest.java
index 65eee31..aacc2ce 100644
--- a/src/testcases/uk/ac/starlink/topcat/HelpTest.java
+++ b/src/testcases/uk/ac/starlink/topcat/HelpTest.java
@@ -27,8 +27,8 @@ public class HelpTest extends TestCase {
 
     public void testXML() throws Exception {
         parseXML( hsURL );
-        parseXML( hsURL.toURI().resolve( "Map.xml" ).toURL() );
-        parseXML( hsURL.toURI().resolve( "TOC.xml" ).toURL() );
+        parseXML( new URL( hsURL, "Map.xml" ) );
+        parseXML( new URL( hsURL, "TOC.xml" ) );
     }
 
     public void parseXML( URL url ) throws Exception {