bcgit / bc-java

Bouncy Castle Java Distribution (Mirror)
https://www.bouncycastle.org/java.html
MIT License
2.3k stars 1.14k forks source link

Please support building on Java 9 #209

Closed FauxFaux closed 3 years ago

FauxFaux commented 7 years ago

Java 9 is to be released in 30 days. Currently, bouncy-castle works fine on it (as far as I'm aware), but doesn't compile from source due to some trivial changes.

After fixing these, however, the ant build fails to generate the javadoc on my machine. I do not understand why. Someone more familiar with ant/the ant build could have a look.

Cheers.

diff --git a/ant/jdk15+.xml b/ant/jdk15+.xml
index d43ea8160..ccefee4a4 100644
--- a/ant/jdk15+.xml
+++ b/ant/jdk15+.xml
@@ -2,8 +2,8 @@

 <project name="crypto1.5" default="build" basedir="..">

-    <property name="bc.javac.source" value="1.5" />
-    <property name="bc.javac.target" value="1.5" />
+    <property name="bc.javac.source" value="1.6" />
+    <property name="bc.javac.target" value="1.6" />
     <property name="build.dir" value="build" />
     <property name="jdk.name" value="jdk1.5" />
     <property name="artifacts.dir" value="${build.dir}/artifacts/${jdk.name}" />
diff --git a/prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java b/prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
index e9fe38323..c1efe7c35 100644
--- a/prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
+++ b/prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
@@ -259,7 +259,7 @@ public void setSeed(long seed)
                 if (seedAvailable.getAndSet(false))
                 {
                     samples.set(0);
-                    drbg.reseed(null);
+                    drbg.reseed((byte[]) null);
                 }
             }
hxl9654 commented 7 years ago

+1

dghgit commented 3 years ago

I'm closing this as I think the gradle build is probably now the way to deal with this. Basic BC with ant is still compiled using 1.8 with the multi-release facility used to add additional functionality.