From ddc2775ee3c0dd59c2a12f15ff22ca173c34cdc4 Mon Sep 17 00:00:00 2001 From: Robert Tisma <942951+rtisma@users.noreply.github.com> Date: Tue, 14 Jan 2020 15:50:36 -0500 Subject: [PATCH 1/3] Merge back from master @ 3.0.0-SNAPSHOT --- pom.xml | 2 +- score-client/pom.xml | 2 +- score-core/pom.xml | 2 +- score-fs/pom.xml | 2 +- score-server/pom.xml | 2 +- score-test/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 15c17f3c..e0bccbce 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT pom ${project.artifactId} diff --git a/score-client/pom.xml b/score-client/pom.xml index 549c6981..10f64667 100644 --- a/score-client/pom.xml +++ b/score-client/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT ../pom.xml diff --git a/score-core/pom.xml b/score-core/pom.xml index 9e778509..ea5cd62b 100644 --- a/score-core/pom.xml +++ b/score-core/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT ../pom.xml diff --git a/score-fs/pom.xml b/score-fs/pom.xml index b0ce7722..db79de92 100644 --- a/score-fs/pom.xml +++ b/score-fs/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT ../pom.xml diff --git a/score-server/pom.xml b/score-server/pom.xml index 25054d30..9945bb5f 100644 --- a/score-server/pom.xml +++ b/score-server/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT ../pom.xml diff --git a/score-test/pom.xml b/score-test/pom.xml index d81a3fa1..0a9d43c2 100644 --- a/score-test/pom.xml +++ b/score-test/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0 + 3.0.0-SNAPSHOT ../pom.xml From 6ca0077066e043969f747b4739860919c1a004fe Mon Sep 17 00:00:00 2001 From: khartmann Date: Tue, 14 Jan 2020 18:48:42 -0500 Subject: [PATCH 2/3] Bugfix: Can't stream a ArrayNode object --- .../metadata/legacy/LegacyMetadataClient.java | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/score-client/src/main/java/bio/overture/score/client/metadata/legacy/LegacyMetadataClient.java b/score-client/src/main/java/bio/overture/score/client/metadata/legacy/LegacyMetadataClient.java index 2ef031b6..eb6d370a 100644 --- a/score-client/src/main/java/bio/overture/score/client/metadata/legacy/LegacyMetadataClient.java +++ b/score-client/src/main/java/bio/overture/score/client/metadata/legacy/LegacyMetadataClient.java @@ -1,18 +1,18 @@ /* - * Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. - * + * Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package bio.overture.score.client.metadata.legacy; @@ -25,7 +25,6 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.Lists; -import com.sun.xml.bind.v2.model.core.TypeRef; import lombok.Getter; import lombok.NonNull; import lombok.SneakyThrows; @@ -39,13 +38,11 @@ import java.io.FileNotFoundException; import java.net.URL; import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.stream.Stream; import static java.util.stream.Collectors.joining; -import static java.util.stream.Collectors.maxBy; +import static java.util.stream.StreamSupport.stream; import static org.icgc.dcc.common.core.util.stream.Collectors.toImmutableList; /** @@ -66,9 +63,10 @@ public class LegacyMetadataClient { @NonNull @Getter private final String serverUrl; - + @Autowired - public LegacyMetadataClient(@Value("${metadata.url}") String serverUrl, @Value("${metadata.ssl.enabled}") boolean ssl) { + public LegacyMetadataClient(@Value("${metadata.url}") String serverUrl, + @Value("${metadata.ssl.enabled}") boolean ssl) { if (!ssl) { SSLCertificateValidation.disable(); } @@ -103,7 +101,7 @@ private Entity read(@NonNull String path) { @SneakyThrows private List readAll(@NonNull String path) { - val results = Lists. newArrayList(); + val results = Lists.newArrayList(); boolean last = false; int pageNumber = 0; @@ -114,7 +112,8 @@ private List readAll(@NonNull String path) { val result = MAPPER.readValue(url, ObjectNode.class); last = result.path("last").asBoolean(); - List page = MAPPER.convertValue(result.path("content"), new TypeReference>() {}); + List page = MAPPER.convertValue(result.path("content"), new TypeReference>() { + }); results.addAll(page); pageNumber++; @@ -134,7 +133,7 @@ public List getObjectIdsByAnalysisId(@NonNull String programId, @NonNull log.debug("Fetching analysis files from url '{}'", url); - return Stream.of(MAPPER.readValue(url, ArrayNode.class)). + return stream(MAPPER.readValue(url, ArrayNode.class).spliterator(), false). peek(r -> log.debug("Got result {}", r)). map(x -> x.path("objectId")). map(JsonNode::textValue). From 540a3d54a1b23b1f482cfa2dc5db5b50395eff7b Mon Sep 17 00:00:00 2001 From: Robert Tisma <942951+rtisma@users.noreply.github.com> Date: Wed, 15 Jan 2020 10:40:05 -0500 Subject: [PATCH 3/3] Release Candidate 3.0.1 --- pom.xml | 2 +- score-client/pom.xml | 2 +- score-core/pom.xml | 2 +- score-fs/pom.xml | 2 +- score-server/pom.xml | 2 +- score-test/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index e0bccbce..86c2e16f 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 pom ${project.artifactId} diff --git a/score-client/pom.xml b/score-client/pom.xml index 10f64667..a14d2774 100644 --- a/score-client/pom.xml +++ b/score-client/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 ../pom.xml diff --git a/score-core/pom.xml b/score-core/pom.xml index ea5cd62b..c3e71f55 100644 --- a/score-core/pom.xml +++ b/score-core/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 ../pom.xml diff --git a/score-fs/pom.xml b/score-fs/pom.xml index db79de92..3748c2c9 100644 --- a/score-fs/pom.xml +++ b/score-fs/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 ../pom.xml diff --git a/score-server/pom.xml b/score-server/pom.xml index 9945bb5f..953c84b8 100644 --- a/score-server/pom.xml +++ b/score-server/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 ../pom.xml diff --git a/score-test/pom.xml b/score-test/pom.xml index 0a9d43c2..dd50d143 100644 --- a/score-test/pom.xml +++ b/score-test/pom.xml @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S bio.overture score - 3.0.0-SNAPSHOT + 3.0.1 ../pom.xml