Skip to content

Commit

Permalink
Bump jackson and koryphe (#2782)
Browse files Browse the repository at this point in the history
* Bump jackson databind to 2.13.4.1

* Update broken test

* Bump koryphe version to 2.5.1 hotfix

* Strenghten AddOperationsToChainTest
  • Loading branch information
t92549 authored Oct 28, 2022
1 parent e892bbe commit cb73779
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and their licenses, below. For information on the dependencies of these dependen
projects below.


Koryphe (uk.gov.gchq.koryphe:koryphe:2.4.0):
Koryphe (uk.gov.gchq.koryphe:koryphe:2.5.1):

- Apache License, Version 2.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 Crown Copyright
* Copyright 2017-2022 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,6 +53,7 @@
import java.util.List;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotSame;
Expand Down Expand Up @@ -261,14 +262,18 @@ public void shouldAddAllOperationsGivenJson() throws IOException {
}

@Test
public void shouldThrowExceptionWhenAddingNullExtraOperation() throws IOException {
public void shouldConvertNullArgumentToEmptyOpChainWhenDeserialised() throws IOException {
// Given
final String nullTestJson = "{\"class\": \"uk.gov.gchq.gaffer.graph.hook.AddOperationsToChain\", \"start\":[{\"class\": null}]}";

//When / Then
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(() -> fromJson(nullTestJson.getBytes()))
.withMessageContaining("'null'");
// When
final AddOperationsToChain hook = fromJson(nullTestJson.getBytes());

// Then
assertThat(hook.getStart()).containsExactly(new OperationChain());
assertThat(hook.getEnd()).isEmpty();
assertThat(hook.getBefore()).isEmpty();
assertThat(hook.getAfter()).isEmpty();
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
<spark.minor.version>2.4</spark.minor.version>
<spark.version>${spark.minor.version}.5</spark.version>

<koryphe.version>2.4.0</koryphe.version>
<koryphe.version>2.5.1</koryphe.version>
<accumulo.version>2.0.1</accumulo.version>
<avro.version>1.8.2</avro.version>
<hadoop.version>3.3.3</hadoop.version>
<jackson.version>2.12.6</jackson.version>
<jackson.version>2.13.4</jackson.version>
<jackson.minor.version>2.11</jackson.minor.version>

<clearspring.version>2.7.0</clearspring.version>
Expand Down
2 changes: 1 addition & 1 deletion rest-api/common-rest/src/main/resources/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#
gaffer.version=2.0.0-alpha-1.3.1-SNAPSHOT
koryphe.version=2.4.0
koryphe.version=2.5.1

0 comments on commit cb73779

Please sign in to comment.