directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [1/2] directory-kerby git commit: DIRKRB Default KDC network repeatedly reports socket timeout exception unnecessarily
Date Tue, 29 Sep 2015 22:59:40 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master f9d9974b9 -> 59a6b65bb


DIRKRB Default KDC network repeatedly reports socket timeout exception unnecessarily


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

Branch: refs/heads/master
Commit: 3b5a44638c2cfbc4ba968f82e52ace09dd6edd32
Parents: 3dd63f3
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Wed Sep 30 06:57:42 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Wed Sep 30 06:57:42 2015 +0800

----------------------------------------------------------------------
 docs/kerby-checkstyle.xml                                    | 3 +++
 .../kerberos/kdc/identitybackend/JsonIdentityBackend.java    | 8 ++++----
 .../org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java | 8 +++++---
 3 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/3b5a4463/docs/kerby-checkstyle.xml
----------------------------------------------------------------------
diff --git a/docs/kerby-checkstyle.xml b/docs/kerby-checkstyle.xml
index 239edbd..3538cd6 100644
--- a/docs/kerby-checkstyle.xml
+++ b/docs/kerby-checkstyle.xml
@@ -133,6 +133,7 @@
         <module name="ArrayTypeStyle"/>
         <module name="UpperEll"/>
 
+        <module name="FileContentsHolder"/>
 
     </module>
 
@@ -144,4 +145,6 @@
     <!-- See http://checkstyle.sourceforge.net/config_misc.html#UniqueProperties -->
     <module name="UniqueProperties"/>
 
+    <module name="SuppressionCommentFilter"/>
+
 </module>

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/3b5a4463/kerby-backend/json-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/JsonIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/json-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/JsonIdentityBackend.java
b/kerby-backend/json-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/JsonIdentityBackend.java
index 7aadf43..6139ef3 100644
--- a/kerby-backend/json-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/JsonIdentityBackend.java
+++ b/kerby-backend/json-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/JsonIdentityBackend.java
@@ -298,8 +298,8 @@ public class JsonIdentityBackend extends AbstractIdentityBackend {
 
         @Override
         public BatchTrans addIdentity(KrbIdentity identity) throws KrbException {
-            if (identity != null &&
-                    identities.containsKey(identity.getPrincipalName())) {
+            if (identity != null
+                    && identities.containsKey(identity.getPrincipalName())) {
                 identities.put(identity.getPrincipalName(), identity);
             }
             return this;
@@ -307,8 +307,8 @@ public class JsonIdentityBackend extends AbstractIdentityBackend {
 
         @Override
         public BatchTrans updateIdentity(KrbIdentity identity) throws KrbException {
-            if (identity != null &&
-                    identities.containsKey(identity.getPrincipalName())) {
+            if (identity != null
+                    && identities.containsKey(identity.getPrincipalName())) {
                 identities.put(identity.getPrincipalName(), identity);
             }
             return this;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/3b5a4463/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java
index 7174edd..e3d7570 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KdcNetwork.java
@@ -73,6 +73,7 @@ public abstract class KdcNetwork {
         }).start();
     }
 
+    //CHECKSTYLE:OFF
     private void run() {
         while (true) {
             synchronized (this) {
@@ -85,7 +86,7 @@ public abstract class KdcNetwork {
                 try {
                     checkAndAccept();
                 } catch (SocketTimeoutException e) { //NOPMD
-                    System.err.println(e); //NOOP as normal
+                    //NOOP as normal
                 } catch (IOException e) {
                     throw new RuntimeException("Error occured while checking tcp connections",
e);
                 }
@@ -94,14 +95,15 @@ public abstract class KdcNetwork {
             if (tpair.udpAddress != null) {
                 try {
                     checkUdpMessage();
-                } catch (SocketTimeoutException e) {
-                    System.err.println(e); //NOOP as normal
+                } catch (SocketTimeoutException e) { //NOPMD
+                    //NOOP as normal
                 } catch (IOException e) {
                     throw new RuntimeException("Error occured while checking udp connections",
e);
                 }
             }
         }
     }
+    //CHECKSTYLE:ON
 
     public synchronized void stop() {
         isStopped = true;


Mime
View raw message