Repository: hyperledger/quilt
Pull request #198 (2019-05-29 13:50:09)

Update dependency versions
* Update Jackson for securit alert
* Fix unit tests
* Remove unused bcprov libraries.

Signed-off-by: David Fuelling <sappenin@gmail.com>

codecov-io: # [Codecov](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=h1) Report
> Merging [#198](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=desc) into [master](https://codecov.io/gh/hyperledger/quilt/commit/4b8278fb4b373693b2fd8f2bd6d8ec9da8db097e?src=pr&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/hyperledger/quilt/pull/198/graphs/tree.svg?width=650&token=XEfCq6zC6W&height=150&src=pr)](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master     #198      +/-   ##
============================================
+ Coverage     73.95%   73.99%   +0.04%     
  Complexity      387      387              
============================================
  Files           112      112              
  Lines          1739     1738       -1     
  Branches        158      156       -2     
============================================
  Hits           1286     1286              
- Misses          381      382       +1     
+ Partials         72       70       -2
```


| [Impacted Files](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...ava/org/interledger/ildcp/IldcpResponsePacket.java](https://codecov.io/gh/hyperledger/quilt/pull/198/diff?src=pr&el=tree#diff-aWxkY3AtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9pbnRlcmxlZGdlci9pbGRjcC9JbGRjcFJlc3BvbnNlUGFja2V0LmphdmE=) | `66.66% <ø> (ø)` | `2 <0> (ø)` | :arrow_down: |
| [...g/asn/framework/AsnObjectSerializationContext.java](https://codecov.io/gh/hyperledger/quilt/pull/198/diff?src=pr&el=tree#diff-Y29kZWMtZnJhbWV3b3JrL3NyYy9tYWluL2phdmEvb3JnL2ludGVybGVkZ2VyL2VuY29kaW5nL2Fzbi9mcmFtZXdvcmsvQXNuT2JqZWN0U2VyaWFsaXphdGlvbkNvbnRleHQuamF2YQ==) | `67.34% <0%> (ø)` | `9% <0%> (ø)` | :arrow_down: |
| [...ger/core/asn/codecs/AsnInterledgerPacketCodec.java](https://codecov.io/gh/hyperledger/quilt/pull/198/diff?src=pr&el=tree#diff-aWxwLWNvcmUtY29kZWNzL3NyYy9tYWluL2phdmEvb3JnL2ludGVybGVkZ2VyL2NvcmUvYXNuL2NvZGVjcy9Bc25JbnRlcmxlZGdlclBhY2tldENvZGVjLmphdmE=) | `76.92% <0%> (+2.84%)` | `9% <0%> (ø)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=footer). Last update [4b8278f...b3dc93d](https://codecov.io/gh/hyperledger/quilt/pull/198?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/ildcp-core/src/main/java/org/interledger/ildcp/IldcpResponsePacket.java b/ildcp-core/src/main/java/org/interledger/ildcp/IldcpResponsePacket.java
index 51b4e70..70ac6f5 100644
--- a/ildcp-core/src/main/java/org/interledger/ildcp/IldcpResponsePacket.java
+++ b/ildcp-core/src/main/java/org/interledger/ildcp/IldcpResponsePacket.java
@@ -26,6 +26,8 @@ import org.interledger.core.InterledgerFulfillment;
 
 import org.immutables.value.Value.Default;
 
+import java.util.Base64;
+
 /**
  * An extension of {@link InterledgerFulfillPacket} that is also a {@link IldcpResponsePacket} that can be used as an
  * IL-DCP response over Interledger.
@@ -73,5 +75,6 @@ public interface IldcpResponsePacket extends InterledgerFulfillPacket {
     public byte[] getData() {
       return new byte[0];
     }
+
   }
 }
diff --git a/ilp-core/src/main/java/org/interledger/core/package-info.java b/ilp-core/src/main/java/org/interledger/core/package-info.java
index 5ff3bf0..78715b7 100644
--- a/ilp-core/src/main/java/org/interledger/core/package-info.java
+++ b/ilp-core/src/main/java/org/interledger/core/package-info.java
@@ -1,24 +1,3 @@
-/**
- * This package contains classes related to the core Interledger Protocol (ILP) which is the
- * foundational protocol in the overall Interledger suite of protocols. For more details about the
- * ILP core protocol, reference
- * <a href="https://github.com/interledger/rfcs/blob/master/0003-interledger-protocol/0003-interledger-protocol.md">IL-RFC-3</a>.
- *
- * All classes ship a with a default immutable implementation that can be instantiated through the
- * static builder.
- *
- * <pre>
- *  {@code
- *  InterledgerPreparePacket payment = InterledgerPreparePacket.builder()
- *      .destinationAccount(InterledgerAddress.of("g.crypto.xrp.r982734982367498"))
- *      .data()
- *  }
- * </pre>
- *
- * @see "https://github.com/interledger/rfcs/blob/master/0003-interledger-protocol"
- */
-package org.interledger.core;
-
 /*-
  * ========================LICENSE_START=================================
  * Interledger Core
@@ -28,9 +7,9 @@ package org.interledger.core;
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,3 +17,23 @@ package org.interledger.core;
  * limitations under the License.
  * =========================LICENSE_END==================================
  */
+/**
+ * <p>This package contains classes related to the core Interledger Protocol (ILP) which is the foundational protocol
+ * in the overall Interledger suite of protocols. For more details about the ILP core protocol, reference
+ * <a href="https://github.com/interledger/rfcs/blob/master/0003-interledger-protocol/0003-interledger-protocol.md">
+ * IL-RFC-3</a></p>.
+ *
+ * <p>All classes ship a with a default immutable implementation that can be instantiated through the static
+ * builder.</p>
+ *
+ * <pre>
+ *  {@code
+ *  InterledgerPreparePacket payment = InterledgerPreparePacket.builder()
+ *      .destinationAccount(InterledgerAddress.of("g.crypto.xrp.r982734982367498"))
+ *      .data()
+ *  }
+ * </pre>
+ *
+ * @see "https://github.com/interledger/rfcs/blob/master/0003-interledger-protocol"
+ */
+package org.interledger.core;
diff --git a/jackson-datatypes/pom.xml b/jackson-datatypes/pom.xml
index 5ea60e1..52c0f96 100644
--- a/jackson-datatypes/pom.xml
+++ b/jackson-datatypes/pom.xml
@@ -35,11 +35,6 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.bouncycastle</groupId>
-      <artifactId>bcprov-jdk16</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
       <artifactId>value</artifactId>
diff --git a/pom.xml b/pom.xml
index c327079..4cdef7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
     </checkstyle.output.file>
     <checkstyle.violationSeverity>warning</checkstyle.violationSeverity>
 
-    <jackson.version>2.9.8</jackson.version>
+    <jackson.version>2.9.9</jackson.version>
   </properties>
 
   <modules>
@@ -183,7 +183,7 @@
       <dependency>
         <groupId>org.immutables</groupId>
         <artifactId>value</artifactId>
-        <version>2.7.3</version>
+        <version>2.7.5</version>
         <scope>provided</scope>
       </dependency>
 
@@ -202,13 +202,7 @@
       <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
-        <version>25.0-jre</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.bouncycastle</groupId>
-        <artifactId>bcprov-jdk16</artifactId>
-        <version>1.46</version>
+        <version>27.1-jre</version>
       </dependency>
 
       <dependency>
@@ -221,7 +215,7 @@
       <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
-        <version>2.18.3</version>
+        <version>2.28.1</version>
         <scope>test</scope>
       </dependency>
 
@@ -241,13 +235,13 @@
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>versions-maven-plugin</artifactId>
-          <version>2.5</version>
+          <version>2.7</version>
         </plugin>
 
         <!-- org.apache.maven.plugins:maven-compiler-plugin -->
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.6.2</version>
+          <version>3.8.1</version>
           <configuration>
             <source>${maven.compiler.source}</source>
             <target>${maven.compiler.target}</target>
@@ -257,7 +251,7 @@
         <!-- org.apache.maven.plugins:maven-source-plugin -->
         <plugin>
           <artifactId>maven-source-plugin</artifactId>
-          <version>2.2.1</version>
+          <version>3.1.0</version>
           <executions>
             <execution>
               <id>attach-sources</id>
@@ -271,7 +265,7 @@
         <!-- org.apache.maven.plugins:maven-javadoc-plugin -->
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
-          <version>2.10.4</version>
+          <version>3.1.0</version>
           <executions>
             <execution>
               <id>attach-javadocs</id>
@@ -286,14 +280,14 @@
         <plugin>
           <artifactId>maven-checkstyle-plugin</artifactId>
           <!-- Lock down plugin version for build reproducibility -->
-          <version>2.17</version>
+          <version>3.1.0</version>
           <inherited>true</inherited>
           <dependencies>
             <!-- Update Checkstyle version used -->
             <dependency>
               <groupId>com.puppycrawl.tools</groupId>
               <artifactId>checkstyle</artifactId>
-              <version>[8.18,)</version>
+              <version>8.21</version>
             </dependency>
             <!-- Multimodal config -->
             <dependency>
@@ -315,7 +309,7 @@
         <!-- org.jacoco:jacoc-maven-plugin -->
         <plugin>
           <groupId>org.jacoco</groupId>
-          <version>0.7.9</version>
+          <version>0.8.4</version>
           <artifactId>jacoco-maven-plugin</artifactId>
           <executions>
             <execution>
@@ -336,7 +330,7 @@
         <!-- org.apache.maven.plugins:maven-surefire-plugin -->
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.20</version>
+          <version>2.22.2</version>
           <configuration>
             <!-- CircleCI build workaround -->
             <argLine>@{argLine} -Xms1024m -Xmx2048m</argLine>
@@ -362,7 +356,7 @@
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>license-maven-plugin</artifactId>
-          <version>1.16</version>
+          <version>1.20</version>
           <configuration>
             <!--license to use for the project-->
             <licenseName>apache_v2</licenseName>


Test patch:
diff --git a/ildcp-core/src/test/java/org/interledger/ildcp/IldcpResponsePacketTest.java b/ildcp-core/src/test/java/org/interledger/ildcp/IldcpResponsePacketTest.java
index a9bcd68..0361496 100644
--- a/ildcp-core/src/test/java/org/interledger/ildcp/IldcpResponsePacketTest.java
+++ b/ildcp-core/src/test/java/org/interledger/ildcp/IldcpResponsePacketTest.java
@@ -9,9 +9,9 @@ package org.interledger.ildcp;
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -87,12 +87,12 @@ public class IldcpResponsePacketTest {
 
     assertThat(
         first.toString(),
-        is("IldcpResponsePacket{fulfillment=ImmutableInterledgerFulfillment["
+        is("IldcpResponsePacket{"
+            + "ildcpResponse=IldcpResponse{clientAddress=InterledgerAddress{value=example.foo}, assetCode=BTC, assetScale=9}, "
+            + "fulfillment=ImmutableInterledgerFulfillment["
             + "preimage=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=, "
             + "condition=Condition{hash=Zmh6rfhivXdsj8GLjp+OIAiXFIVu4jOzkCpZHQ1fKSU=}], "
-            + "data=[], "
-            + "ildcpResponse=IldcpResponse{clientAddress=InterledgerAddress{value=example.foo}, assetCode=BTC, assetScale=9}"
-            + "}")
+            + "data=[]}")
     );
   }
 }
diff --git a/jackson-datatypes/src/test/java/org/interledger/quilt/jackson/conditions/AbstractConditionModuleTest.java b/jackson-datatypes/src/test/java/org/interledger/quilt/jackson/conditions/AbstractConditionModuleTest.java
index 955ef26..a5d8cf3 100644
--- a/jackson-datatypes/src/test/java/org/interledger/quilt/jackson/conditions/AbstractConditionModuleTest.java
+++ b/jackson-datatypes/src/test/java/org/interledger/quilt/jackson/conditions/AbstractConditionModuleTest.java
@@ -24,11 +24,8 @@ import org.interledger.core.InterledgerCondition;
 import org.interledger.core.InterledgerFulfillment;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import org.junit.Before;
 
-import java.security.Provider;
-import java.security.Security;
 import java.util.Objects;
 
 /**
@@ -38,14 +35,8 @@ public abstract class AbstractConditionModuleTest {
 
   private static final String PREIMAGE = "roads? where we're going we don'";
 
-  //Add BouncyCastle so we have a provider that supports SHA256withRSA/PSS signatures.
-  static {
-    Provider bc = new BouncyCastleProvider();
-    Security.addProvider(bc);
-  }
-
-  ObjectMapper objectMapper;
-  String expectedEncodedValue;
+  protected ObjectMapper objectMapper;
+  protected String expectedEncodedValue;
   private Encoding encodingToUse;
 
   /**