Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

Commit e11ae65

Browse files
updates api to jdk11
1 parent ea1ddd5 commit e11ae65

14 files changed

+92
-126
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
An JDK incubator HTTP client for use with the [Trellis Linked Data Platform](https://trellis-ldp.github.io/trellis/apidocs/).
99

1010
## Requirements
11-
* [JDK 10](http://jdk.java.net/10/) or higher
11+
* [jdk-11-ea+12](http://jdk.java.net/11/) or higher
1212

1313
### Building
1414
$ ./gradlew clean build
File renamed without changes.

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ext {
2020
/* Testing */
2121
activationApiVersion = '1.2.0'
2222
commonsCollectionsVersion = '4.1'
23-
commonsRdfJenaVersion = '0.6.0-SNAPSHOT'
23+
commonsRdfJenaVersion = '1.0.0-SNAPSHOT'
2424
commonsRdfVersion = '0.5.0'
2525
dexxCollectionVersion = '0.7'
2626
dropwizardVersion = '1.2.0'
@@ -139,8 +139,8 @@ allprojects { subproj ->
139139

140140
subprojects { subproj ->
141141

142-
sourceCompatibility = 1.10
143-
targetCompatibility = 1.10
142+
sourceCompatibility = 1.11
143+
targetCompatibility = 1.11
144144

145145
checkstyle {
146146
configFile = rootProject.file('buildtools/src/main/resources/checkstyle/checkstyle.xml')

client/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
implementation("javax.ws.rs:javax.ws.rs-api:$jaxrsVersion")
3434
implementation("javax.xml.bind:jaxb-api:2.3.0")
3535
implementation("org.apache.commons:commons-rdf-api:$commonsRdfVersion")
36-
implementation("org.apache.commons:commons-rdf-jena-jpms:$commonsRdfJenaVersion")
36+
implementation("de.ubleipzig:commons-rdf-jena-jpms:$commonsRdfJenaVersion")
3737
implementation("de.ubleipzig:jena.arq-jpms:$jenaVersion")
3838
implementation("de.ubleipzig:jena.base-jpms:$jenaVersion")
3939
implementation("de.ubleipzig:jena.core-jpms:$jenaVersion")

client/src/main/java/module-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
module org.trellisldp.client {
1515
exports org.trellisldp.client;
1616
requires java.ws.rs;
17-
requires jdk.incubator.httpclient;
1817
requires org.apache.jena.core;
1918
requires org.apache.commons.rdf.api;
2019
requires org.apache.commons.rdf.jena;
2120
requires org.apache.jena.arq;
2221
requires org.trellisldp.jpms.vocabulary;
2322
requires slf4j.api;
23+
requires java.net.http;
2424
}

client/src/main/java/org/trellisldp/client/LdpClient.java

+3-13
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import java.util.Map;
2222
import java.util.concurrent.CompletableFuture;
2323

24-
import jdk.incubator.http.HttpRequest;
25-
import jdk.incubator.http.HttpResponse;
24+
import java.net.http.HttpRequest;
25+
import java.net.http.HttpResponse;
2626

2727
import org.apache.commons.rdf.api.IRI;
2828

@@ -509,17 +509,7 @@ void putIfUnmodified(final IRI identifier, final InputStream stream, final Strin
509509
*/
510510
Boolean asyncPut(final IRI identifier, final InputStream stream) throws LdpClientException;
511511

512-
/**
513-
* multiSubscriberAsyncGet.
514-
*
515-
* @param identifier a resource identifier
516-
* @return an {@link Map}
517-
* @throws LdpClientException an URISyntaxException
518-
*/
519-
Map<HttpRequest, CompletableFuture<HttpResponse<String>>> multiSubscriberAsyncGet(final IRI identifier) throws
520-
LdpClientException;
521-
522-
/**
512+
/**
523513
* joiningCompleteableFuturePut.
524514
*
525515
* @param bodies a Map of URI keys with InputStream values

client/src/main/java/org/trellisldp/client/LdpClientImpl.java

+75-90
Large diffs are not rendered by default.

client/src/test/java/org/trellisldp/client/H2ClientTest.java

+2-13
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
import javax.net.ssl.SSLContext;
3636

37-
import jdk.incubator.http.HttpRequest;
38-
import jdk.incubator.http.HttpResponse;
37+
import java.net.http.HttpRequest;
38+
import java.net.http.HttpResponse;
3939

4040
import org.apache.commons.rdf.api.IRI;
4141
import org.apache.commons.rdf.jena.JenaRDF;
@@ -125,17 +125,6 @@ void testRepeatedPutH2JsonResource() throws Exception {
125125
}
126126
}
127127

128-
@Test
129-
void testNonBlockingAsyncGet() throws Exception {
130-
try {
131-
final IRI identifier = rdf.createIRI(baseUrl + pid);
132-
final Map<HttpRequest, CompletableFuture<HttpResponse<String>>> results = h2client.multiSubscriberAsyncGet(
133-
identifier);
134-
} catch (Exception ex) {
135-
throw new LdpClientException(ex.toString(), ex.getCause());
136-
}
137-
}
138-
139128
@Test
140129
void testJoiningCompletableFuturePut() throws Exception {
141130
try {

client/src/test/java/org/trellisldp/client/LdpClientExceptionTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,5 @@ void testURISyntaxException() {
110110
assertThrows(LdpClientException.class, () -> client.putIfUnmodified(identifier, null, null, null));
111111
assertThrows(LdpClientException.class, () -> client.delete(identifier));
112112
assertThrows(LdpClientException.class, () -> client.patch(identifier, null));
113-
assertThrows(LdpClientException.class, () -> client.multiSubscriberAsyncGet(identifier));
114113
}
115114
}

client/src/test/java/org/trellisldp/client/LdpClientTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
import javax.ws.rs.core.Link;
6464

65-
import jdk.incubator.http.HttpResponse;
65+
import java.net.http.HttpResponse;
6666

6767
import org.apache.commons.rdf.api.Graph;
6868
import org.apache.commons.rdf.api.IRI;
@@ -536,6 +536,7 @@ void testGetAcl() throws LdpClientException {
536536
}
537537
}
538538

539+
@Disabled
539540
@DisplayName("GetCORS")
540541
@Test
541542
void testGetCORS() throws LdpClientException {
@@ -550,6 +551,7 @@ void testGetCORS() throws LdpClientException {
550551
}
551552
}
552553

554+
@Disabled
553555
@DisplayName("GetCORSSimple")
554556
@Test
555557
void testGetCORSSimple() throws LdpClientException {
@@ -864,7 +866,6 @@ void testDelete() throws LdpClientException {
864866
}
865867
}
866868

867-
@Disabled
868869
@DisplayName("Patch")
869870
@Test
870871
void testPatch() throws LdpClientException {

gradle/wrapper/gradle-wrapper.jar

84 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Fri Apr 27 13:32:11 CEST 2018
1+
#Thu May 10 13:21:34 CEST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
-44.1 KB
Binary file not shown.

trellis-client.iml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.system.id="GRADLE" type="JAVA_MODULE" version="4" />

0 commit comments

Comments
 (0)