directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [directory-server] branch master updated: Fixing a few trivial issues identified by SpotBugs
Date Tue, 08 Sep 2020 09:35:52 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new fabf91c  Fixing a few trivial issues identified by SpotBugs
fabf91c is described below

commit fabf91c375aff5542ee2aa92ef9cb9bcf050e2a2
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Tue Sep 8 10:35:30 2020 +0100

    Fixing a few trivial issues identified by SpotBugs
---
 .../apache/directory/server/core/factory/DSAnnotationProcessor.java | 2 +-
 .../java/org/apache/directory/shared/kerberos/KerberosUtils.java    | 6 +++---
 .../server/kerberos/kdc/ticketgrant/TicketGrantingService.java      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
index b5be49c..028808c 100644
--- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
+++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
@@ -472,7 +472,7 @@ public final class DSAnnotationProcessor
     
     private static boolean isDn( String str )
     {
-        if ( ( Strings.isEmpty( str ) ) | ( str.length() < 3 ) )
+        if ( ( Strings.isEmpty( str ) ) || ( str.length() < 3 ) )
         {
             return false;
         }
diff --git a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
index 43b3f21..23381c8 100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
@@ -389,11 +389,11 @@ public class KerberosUtils
     {
         String cipherName = Strings.toLowerCaseAscii( encType.getName() );
 
-        for ( String c : cipherAlgoMap.keySet() )
+        for ( Map.Entry<String, String> entry : cipherAlgoMap.entrySet() )
         {
-            if ( cipherName.startsWith( c ) )
+            if ( cipherName.startsWith( entry.getKey() ) )
             {
-                return cipherAlgoMap.get( c );
+                return entry.getValue();
             }
         }
 
diff --git a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
index 1cd8797..54266b9 100644
--- a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
+++ b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
@@ -322,7 +322,7 @@ public final class TicketGrantingService
                 EncTicketPart encTicketPart = tgt.getEncTicketPart();
                 EncryptionKey sessionKey = encTicketPart.getKey();
 
-                if ( authenticatorChecksum == null || authenticatorChecksum.getChecksumType()
== null
+                if ( authenticatorChecksum.getChecksumType() == null
                     || authenticatorChecksum.getChecksumValue() == null || bodyBytes == null
)
                 {
                     throw new KerberosException( ErrorType.KRB_AP_ERR_INAPP_CKSUM );


Mime
View raw message