File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/test/java/org/spdx/tools Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * SPDX-FileContributor: Arthit Suriyawongkul
3+ * SPDX-FileCopyrightText: 2025 SPDX contributors
4+ * SPDX-FileType: SOURCE
5+ * SPDX-License-Identifier: Apache-2.0
6+ */
17package org .spdx .tools ;
28
39import java .io .IOException ;
4- import java .net .URL ;
10+ import java .net .URI ;
511import java .nio .file .Files ;
612import java .nio .file .Path ;
713import java .nio .file .Paths ;
@@ -33,9 +39,7 @@ public void testLatestSpdxSchemaVersionIsUpToDate() throws IOException {
3339 // Step 2: Compare the content of the file with the content from the URL
3440 String localSchemaContent = Files .readString (schemaFilePath );
3541 String remoteSchemaUrl = "https://spdx.org/schema/" + version + "/spdx-json-schema.json" ;
36- String remoteSchemaContent = IOUtils .toString (new URL (remoteSchemaUrl ), "UTF-8" );
37-
38- // Step 3: Assert if the contents match
42+ String remoteSchemaContent = IOUtils .toString (URI .create (remoteSchemaUrl ).toURL (), "UTF-8" );
3943 assertEquals ("The local SPDX schema file does not match the remote schema content." ,
4044 localSchemaContent .trim (), remoteSchemaContent .trim ());
4145 }
You can’t perform that action at this time.
0 commit comments