Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump quarkus.version from 3.15.1 to 3.16.1 #597

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected PasswordAuthentication getPasswordAuthentication() {
}
});
}
URL website = new URL(urlString);
URL website = URI.create(urlString).toURL();
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
Expand Down
2 changes: 1 addition & 1 deletion pmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</rule>

<!-- 1 (the default) assert per unit test seems extremely restrictive. Just raising to 5. -->
<rule ref="category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts">
<rule ref="category/java/bestpractices.xml/UnitTestContainsTooManyAsserts">
<properties>
<property name="maximumAsserts" value="5" />
</properties>
Expand Down
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- dependencies -->
<quarkus.version>3.15.1</quarkus.version>
<quarkus.version>3.16.1</quarkus.version>
<karate.version>1.5.0</karate.version>
<graal.version>24.1.1</graal.version>
<quarkiverse.version>3.1.0</quarkiverse.version>
Expand Down Expand Up @@ -288,6 +288,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/solid/testharness/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ private URL createUrl(final String url, final String param) {
if (!StringUtils.isBlank(url)) {
try {
if (url.startsWith("file:") || url.startsWith("http:") || url.startsWith("https:")) {
return new URL(url);
return URI.create(url).toURL();
} else {
return Path.of(url).toAbsolutePath().normalize().toUri().toURL();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/solid/testharness/http/JwsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public final class JwsUtils {
private static final RandomStringGenerator GENERATOR = new RandomStringGenerator.Builder()
.withinRange('0', 'z').filteredBy(LETTERS, DIGITS).build();
.withinRange('0', 'z').filteredBy(LETTERS, DIGITS).get();

// TODO: Switch to elliptical curve as it is faster
public static String generateDpopToken(final RsaJsonWebKey clientKey, final JwtClaims claims) {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/solid/testharness/ApplicationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import jakarta.inject.Inject;
import java.io.File;
import java.net.URL;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
Expand Down Expand Up @@ -168,7 +168,7 @@ void targetBlank() throws Exception {
void target() throws Exception {
final TestSuiteResults results = mockResults(1, false);
when(conformanceTestHarness.runTestSuites(any(), any())).thenReturn(results);
when(config.getSubjectsUrl()).thenReturn(new URL("https://example.org/subjects.ttl"));
when(config.getSubjectsUrl()).thenReturn(URI.create("https://example.org/subjects.ttl").toURL());
assertEquals(0, application.run("--target", "test"));
verify(config).setTestSubject(iri("https://example.org/test"));
}
Expand All @@ -177,7 +177,7 @@ void target() throws Exception {
void targetIri() throws Exception {
final TestSuiteResults results = mockResults(1, false);
when(conformanceTestHarness.runTestSuites(any(), any())).thenReturn(results);
when(config.getSubjectsUrl()).thenReturn(new URL("https://example.org/subjects.ttl"));
when(config.getSubjectsUrl()).thenReturn(URI.create("https://example.org/subjects.ttl").toURL());
assertEquals(0, application.run("--target", "https://example.org/test"));
verify(config).setTestSubject(iri("https://example.org/test"));
}
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/org/solid/testharness/config/ConfigLogicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ void getSubjectsUrlNoConfigException() {
void getSubjectsUrlUseConfigHttp() throws MalformedURLException {
final Config config = new Config();
config.subjectsFile = Optional.of("http://example.org");
assertEquals(new URL("http://example.org"), config.getSubjectsUrl());
assertEquals(URI.create("http://example.org").toURL(), config.getSubjectsUrl());
}

@Test
void getSubjectsUrlUseConfigHttps() throws MalformedURLException {
final Config config = new Config();
config.subjectsFile = Optional.of(TestUtils.SAMPLE_BASE);
assertEquals(new URL(TestUtils.SAMPLE_BASE), config.getSubjectsUrl());
assertEquals(URI.create(TestUtils.SAMPLE_BASE).toURL(), config.getSubjectsUrl());
}

@Test
void getSubjectsUrlUseConfigFile() throws MalformedURLException {
final Config config = new Config();
config.subjectsFile = Optional.of("file:/subjectFile");
assertEquals(new URL("file:/subjectFile"), config.getSubjectsUrl());
assertEquals(URI.create("file:/subjectFile").toURL(), config.getSubjectsUrl());
}

@Test
Expand Down Expand Up @@ -110,7 +110,7 @@ void getSubjectsUrlUseConfigBad() {
void getSubjectsUrlUseSet() throws MalformedURLException {
final Config config = new Config();
config.setSubjectsUrl(TestUtils.SAMPLE_BASE);
assertEquals(new URL(TestUtils.SAMPLE_BASE), config.getSubjectsUrl());
assertEquals(URI.create(TestUtils.SAMPLE_BASE).toURL(), config.getSubjectsUrl());
}

@Test
Expand Down Expand Up @@ -140,7 +140,7 @@ void getTestSourcesUseConfigOne() throws MalformedURLException {
config.sourceList = Optional.of(List.of(TestUtils.SAMPLE_BASE));
final List<URL> list = config.getTestSources();
assertEquals(1, list.size());
assertEquals(new URL(TestUtils.SAMPLE_BASE), list.get(0));
assertEquals(URI.create(TestUtils.SAMPLE_BASE).toURL(), list.get(0));
}

@Test
Expand All @@ -149,8 +149,8 @@ void getTestSourcesUseConfigTwo() throws MalformedURLException {
config.sourceList = Optional.of(List.of("https://example.org", "http://example.org"));
final List<URL> list = config.getTestSources();
assertEquals(2, list.size());
assertEquals(new URL("https://example.org"), list.get(0));
assertEquals(new URL("http://example.org"), list.get(1));
assertEquals(URI.create("https://example.org").toURL(), list.get(0));
assertEquals(URI.create("http://example.org").toURL(), list.get(1));
}

@Test
Expand All @@ -166,8 +166,8 @@ void getTestSourcesUseSet() throws MalformedURLException {
config.setTestSources(List.of("https://example.org", "http://example.org"));
final List<URL> list = config.getTestSources();
assertEquals(2, list.size());
assertEquals(new URL("https://example.org"), list.get(0));
assertEquals(new URL("http://example.org"), list.get(1));
assertEquals(URI.create("https://example.org").toURL(), list.get(0));
assertEquals(URI.create("http://example.org").toURL(), list.get(1));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ void mapIriNoMapping() {

@Test
void mapUrl() throws MalformedURLException {
final URL url = pathMappings.mapUrl(new URL("https://example.org/specification-sample-1.ttl"));
final URL url = pathMappings.mapUrl(URI.create("https://example.org/specification-sample-1.ttl").toURL());
assertEquals(TestUtils.getFileUrl("src/test/resources/discovery/specification-sample-1.ttl"), url);
}

@Test
void mapUrlFail() {
assertThrows(TestHarnessInitializationException.class,
() -> pathMappings.mapUrl(new URL("https://example.org/badmapping-sample-1.ttl")));
() -> pathMappings.mapUrl(URI.create("https://example.org/badmapping-sample-1.ttl").toURL()));
}

@Test
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/solid/testharness/config/TestSubjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ void setupMissingTargetSingleConfig() throws Exception {
final TargetServer targetServer = testSubject.getTargetServer();

assertNotNull(targetServer);
assertEquals(new URL(testFileUrl, "default").toString(), targetServer.getSubject());
assertEquals(testFileUrl.toURI().resolve("default").toString(), targetServer.getSubject());
assertEquals(12, targetServer.size());
}

@Test
void setupTargetMultipleConfig() throws Exception {
final URL testFileUrl = TestUtils.getFileUrl(CONFIG_SAMPLE);
final String subject = new URL(testFileUrl, "testserver").toString();
final String subject = testFileUrl.toURI().resolve("testserver").toString();
setupMockConfigMin(CONFIG_SAMPLE, subject);
testSubject.loadTestSubjectConfig();

Expand Down Expand Up @@ -359,7 +359,7 @@ void findStorageProvisionFails() {
@Test
void loadTestSubjectConfigTarget1() throws Exception {
final URL testFileUrl = TestUtils.getFileUrl(CONFIG_SAMPLE);
final String subject = new URL(testFileUrl, "testserver").toString();
final String subject = testFileUrl.toURI().resolve("testserver").toString();
when(config.getSubjectsUrl()).thenReturn(testFileUrl);
when(config.getTestSubject()).thenReturn(iri(subject));
testSubject.loadTestSubjectConfig();
Expand All @@ -373,7 +373,7 @@ void loadTestSubjectConfigTarget1() throws Exception {
@Test
void loadTestSubjectConfigTarget2() throws Exception {
final URL testFileUrl = TestUtils.getFileUrl(CONFIG_SAMPLE);
final String subject = new URL(testFileUrl, "testserver2").toString();
final String subject = testFileUrl.toURI().resolve("testserver2").toString();
when(config.getSubjectsUrl()).thenReturn(testFileUrl);
when(config.getTestSubject()).thenReturn(iri(subject));
testSubject.loadTestSubjectConfig();
Expand All @@ -393,7 +393,7 @@ void getTargetServerDefault() throws Exception {
final TargetServer targetServer = testSubject.getTargetServer();

assertNotNull(targetServer);
assertEquals(new URL(testFileUrl, "default").toString(), targetServer.getSubject());
assertEquals(testFileUrl.toURI().resolve("default").toString(), targetServer.getSubject());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

import jakarta.inject.Inject;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -77,8 +77,8 @@ void setUp() {
@Test
void loadOneManifest() throws MalformedURLException {
testSuiteDescription.load(List.of(
new URL(NS + "test-manifest-sample-1.ttl"),
new URL(NS + "specification-sample-1.ttl")
URI.create(NS + "test-manifest-sample-1.ttl").toURL(),
URI.create(NS + "specification-sample-1.ttl").toURL()
));
assertTrue(ask(iri(NS, "specification1"), RDF.type, DOAP.Specification));
assertTrue(ask(iri(NS, "test-manifest-sample-1.ttl#group1-feature1"),
Expand All @@ -92,10 +92,10 @@ void loadOneManifest() throws MalformedURLException {
@Test
void loadTwoManifest() throws MalformedURLException {
testSuiteDescription.load(List.of(
new URL(NS + "test-manifest-sample-1.ttl"),
new URL(NS + "test-manifest-sample-2.ttl"),
new URL(NS + "specification-sample-1.ttl"),
new URL(NS + "specification-sample-2.ttl")
URI.create(NS + "test-manifest-sample-1.ttl").toURL(),
URI.create(NS + "test-manifest-sample-2.ttl").toURL(),
URI.create(NS + "specification-sample-1.ttl").toURL(),
URI.create(NS + "specification-sample-2.ttl").toURL()
));
assertTrue(ask(iri(NS, "specification1"), RDF.type, DOAP.Specification));
assertTrue(ask(iri(NS, "test-manifest-sample-1.ttl#group1-feature1"),
Expand All @@ -107,7 +107,7 @@ void loadTwoManifest() throws MalformedURLException {

@Test
void loadRdfa() throws MalformedURLException {
testSuiteDescription.load(List.of(new URL(NS + "specification-sample-1.html")));
testSuiteDescription.load(List.of(URI.create(NS + "specification-sample-1.html").toURL()));
assertTrue(ask(iri(NS, "specification1"), RDF.type, DOAP.Specification));
assertTrue(ask(iri(NS, "specification1#spec1"), SPEC.statement,
literal("text of requirement 1")));
Expand All @@ -116,10 +116,10 @@ void loadRdfa() throws MalformedURLException {
@Test
void loadTwoManifestMixed() throws MalformedURLException {
testSuiteDescription.load(List.of(
new URL(NS + "test-manifest-sample-1.ttl"),
new URL(NS + "test-manifest-sample-2.ttl"),
new URL(NS + "specification-sample-1.html"),
new URL(NS + "specification-sample-2.ttl")
URI.create(NS + "test-manifest-sample-1.ttl").toURL(),
URI.create(NS + "test-manifest-sample-2.ttl").toURL(),
URI.create(NS + "specification-sample-1.html").toURL(),
URI.create(NS + "specification-sample-2.ttl").toURL()
));
assertTrue(ask(iri(NS, "specification1"), RDF.type, DOAP.Specification));
assertTrue(ask(iri(NS, "test-manifest-sample-1.ttl#group1-feature1"),
Expand All @@ -131,7 +131,7 @@ void loadTwoManifestMixed() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsNull() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(null, null);
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(0, count(null, RDF.type, EARL.Assertion));
Expand All @@ -145,7 +145,7 @@ void setNonRunningTestAssertionsNull() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsEmptyFilters() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(Collections.emptyList(), null);
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(0, count(null, RDF.type, EARL.Assertion));
Expand All @@ -159,7 +159,7 @@ void setNonRunningTestAssertionsEmptyFilters() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsEmptyStatuses() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(null, Collections.emptyList());
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(0, count(null, RDF.type, EARL.Assertion));
Expand All @@ -173,7 +173,7 @@ void setNonRunningTestAssertionsEmptyStatuses() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsFilterGroup1() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(List.of("group1"), null);
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(3, count(null, RDF.type, EARL.Assertion));
Expand All @@ -188,7 +188,7 @@ void setNonRunningTestAssertionsFilterGroup1() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsStatuesAccepted() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(null, List.of("accepted"));
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(1, count(null, RDF.type, EARL.Assertion));
Expand All @@ -207,7 +207,7 @@ void setNonRunningTestAssertionsStatuesAccepted() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsStatusUnreviewed() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
testSuiteDescription.setNonRunningTestAssertions(null, List.of("unreviewed"));
assertEquals(6, count(null, RDF.type, TD.TestCase));
assertEquals(5, count(null, RDF.type, EARL.Assertion));
Expand All @@ -218,7 +218,7 @@ void setNonRunningTestAssertionsStatusUnreviewed() throws MalformedURLException

@Test
void setNonRunningTestAssertionsBadStatus() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of(URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
add(iri(NS, "testcase"), RDF.type, TD.TestCase);
add(iri(NS, "testcase"), TD.reviewStatus, literal("ACCEPTED"));
testSuiteDescription.setNonRunningTestAssertions(null, List.of("unreviewed"));
Expand All @@ -231,7 +231,7 @@ void setNonRunningTestAssertionsBadStatus() throws MalformedURLException {

@Test
void setNonRunningTestAssertionsBadStatusNotChecked() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of( URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
add(iri(NS, "testcase"), RDF.type, TD.TestCase);
add(iri(NS, "testcase"), TD.reviewStatus, literal("ACCEPTED"));
testSuiteDescription.setNonRunningTestAssertions(null, null);
Expand All @@ -242,7 +242,7 @@ void setNonRunningTestAssertionsBadStatusNotChecked() throws MalformedURLExcepti

@Test
void setNonRunningTestAssertionsMissingStatus() throws MalformedURLException {
testSuiteDescription.load(List.of( new URL(NS + "test-manifest-sample-1.ttl")));
testSuiteDescription.load(List.of( URI.create(NS + "test-manifest-sample-1.ttl").toURL()));
add(iri(NS, "testcase"), RDF.type, TD.TestCase);
testSuiteDescription.setNonRunningTestAssertions(null, List.of("accepted", "unreviewed"));
assertEquals(7, count(null, RDF.type, TD.TestCase));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.io.StringWriter;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -377,7 +378,7 @@ void loadTurtle() throws MalformedURLException {
void loadTurtleBadUrl() {
final DataRepository dataRepository = new DataRepository();
assertThrows(TestHarnessInitializationException.class,
() -> dataRepository.load(new URL("file:/missing.txt"))
() -> dataRepository.load(URI.create("file:/missing.txt").toURL())
);
}

Expand Down Expand Up @@ -410,7 +411,7 @@ void loadRdfa() throws Exception {
void loadRdfaBadUrl() {
final DataRepository dataRepository = new DataRepository();
assertThrows(TestHarnessInitializationException.class,
() -> dataRepository.load(new URL("file:/missing.txt"), TestUtils.SAMPLE_BASE)
() -> dataRepository.load(URI.create("file:/missing.txt").toURL(), TestUtils.SAMPLE_BASE)
);
}

Expand Down
Loading