File tree 7 files changed +15
-13
lines changed
cli/src/test/java/org/jboss/pnc/build/finder/cli
core/src/test/java/org/jboss/pnc/build/finder/core
7 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 20
20
import static org .jboss .pnc .build .finder .core .ChecksumType .sha256 ;
21
21
22
22
import java .io .IOException ;
23
+ import java .net .URI ;
23
24
import java .net .URL ;
24
25
import java .nio .file .Path ;
25
26
import java .util .Collection ;
@@ -85,8 +86,8 @@ void testParsing(@TempDir Path folder) throws IOException {
85
86
Path configFile = TestUtils .loadFile ("config.json" );
86
87
Path inputFile = TestUtils .loadFile ("nested.war" );
87
88
88
- URL hubURL = new URL ("http://a.b" );
89
- URL webURL = new URL ("http://c.d" );
89
+ URL hubURL = URI . create ("http://a.b" ). toURL ( );
90
+ URL webURL = URI . create ("http://c.d" ). toURL ( );
90
91
Path krbCcache = folder .resolve ("krb5-cache" );
91
92
Path krbKeytab = folder .resolve ("krb5-keytab" );
92
93
String krbPassword = "test" ;
Original file line number Diff line number Diff line change 18
18
import static org .assertj .core .api .Assertions .assertThat ;
19
19
20
20
import java .net .MalformedURLException ;
21
- import java .net .URL ;
21
+ import java .net .URI ;
22
22
import java .util .Collection ;
23
23
import java .util .Collections ;
24
24
import java .util .LinkedHashMap ;
@@ -44,7 +44,7 @@ class CompletedAndDeletedBuildTest extends AbstractWireMockTest {
44
44
@ BeforeAll
45
45
static void setup () throws MalformedURLException {
46
46
config = new BuildConfig ();
47
- config .setKojiHubURL (new URL (WIRE_MOCK_EXTENSION .baseUrl ()));
47
+ config .setKojiHubURL (URI . create (WIRE_MOCK_EXTENSION .baseUrl ()). toURL ( ));
48
48
}
49
49
50
50
@ Test
Original file line number Diff line number Diff line change 18
18
import static org .assertj .core .api .Assertions .assertThat ;
19
19
20
20
import java .net .MalformedURLException ;
21
- import java .net .URL ;
21
+ import java .net .URI ;
22
22
import java .util .Collection ;
23
23
import java .util .Collections ;
24
24
import java .util .LinkedHashMap ;
@@ -43,7 +43,7 @@ class CompletedBuildTest extends AbstractWireMockTest {
43
43
@ BeforeAll
44
44
static void setup () throws MalformedURLException {
45
45
config = new BuildConfig ();
46
- config .setKojiHubURL (new URL (WIRE_MOCK_EXTENSION .baseUrl ()));
46
+ config .setKojiHubURL (URI . create (WIRE_MOCK_EXTENSION .baseUrl ()). toURL ( ));
47
47
}
48
48
49
49
@ Test
Original file line number Diff line number Diff line change 18
18
import static org .assertj .core .api .Assertions .assertThat ;
19
19
20
20
import java .net .MalformedURLException ;
21
- import java .net .URL ;
21
+ import java .net .URI ;
22
22
import java .util .Collection ;
23
23
import java .util .Collections ;
24
24
import java .util .LinkedHashMap ;
@@ -43,7 +43,7 @@ class DeletedBuildTest extends AbstractWireMockTest {
43
43
@ BeforeAll
44
44
static void setup () throws MalformedURLException {
45
45
config = new BuildConfig ();
46
- config .setKojiHubURL (new URL (WIRE_MOCK_EXTENSION .baseUrl ()));
46
+ config .setKojiHubURL (URI . create (WIRE_MOCK_EXTENSION .baseUrl ()). toURL ( ));
47
47
}
48
48
49
49
@ Test
Original file line number Diff line number Diff line change 19
19
20
20
import java .io .IOException ;
21
21
import java .net .MalformedURLException ;
22
- import java .net .URL ;
22
+ import java .net .URI ;
23
23
import java .util .Collection ;
24
24
import java .util .Collections ;
25
25
import java .util .LinkedHashMap ;
@@ -44,7 +44,7 @@ class EmptyBuildsTest extends AbstractWireMockTest {
44
44
@ BeforeAll
45
45
static void setup () throws MalformedURLException {
46
46
config = new BuildConfig ();
47
- config .setKojiHubURL (new URL (WIRE_MOCK_EXTENSION .baseUrl ()));
47
+ config .setKojiHubURL (URI . create (WIRE_MOCK_EXTENSION .baseUrl ()). toURL ( ));
48
48
}
49
49
50
50
@ Test
Original file line number Diff line number Diff line change 18
18
import static org .assertj .core .api .Assertions .assertThat ;
19
19
20
20
import java .net .MalformedURLException ;
21
- import java .net .URL ;
21
+ import java .net .URI ;
22
22
import java .util .Collection ;
23
23
import java .util .Collections ;
24
24
import java .util .LinkedHashMap ;
@@ -43,7 +43,7 @@ class SkipImportTest extends AbstractWireMockTest {
43
43
@ BeforeAll
44
44
static void setup () throws MalformedURLException {
45
45
config = new BuildConfig ();
46
- config .setKojiHubURL (new URL (WIRE_MOCK_EXTENSION .baseUrl ()));
46
+ config .setKojiHubURL (URI . create (WIRE_MOCK_EXTENSION .baseUrl ()). toURL ( ));
47
47
}
48
48
49
49
@ Test
Original file line number Diff line number Diff line change 21
21
22
22
import java .io .IOException ;
23
23
import java .io .InputStream ;
24
+ import java .net .URI ;
24
25
import java .net .URL ;
25
26
import java .nio .file .Files ;
26
27
import java .nio .file .Path ;
@@ -162,7 +163,7 @@ void testFindMatchingSPDXLicenseIdentifier() {
162
163
163
164
@ Test
164
165
void testGetMatchingLicense (@ TempDir Path folder ) throws IOException , InvalidSPDXAnalysisException {
165
- URL url = new URL ("https://www.apache.org/licenses/LICENSE-2.0.txt" );
166
+ URL url = URI . create ("https://www.apache.org/licenses/LICENSE-2.0.txt" ). toURL ( );
166
167
Path path = folder .resolve ("LICENSE-2.0-1.txt" );
167
168
168
169
try (InputStream in = url .openStream ()) {
You can’t perform that action at this time.
0 commit comments