Browse Source

library updates for java 10 build compat

Jason Rivard 7 years ago
parent
commit
b0c67ea004

+ 4 - 4
server/pom.xml

@@ -274,7 +274,7 @@
                     <dependency>
                         <groupId>com.puppycrawl.tools</groupId>
                         <artifactId>checkstyle</artifactId>
-                        <version>8.10</version>
+                        <version>8.10.1</version>
                     </dependency>
                 </dependencies>
                 <executions>
@@ -561,7 +561,7 @@
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.16.20</version>
+            <version>1.16.22</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -749,12 +749,12 @@
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
-            <version>2.8.4</version>
+            <version>2.8.5</version>
         </dependency>
         <dependency>
             <groupId>com.blueconic</groupId>
             <artifactId>browscap-java</artifactId>
-            <version>1.2.2</version>
+            <version>1.2.3</version>
         </dependency>
         <dependency>
             <groupId>org.jetbrains.xodus</groupId>

+ 4 - 0
server/src/build/spotbugs-exclude.xml

@@ -3,4 +3,8 @@
     <Match>
         <Bug pattern="SE_NO_SERIALVERSIONID,IC_INIT_CIRCULARITY,RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE,DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED,SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"/>
     </Match>
+    <Match>
+        <!-- due to bug https://github.com/spotbugs/spotbugs/issues/493 in spotbugs 3.1.3 -->
+        <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
+    </Match>
 </FindBugsFilter>

+ 0 - 9
server/src/main/java/password/pwm/ldap/ViewableUserInfoDisplayReader.java

@@ -216,15 +216,6 @@ public final class ViewableUserInfoDisplayReader
             }
         }
 
-        if ( userInfo.getResponseInfoBean() != null )
-        {
-            maker.add(
-                    ViewStatusFields.ResponsesTimestamp,
-                    Display.Field_ResponsesTimestamp,
-                    userInfo.getResponseInfoBean().getTimestamp()
-            );
-        }
-
         {
             maker.add(
                     ViewStatusFields.OTPStored,

+ 5 - 2
server/src/main/java/password/pwm/svc/wordlist/ZipReader.java

@@ -114,7 +114,11 @@ class ZipReader implements AutoCloseable, Closeable
         do
         {
             line = reader.readLine();
-            nextZipEntry();
+
+            if ( line == null )
+            {
+                nextZipEntry();
+            }
         }
         while ( line == null && zipEntry != null );
 
@@ -124,7 +128,6 @@ class ZipReader implements AutoCloseable, Closeable
             lineCounter++;
         }
 
-        //crazy debug line: LOGGER.trace("read line " + fileStats.getLines() + " '" + line + "' from " +   currentZipName());
         return line;
     }
 }

+ 1 - 1
server/src/main/java/password/pwm/util/java/JavaHelper.java

@@ -319,7 +319,7 @@ public class JavaHelper
         return IOUtils.copyLarge( input, output, 0, -1, buffer );
     }
 
-    public static long copyWhilePredicate( final InputStream input, final OutputStream output, final Predicate predicate )
+    public static long copyWhilePredicate( final InputStream input, final OutputStream output, final Predicate<Long> predicate )
             throws IOException
     {
         final int bufferSize = 4 * 1024;

+ 7 - 2
server/src/main/java/password/pwm/util/secure/SecureEngine.java

@@ -43,6 +43,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Writer;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
 import java.security.GeneralSecurityException;
@@ -289,9 +290,13 @@ public class SecureEngine
 
             while ( fileChannel.read( byteBuffer ) > 0 )
             {
-                byteBuffer.flip();
+                // redundant cast to buffer to solve jdk8/9 inter-op issue
+                ( ( Buffer ) byteBuffer ).flip();
+
                 messageDigest.update( byteBuffer );
-                byteBuffer.clear();
+
+                // redundant cast to buffer to solve jdk8/9 inter-op issue
+                ( ( Buffer ) byteBuffer ).clear();
             }
 
             return JavaHelper.byteArrayToHexString( messageDigest.digest() );

+ 1 - 1
server/src/main/resources/password/pwm/config/PwmSetting.xml

@@ -496,7 +496,7 @@
     <setting hidden="false" key="ldap.rootContexts" level="0">
         <flag>ldapDNsyntax</flag>
         <example>ou=users,o=example</example>
-        <example template="AD">cn=users,dc=site,dc=example,dc=net</example>
+        <example template="AD">CN=users,DC=site,DC=example,DC=net</example>
         <default/>
     </setting>
     <setting hidden="false" key="ldap.selectableContexts" level="2">