directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject directory-kerby git commit: Fixing some errors thrown up by SpotBugs
Date Mon, 26 Feb 2018 13:26:21 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/1.1.x-fixes 7bd36ae96 -> afe75af47


Fixing some errors thrown up by SpotBugs


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/afe75af4
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/afe75af4
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/afe75af4

Branch: refs/heads/1.1.x-fixes
Commit: afe75af47224414a6dfc267ce8367355857ed63e
Parents: 7bd36ae
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Feb 26 13:12:16 2018 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Feb 26 13:26:14 2018 +0000

----------------------------------------------------------------------
 .../kerb/admin/server/kadmin/AdminServerHandler.java         | 5 ++---
 .../kerby/kerberos/kerb/server/request/KdcRequest.java       | 8 +++-----
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/afe75af4/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
index 43b042b..7875fa6 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
@@ -224,12 +224,11 @@ public class AdminServerHandler {
         AdminMessageCode value = new AdminMessageCode(xdrFieldInfos);
         adminMessage.setMessageBuffer(ByteBuffer.wrap(value.encode()));
 
-        ByteBuffer responseMessage = KadminCode.encodeMessage(adminMessage);
-        return responseMessage;
+        return KadminCode.encodeMessage(adminMessage);
     }
 
     private String listToString(List<String> list) {
-        if (list.size() <= 0) {
+        if (list.isEmpty()) {
             return null;
         }
         //Both speed and safety,so use StringBuilder

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/afe75af4/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
index a2f009a..2e97451 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
@@ -220,17 +220,15 @@ public abstract class KdcRequest {
                 if (paEntry.getPaDataType() == PaDataType.FX_FAST) {
                     LOG.info("Found fast padata and starting to process it.");
 
-                    PaFxFastRequest paFxFastRequest = new PaFxFastRequest();
-                    KrbFastArmoredReq fastArmoredReq = null;
+                    PaFxFastRequest paFxFastRequest = null;
                     try {
-                        paFxFastRequest = KrbCodec.decode(paEntry.getPaDataValue(),
-                            PaFxFastRequest.class);
+                        paFxFastRequest = KrbCodec.decode(paEntry.getPaDataValue(), PaFxFastRequest.class);
                     } catch (KrbException e) {
                         String errMessage = "Decode PaFxFastRequest failed. " + e.getMessage();
                         LOG.error(errMessage);
                         throw new KrbException(errMessage);
                     }
-                    fastArmoredReq = paFxFastRequest.getFastArmoredReq();
+                    KrbFastArmoredReq fastArmoredReq = paFxFastRequest.getFastArmoredReq();
                     if (fastArmoredReq == null) {
                         return;
                     }


Mime
View raw message