Skip to content

Commit

Permalink
Merge pull request #225 from overture-stack/rc/3.0.1
Browse files Browse the repository at this point in the history
Release Candidate 3.0.1
  • Loading branch information
rtisma authored Jan 15, 2020
2 parents 942e0ba + 540a3d5 commit a7cef70
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S

<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<packaging>pom</packaging>

<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion score-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
<parent>
<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*
* 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 <http://www.gnu.org/licenses/>.
*
* 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;
Expand All @@ -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;
Expand All @@ -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;

/**
Expand All @@ -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();
}
Expand Down Expand Up @@ -103,7 +101,7 @@ private Entity read(@NonNull String path) {

@SneakyThrows
private List<Entity> readAll(@NonNull String path) {
val results = Lists.<Entity> newArrayList();
val results = Lists.<Entity>newArrayList();
boolean last = false;
int pageNumber = 0;

Expand All @@ -114,7 +112,8 @@ private List<Entity> readAll(@NonNull String path) {

val result = MAPPER.readValue(url, ObjectNode.class);
last = result.path("last").asBoolean();
List<Entity> page = MAPPER.convertValue(result.path("content"), new TypeReference<ArrayList<Entity>>() {});
List<Entity> page = MAPPER.convertValue(result.path("content"), new TypeReference<ArrayList<Entity>>() {
});

results.addAll(page);
pageNumber++;
Expand All @@ -134,7 +133,7 @@ public List<String> 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).
Expand Down
2 changes: 1 addition & 1 deletion score-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
<parent>
<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion score-fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
<parent>
<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion score-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
<parent>
<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion score-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
<parent>
<groupId>bio.overture</groupId>
<artifactId>score</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit a7cef70

Please sign in to comment.