diff --git a/build.gradle b/build.gradle index 906f6060..acc80057 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,6 @@ repositories { dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' - compile 'org.bouncycastle:bcprov-jdk15on:1.59' - compile 'org.bouncycastle:bcpg-jdk15on:1.59' + compile 'org.bouncycastle:bcprov-jdk15on:1.60' + compile 'org.bouncycastle:bcpg-jdk15on:1.60' } diff --git a/src/main/java/org/pgpainless/pgpainless/util/BCUtil.java b/src/main/java/org/pgpainless/pgpainless/util/BCUtil.java index 732ee32f..173ebb05 100644 --- a/src/main/java/org/pgpainless/pgpainless/util/BCUtil.java +++ b/src/main/java/org/pgpainless/pgpainless/util/BCUtil.java @@ -76,16 +76,7 @@ public class BCUtil { list.add(k); } - // TODO: Change to simply using the List constructor once BC 1.60 gets released. - try { - Constructor constructor; - constructor = PGPPublicKeyRing.class.getDeclaredConstructor(List.class); - constructor.setAccessible(true); - PGPPublicKeyRing pubring = constructor.newInstance(list); - return pubring; - } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) { - throw new AssertionError(e); - } + return new PGPPublicKeyRing(list); } /*