directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [5/6] directory-kerby git commit: [DIRKRB-326]-Fix CheckStyle Problems. Contributed by Yaning.
Date Thu, 09 Jul 2015 02:50:30 GMT
http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/mavibot-backend/src/main/java/org/apache/kerby/MavibotBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot-backend/src/main/java/org/apache/kerby/MavibotBackend.java b/kerby-backend/mavibot-backend/src/main/java/org/apache/kerby/MavibotBackend.java
index f78f75a..45ece90 100644
--- a/kerby-backend/mavibot-backend/src/main/java/org/apache/kerby/MavibotBackend.java
+++ b/kerby-backend/mavibot-backend/src/main/java/org/apache/kerby/MavibotBackend.java
@@ -19,7 +19,13 @@
  */
 package org.apache.kerby;
 
-import org.apache.directory.mavibot.btree.*;
+import org.apache.directory.mavibot.btree.BTree;
+import org.apache.directory.mavibot.btree.BTreeFactory;
+import org.apache.directory.mavibot.btree.BTreeTypeEnum;
+import org.apache.directory.mavibot.btree.KeyCursor;
+import org.apache.directory.mavibot.btree.PersistedBTreeConfiguration;
+import org.apache.directory.mavibot.btree.RecordManager;
+import org.apache.directory.mavibot.btree.Tuple;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
 import org.apache.directory.mavibot.btree.serializer.StringSerializer;
 import org.apache.kerby.kerberos.kerb.KrbException;
@@ -79,7 +85,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
         if (rm.getManagedTrees().contains(DATA_TREE)) {
             database = rm.getManagedTree(DATA_TREE);
         } else {
-            PersistedBTreeConfiguration<String, KrbIdentity> config = 
+            PersistedBTreeConfiguration<String, KrbIdentity> config =
                     new PersistedBTreeConfiguration<String, KrbIdentity>();
             // _no_ duplicates
             config.setAllowDuplicates(false);
@@ -104,13 +110,13 @@ public class MavibotBackend extends AbstractIdentityBackend {
 
         try {
             cursor = database.browseKeys();
-            while(cursor.hasNext()) {
+            while (cursor.hasNext()) {
                 keys.add(cursor.next());
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new KrbException("Errors occurred while fetching the principals", e);
         } finally {
-            if(cursor != null) {
+            if (cursor != null) {
                 cursor.close();
             }
         }
@@ -125,10 +131,10 @@ public class MavibotBackend extends AbstractIdentityBackend {
     protected KrbIdentity doGetIdentity(String principalName) throws KrbException {
         try {
             return database.get(principalName);
-        } catch(KeyNotFoundException e) {
+        } catch (KeyNotFoundException e) {
             LOG.debug("Identity {} doesn't exist", principalName);
             return null;
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new KrbException("Failed to get the identity " + principalName);
         }
     }
@@ -140,14 +146,14 @@ public class MavibotBackend extends AbstractIdentityBackend {
     protected synchronized KrbIdentity doAddIdentity(KrbIdentity identity) throws KrbException {
         String p = identity.getPrincipalName();
         try {
-            if(database.hasKey(p)) {
+            if (database.hasKey(p)) {
                 throw new KrbException("Identity already exists " + p);
             }
             
             return database.insert(p, identity);
-        } catch(KeyNotFoundException e) {
+        } catch (KeyNotFoundException e) {
             throw new KrbException("No such identity exists " + p);
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new KrbException("Failed to add the identity " + p);
         }
     }
@@ -159,14 +165,14 @@ public class MavibotBackend extends AbstractIdentityBackend {
     protected synchronized KrbIdentity doUpdateIdentity(KrbIdentity identity) throws KrbException {
         String p = identity.getPrincipalName();
         try {
-            if(!database.hasKey(p)) {
+            if (!database.hasKey(p)) {
                 throw new KrbException("No identity found with the principal " + p);
             }
             
             database.delete(p);
             
             return database.insert(p, identity);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new KrbException("Failed to update the identity " + p);
         }
     }
@@ -181,7 +187,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
             if (t == null) {
                 throw new KrbException("Not existing, identity = " + principalName);
             }
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new KrbException("Failed to delete the identity " + principalName);
         }
     }
@@ -193,7 +199,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
     protected void doStop() throws KrbException {
         try {
             rm.close();
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new KrbException("Failed to close the database", e);
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/KrbIdentitySerializerTest.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/KrbIdentitySerializerTest.java b/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/KrbIdentitySerializerTest.java
index 227957a..4220d46 100644
--- a/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/KrbIdentitySerializerTest.java
+++ b/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/KrbIdentitySerializerTest.java
@@ -19,21 +19,21 @@
  */
 package org.apache.kerby;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Map;
-
 import org.apache.kerby.kerberos.kerb.identity.KrbIdentity;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
 import org.junit.Test;
 
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 /**
  * Tests for KrbIdentity serializer.
  *
@@ -52,7 +52,7 @@ public class KrbIdentitySerializerTest {
         entry.setLocked(true);
 
         byte[] junk = new byte[11];
-        Arrays.fill(junk, (byte)1);
+        Arrays.fill(junk, (byte) 1);
         EncryptionKey key1 = new EncryptionKey(EncryptionType.AES128_CTS, junk);
         entry.addKey(key1);
 
@@ -73,9 +73,9 @@ public class KrbIdentitySerializerTest {
         try {
             deserialized = serializer.fromBytes(serialized, 1);
             fail("shouldn't deserialize");
-        }
-        catch(Exception e) {
+        } catch (Exception e) {
             // expected
+            System.out.println(e);
         }
     }
     
@@ -93,7 +93,7 @@ public class KrbIdentitySerializerTest {
         
         Map<EncryptionType, EncryptionKey> exKeys = expected.getKeys();
         Map<EncryptionType, EncryptionKey> acKeys = actual.getKeys();
-        for(EncryptionType et : exKeys.keySet() ) {
+        for (EncryptionType et : exKeys.keySet()) {
             EncryptionKey exKey = exKeys.get(et);
             EncryptionKey acKey = acKeys.get(et);
             

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/MavibotBackendTest.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/MavibotBackendTest.java b/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/MavibotBackendTest.java
index 8cd041c..60d365a 100644
--- a/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/MavibotBackendTest.java
+++ b/kerby-backend/mavibot-backend/src/test/java/org/apache/kerby/MavibotBackendTest.java
@@ -19,21 +19,21 @@
  */
 package org.apache.kerby;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
 
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.identity.KrbIdentity;
-import org.apache.kerby.kerberos.kerb.identity.backend.BackendTest;
 import org.apache.kerby.kerberos.kerb.identity.backend.BackendTestBase;
 import org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend;
-import org.junit.*;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.rules.TemporaryFolder;
 
+import java.io.File;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.assertTrue;
+
 /**
  * Tests for MavibotBackend.
  *
@@ -71,7 +71,7 @@ public class MavibotBackendTest extends BackendTestBase {
         List<String> principals = backend.getIdentities(0, 0);
         assertThat(principals).hasSize(identities.length);
         
-        for(KrbIdentity entry : identities) {
+        for (KrbIdentity entry : identities) {
             assertTrue(principals.contains(entry.getPrincipalName()));
         }
         

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
index c159382..6e5945e 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
@@ -28,8 +28,7 @@ public enum ZKConfKey implements ConfigKey {
     ZK_HOST("127.0.0.1"), //NOPMD
     ZK_PORT(2181),
     DATA_DIR,
-    DATA_LOG_DIR
-    ;
+    DATA_LOG_DIR;
 
     private Object defaultValue;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
index 15bc0c0..d6cfe4c 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
@@ -112,7 +112,7 @@ public class ZKUtil {
             createWithParents(zk, getParent(node));
             createWithParents(zk, node, data);
         } catch (InterruptedException ie) {
-
+            System.out.println(ie);
         }
     }
 
@@ -120,7 +120,7 @@ public class ZKUtil {
      * Returns the ACL list
      */
     private static ArrayList<ACL> createACL(ZooKeeper zk, String node) { //NOPMD
-        return ZooDefs.Ids.OPEN_ACL_UNSAFE;//TODO
+        return ZooDefs.Ids.OPEN_ACL_UNSAFE; //TODO
     }
 
     /**
@@ -162,7 +162,7 @@ public class ZKUtil {
         } catch (KeeperException.NoNodeException nne) {
             return null;
         } catch (InterruptedException ie) {
-
+            System.out.println(ie);
         }
         return children;
     }
@@ -177,7 +177,9 @@ public class ZKUtil {
      */
     public static void deleteNodeRecursively(ZooKeeper zk, String node) throws KeeperException {
         List<String> children = ZKUtil.listChildrenNoWatch(zk, node);
-        if (children == null) return;
+        if (children == null) {
+            return;
+        }
         if (!children.isEmpty()) {
             for (String child : children) {
                 deleteNodeRecursively(zk, joinZNode(node, child));

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
index 69fadf9..26dc933 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
@@ -93,7 +93,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
         }
 
         dataFile = new File(dataDir);
-        if (! dataFile.exists()) {
+        if (!dataFile.exists()) {
             dataFile.mkdirs();
         }
 
@@ -103,7 +103,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
         }
 
         dataLogFile = new File(dataLogDir);
-        if (! dataLogFile.exists()) {
+        if (!dataLogFile.exists()) {
             dataLogFile.mkdirs();
         }
 
@@ -146,7 +146,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
         QuorumPeerConfig quorumConfiguration = new QuorumPeerConfig();
         try {
             quorumConfiguration.parseProperties(startupProperties);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new KrbException("Loading quorum configuraiton failed", e);
         }
 
@@ -274,12 +274,12 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
         } catch (KeeperException e) {
             throw new KrbException("Fail to get identities from zookeeper", e);
         }
-        if(identityNames == null || identityNames.isEmpty()) {
+        if (identityNames == null || identityNames.isEmpty()) {
             return null;
         }
         List<String> newIdentities = new ArrayList<>(identityNames.size());
-        for(String name : identityNames) {
-            if(name.contains("\\")) {
+        for (String name : identityNames) {
+            if (name.contains("\\")) {
                 name = name.replace("\\", "/");
             }
             newIdentities.add(name);
@@ -291,7 +291,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
     /**
      * Set the identity to add or update an indentity in the backend.
      * @param identity . The identity to update
-     * @throws KeeperException
+     * @throws org.apache.zookeeper.KeeperException
      */
     private void setIdentity(KrbIdentity identity) throws KeeperException {
         String principalName = identity.getPrincipalName();
@@ -313,7 +313,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend {
      * @return
      */
     private String replaceSlash(String name) {
-        if(name.contains("/")) {
+        if (name.contains("/")) {
             name = name.replace("/", "\\");
         }
         return name;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-backend/zookeeper-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/ZookeeperBackendTest.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/ZookeeperBackendTest.java b/kerby-backend/zookeeper-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/ZookeeperBackendTest.java
index 81b2955..b5dab1d 100644
--- a/kerby-backend/zookeeper-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/ZookeeperBackendTest.java
+++ b/kerby-backend/zookeeper-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/ZookeeperBackendTest.java
@@ -23,10 +23,7 @@ import org.apache.kerby.config.Conf;
 import org.apache.kerby.kerberos.kdc.identitybackend.ZKConfKey;
 import org.apache.kerby.kerberos.kdc.identitybackend.ZookeeperIdentityBackend;
 import org.apache.kerby.kerberos.kerb.KrbException;
-import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Test;
 
 import java.io.File;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/AbstractLdapBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/AbstractLdapBackendKdcTest.java b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/AbstractLdapBackendKdcTest.java
index a1c2e89..7fe2f7a 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/AbstractLdapBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/AbstractLdapBackendKdcTest.java
@@ -30,25 +30,21 @@ public class AbstractLdapBackendKdcTest extends KerbyKdcTest {
     /** The used LdapServer instance */
     private static LdapServer ldapServer;
 
-    public static DirectoryService getService()
-    {
+    public static DirectoryService getService() {
         return service;
     }
 
 
-    public static void setService( DirectoryService service )
-    {
+    public static void setService(DirectoryService service) {
         AbstractLdapBackendKdcTest.service = service;
     }
 
 
-    public static LdapServer getLdapServer()
-    {
+    public static LdapServer getLdapServer() {
         return ldapServer;
     }
 
-    public static void setLdapServer( LdapServer ldapServer )
-    {
+    public static void setLdapServer(LdapServer ldapServer) {
         AbstractLdapBackendKdcTest.ldapServer = ldapServer;
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
index 894d086..3279878 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/LdapBackendKdcTest.java
@@ -69,7 +69,7 @@ public class LdapBackendKdcTest extends AbstractLdapBackendKdcTest {
     @Before
     public void startUp() throws Exception {
         Conf config = new Conf();
-        config.setString( "host", "localhost" );
+        config.setString("host", "localhost");
         config.setString("admin_dn", ADMIN_DN);
         config.setString("admin_pw", ADMIN_PW);
         config.setString("base_dn", BASE_DN);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/WithTokenKdcTestBase.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/WithTokenKdcTestBase.java b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/WithTokenKdcTestBase.java
index 31bf0f1..3976bbf 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/WithTokenKdcTestBase.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/WithTokenKdcTestBase.java
@@ -84,7 +84,7 @@ public class WithTokenKdcTestBase extends KdcTestBase {
         authToken.addAttribute("role", ROLE);
 
         List<String> aud = new ArrayList<String>();
-        if(servicePrincipal != null) {
+        if (servicePrincipal != null) {
             aud.add(servicePrincipal);
         }
         aud.add(AUDIENCE);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
index e07021c..9b9f922 100644
--- a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
+++ b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
@@ -45,9 +45,9 @@ public class KerbyKdcServer extends KdcServer {
         kadmin.createBuiltinPrincipals();
     }
 
-    private static final String USAGE = "Usage: " +
-            KerbyKdcServer.class.getSimpleName() +
-            " -start <conf-dir> <working-dir>";
+    private static final String USAGE = "Usage: "
+            + KerbyKdcServer.class.getSimpleName()
+            + " -start <conf-dir> <working-dir>";
 
     public static void main(String[] args) throws KrbException {
         if (args.length != 3) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcNetwork.java
----------------------------------------------------------------------
diff --git a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcNetwork.java b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcNetwork.java
index e658645..3df4c6e 100644
--- a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcNetwork.java
+++ b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcNetwork.java
@@ -21,7 +21,11 @@ package org.apache.kerby.kerberos.kdc.impl;
 
 import io.netty.bootstrap.Bootstrap;
 import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.*;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelInitializer;
+import io.netty.channel.ChannelOption;
+import io.netty.channel.ChannelPipeline;
+import io.netty.channel.EventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.SocketChannel;
 import io.netty.channel.socket.nio.NioDatagramChannel;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcUdpServerHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcUdpServerHandler.java b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcUdpServerHandler.java
index 5464596..2c0ea9b 100644
--- a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcUdpServerHandler.java
+++ b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/impl/NettyKdcUdpServerHandler.java
@@ -40,7 +40,8 @@ public class NettyKdcUdpServerHandler extends SimpleChannelInboundHandler<Datagr
     }
 
     @Override
-    protected void channelRead0(ChannelHandlerContext channelHandlerContext, DatagramPacket datagramPacket) throws Exception {
+    protected void channelRead0(ChannelHandlerContext channelHandlerContext,
+                                DatagramPacket datagramPacket) throws Exception {
         ByteBuf byteBuf = datagramPacket.content();
         byte[] msgBytes = new byte[byteBuf.readableBytes()];
         byteBuf.readBytes(msgBytes);
@@ -51,7 +52,8 @@ public class NettyKdcUdpServerHandler extends SimpleChannelInboundHandler<Datagr
         try {
             ByteBuffer responseMessage = myKdcHandler.handleMessage(requestMessage,
                     isTcp, clientAddress.getAddress());
-            channelHandlerContext.writeAndFlush(new DatagramPacket(Unpooled.wrappedBuffer(responseMessage), clientAddress));
+            channelHandlerContext.writeAndFlush(
+                    new DatagramPacket(Unpooled.wrappedBuffer(responseMessage), clientAddress));
         } catch (Exception e) {
             System.out.println("Error occured while processing request:"
                     + e.getMessage());

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppClient.java b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppClient.java
index 64ec1c8..12bd424 100644
--- a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppClient.java
+++ b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppClient.java
@@ -1,9 +1,33 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
 package org.apache.kerby.kerberos.kerb.integration.test.gss;
 
 import org.apache.kerby.kerberos.kerb.integration.test.AppClient;
 import org.apache.kerby.kerberos.kerb.integration.test.AppUtil;
 import org.apache.kerby.kerberos.kerb.integration.test.Transport;
-import org.ietf.jgss.*;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSManager;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.MessageProp;
+import org.ietf.jgss.Oid;
 
 public class GssAppClient extends AppClient {
     private String clientPrincipal;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppServer.java b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppServer.java
index 19dc781..8d9c6f4 100644
--- a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppServer.java
+++ b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/gss/GssAppServer.java
@@ -1,9 +1,33 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
 package org.apache.kerby.kerberos.kerb.integration.test.gss;
 
 import org.apache.kerby.kerberos.kerb.integration.test.AppServer;
 import org.apache.kerby.kerberos.kerb.integration.test.AppUtil;
 import org.apache.kerby.kerberos.kerb.integration.test.Transport;
-import org.ietf.jgss.*;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSManager;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.MessageProp;
+import org.ietf.jgss.Oid;
 
 public class GssAppServer extends AppServer {
     private String serverPrincipal;
@@ -57,8 +81,9 @@ public class GssAppServer extends AppServer {
 
     protected void doWith(GSSContext context,
                           Transport.Connection conn) throws Exception {
-        if (context.getMutualAuthState())
+        if (context.getMutualAuthState()) {
             System.out.println("Mutual authentication took place!");
+        }
 
         MessageProp prop = new MessageProp(0, false);
         byte[] token = conn.recvToken();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java
index da54aed..fb0bfca 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java
@@ -135,8 +135,8 @@ public final class AdminHelper {
             }
         }
 
-        for(KeytabEntry entry : entries) {
-            if(entry.getKvno() < maxKvno) {
+        for (KeytabEntry entry : entries) {
+            if (entry.getKvno() < maxKvno) {
                 keytab.removeKeytabEntry(entry);
             }
         }
@@ -148,13 +148,13 @@ public final class AdminHelper {
         throws KrbException {
         KrbIdentity kid = new KrbIdentity(principal);
         kid.setCreatedTime(KerberosTime.now());
-        if(kOptions.contains(KadminOption.EXPIRE)) {
+        if (kOptions.contains(KadminOption.EXPIRE)) {
             Date date = kOptions.getDateOption(KadminOption.EXPIRE);
             kid.setExpireTime(new KerberosTime(date.getTime()));
         } else {
             kid.setExpireTime(new KerberosTime(253402300799900L));
         }
-        if(kOptions.contains(KadminOption.KVNO)) {
+        if (kOptions.contains(KadminOption.KVNO)) {
             kid.setKeyVersion(kOptions.getIntegerOption(KadminOption.KVNO));
         } else {
             kid.setKeyVersion(1);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/Kadmin.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/Kadmin.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/Kadmin.java
index 030bd18..7d606e4 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/Kadmin.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/Kadmin.java
@@ -155,8 +155,8 @@ public class Kadmin {
         //Get Identity
         KrbIdentity identity = backend.getIdentity(principal);
         if (identity == null) {
-            throw new KrbException("Can not find the identity for pincipal " +
-                    principal);
+            throw new KrbException("Can not find the identity for pincipal "
+                    + principal);
         }
 
         AdminHelper.exportKeytab(keytabFile, identity);
@@ -209,8 +209,8 @@ public class Kadmin {
         principal = fixPrincipal(principal);
         KrbIdentity identity = backend.getIdentity(principal);
         if (identity == null) {
-            throw new KrbException("Principal \"" +
-                identity.getPrincipalName() + "\" does not exist.");
+            throw new KrbException("Principal \""
+                    + identity.getPrincipalName() + "\" does not exist.");
         }
         AdminHelper.updateIdentity(identity, kOptions);
         backend.updateIdentity(identity);
@@ -221,14 +221,14 @@ public class Kadmin {
         oldPrincipalName = fixPrincipal(oldPrincipalName);
         newPrincipalName = fixPrincipal(newPrincipalName);
         KrbIdentity oldIdentity = backend.getIdentity(newPrincipalName);
-        if(oldIdentity != null) {
-            throw new KrbException("Principal \"" +
-                oldIdentity.getPrincipalName() + "\" is already exist.");
+        if (oldIdentity != null) {
+            throw new KrbException("Principal \""
+                    + oldIdentity.getPrincipalName() + "\" is already exist.");
         }
         KrbIdentity identity = backend.getIdentity(oldPrincipalName);
         if (identity == null) {
-            throw new KrbException("Principal \"" +
-                oldPrincipalName + "\" does not exist.");
+            throw new KrbException("Principal \""
+                    + oldPrincipalName + "\" does not exist.");
         }
         backend.deleteIdentity(oldPrincipalName);
 
@@ -252,8 +252,8 @@ public class Kadmin {
         principal = fixPrincipal(principal);
         KrbIdentity identity = backend.getIdentity(principal);
         if (identity == null) {
-            throw new KrbException("Principal " + principal +
-                "was not found. Please check the input and try again");
+            throw new KrbException("Principal " + principal
+                    + "was not found. Please check the input and try again");
         }
         List<EncryptionKey> keys = EncryptionUtil.generateKeys(principal, password,
             getKdcConfig().getEncryptionTypes());
@@ -266,8 +266,8 @@ public class Kadmin {
         principal = fixPrincipal(principal);
         KrbIdentity identity = backend.getIdentity(principal);
         if (identity == null) {
-            throw new KrbException("Principal " + principal +
-                "was not found. Please check the input and try again");
+            throw new KrbException("Principal " + principal
+                    + "was not found. Please check the input and try again");
         }
         List<EncryptionKey> keys = EncryptionUtil.generateKeys(
             getKdcConfig().getEncryptionTypes());
@@ -276,7 +276,7 @@ public class Kadmin {
     }
 
     private String fixPrincipal(String principal) {
-        if (! principal.contains("@")) {
+        if (!principal.contains("@")) {
             principal += "@" + getKdcConfig().getKdcRealm();
         }
         return principal;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/KadminOption.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/KadminOption.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/KadminOption.java
index 8f24ac8..aa801af 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/KadminOption.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/KadminOption.java
@@ -30,12 +30,11 @@ public enum KadminOption implements KOption {
     FORCE("-force", "force", KOptionType.NOV),
     KVNO("-kvno", "initial key version number", KOptionType.INT),
     PW("-pw", "password", KOptionType.STR),
-    RANDKEY("-randkey","random key", KOptionType.NOV),
+    RANDKEY("-randkey", "random key", KOptionType.NOV),
     KEEPOLD("-keepold", "keep old passowrd", KOptionType.NOV),
     KEYSALTLIST("-e", "key saltlist", KOptionType.STR),
     K("-k", "keytab file path", KOptionType.STR),
-    KEYTAB("-keytab", "keytab file path", KOptionType.STR),
-    ;
+    KEYTAB("-keytab", "keytab file path", KOptionType.STR);
 
     private String name;
     private KOptionType type = KOptionType.NONE;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/ClientUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/ClientUtil.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/ClientUtil.java
index be221a6..6c75678 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/ClientUtil.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/ClientUtil.java
@@ -28,7 +28,7 @@ import java.net.InetSocketAddress;
 import java.util.Map;
 
 public final class ClientUtil {
-    private ClientUtil() {}
+    private ClientUtil() { }
 
     private static final String KRB5_FILE_NAME = "krb5.conf";
     private static final String KRB5_ENV_NAME = "KRB5_CONFIG";
@@ -48,8 +48,8 @@ public final class ClientUtil {
                 krbConfig.addIniConfig(confFile);
                 return krbConfig;
             } catch (IOException e) {
-                throw new KrbException("Failed to load krb config " +
-                        confFile.getAbsolutePath());
+                throw new KrbException("Failed to load krb config "
+                        + confFile.getAbsolutePath());
             }
         }
 
@@ -88,8 +88,8 @@ public final class ClientUtil {
             try {
                 krbConfig.addIniConfig(confFile);
             } catch (IOException e) {
-                throw new KrbException("Failed to load krb config " +
-                        confFile.getAbsolutePath());
+                throw new KrbException("Failed to load krb config "
+                        + confFile.getAbsolutePath());
             }
         }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
index 7e587ef..0e51a52 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
@@ -269,7 +269,7 @@ public class KrbClient {
     public ServiceTicket requestServiceTicketWithAccessToken(
             AuthToken token, String serverPrincipal,
             String armorCache) throws KrbException {
-        if (! token.isAcToken()) {
+        if (!token.isAcToken()) {
             throw new IllegalArgumentException("Access token is expected");
         }
         KOptions requestOptions = new KOptions();
@@ -306,8 +306,8 @@ public class KrbClient {
                 throw new KrbException("Failed to store tgt", e);
             }
         } else {
-            throw new IllegalArgumentException("Invalid ccache file, " +
-                    "not exist or writable: " + ccacheFile.getAbsolutePath());
+            throw new IllegalArgumentException("Invalid ccache file, "
+                    + "not exist or writable: " + ccacheFile.getAbsolutePath());
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
index 938beab..3dc3ced 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
@@ -51,14 +51,20 @@ public enum KrbConfigKey implements SectionConfigKey {
     ALLOW_WEAK_CRYPTO(true, "libdefaults"),
     TICKET_LIFETIME(24 * 3600L, "libdefaults"),
     RENEW_LIFETIME(48 * 3600L, "libdefaults"),
-    DEFAULT_TGS_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 " +
-        "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac " +
-        "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4",
+    DEFAULT_TGS_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 "
+            + "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac "
+            + "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4",
         "libdefaults"),
-    DEFAULT_TKT_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 " +
-        "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac " +
-        "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4",
-        "libdefaults");
+    DEFAULT_TKT_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 "
+            + "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac "
+            + "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4",
+        "libdefaults"),
+
+    //key for logging location
+    DEFAULT(null, "logging"),
+    KDC(null, "logging"),
+    ADMIN_SERVER(null, "logging");
+
 
     private Object defaultValue;
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
index 31abc82..762d700 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
@@ -84,8 +84,8 @@ public abstract class KrbHandler {
         } else if (messageType == KrbMessageType.KRB_ERROR) {
             KrbError error = (KrbError) kdcRep;
             //TODO: Should use the error message, now only print it.
-            System.out.println("KDC server responsed with message: " +
-                    error.getErrorCode().getMessage());
+            System.out.println("KDC server responsed with message: "
+                    + error.getErrorCode().getMessage());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOption.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOption.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOption.java
index 02467db..e331ecb 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOption.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOption.java
@@ -71,9 +71,7 @@ public enum KrbOption implements KOption {
     USE_TOKEN("use-id-token", "Using identity token"),
     TOKEN_USER_ID_TOKEN("user-id-token", "User identity token", KOptionType.STR),
     TOKEN_USER_AC_TOKEN("user-ac-token", "User access token", KOptionType.STR),
-    USE_TGT("use tgt", "use tgt to get service ticket", KOptionType.OBJ)
-
-    ;
+    USE_TGT("use tgt", "use tgt to get service ticket", KOptionType.OBJ);
 
     private String name;
     private KOptionType type;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
index e495663..5d8bdc3 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
@@ -25,7 +25,14 @@ import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
 import org.apache.kerby.kerberos.kerb.client.KrbSetting;
-import org.apache.kerby.kerberos.kerb.client.request.*;
+import org.apache.kerby.kerberos.kerb.client.request.AsRequest;
+import org.apache.kerby.kerberos.kerb.client.request.AsRequestWithCert;
+import org.apache.kerby.kerberos.kerb.client.request.AsRequestWithKeytab;
+import org.apache.kerby.kerberos.kerb.client.request.AsRequestWithPasswd;
+import org.apache.kerby.kerberos.kerb.client.request.AsRequestWithToken;
+import org.apache.kerby.kerberos.kerb.client.request.TgsRequest;
+import org.apache.kerby.kerberos.kerb.client.request.TgsRequestWithTgt;
+import org.apache.kerby.kerberos.kerb.client.request.TgsRequestWithToken;
 import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 import org.apache.kerby.kerberos.kerb.spec.ticket.ServiceTicket;
 import org.apache.kerby.kerberos.kerb.spec.ticket.TgtTicket;
@@ -91,11 +98,11 @@ public abstract class AbstractInternalKrbClient implements InternalKrbClient {
     @Override
     public ServiceTicket requestServiceTicket(KOptions requestOptions) throws KrbException {
         TgsRequest tgsRequest = null;
-        if(requestOptions.contains(KrbOption.TOKEN_USER_AC_TOKEN)) {
+        if (requestOptions.contains(KrbOption.TOKEN_USER_AC_TOKEN)) {
             tgsRequest = new TgsRequestWithToken(context);
-        } else if(requestOptions.contains(KrbOption.USE_TGT)) {
+        } else if (requestOptions.contains(KrbOption.USE_TGT)) {
             KOption tgt = requestOptions.getOption(KrbOption.USE_TGT);
-            tgsRequest = new TgsRequestWithTgt(context, (TgtTicket)tgt.getValue());
+            tgsRequest = new TgsRequestWithTgt(context, (TgtTicket) tgt.getValue());
         }
 
         if (tgsRequest == null) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthContext.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthContext.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthContext.java
index d71064d..c8f5858 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthContext.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthContext.java
@@ -62,7 +62,7 @@ public class PreauthContext {
     }
 
     public boolean hasInputPaData() {
-        return inputPaData != null && ! inputPaData.isEmpty();
+        return inputPaData != null && !inputPaData.isEmpty();
     }
 
     public PaData getInputPaData() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
index 81164cc..fec4b6e 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
@@ -112,7 +112,7 @@ public class PreauthHandler {
         PreauthContext preauthContext = kdcRequest.getPreauthContext();
 
         for (PaDataEntry pae : inPadata.getElements()) {
-            if (! preauthContext.isPaTypeAllowed(pae.getPaDataType())) {
+            if (!preauthContext.isPaTypeAllowed(pae.getPaDataType())) {
                 continue;
             }
 
@@ -151,7 +151,7 @@ public class PreauthHandler {
          * Process all informational padata types, then the first real preauth type
          * we succeed on
          */
-        for (int real = 0; real <= 1; real ++) {
+        for (int real = 0; real <= 1; real++) {
             for (PaDataEntry pae : inPadata.getElements()) {
 
                 // Restrict real mechanisms to the chosen one if we have one

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
index 05eaf24..729c146 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
@@ -19,17 +19,17 @@
  */
 package org.apache.kerby.kerberos.kerb.client.preauth.pkinit;
 
+import org.apache.kerby.KOptions;
+import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.KOptions;
 import org.apache.kerby.kerberos.kerb.client.preauth.AbstractPreauthPlugin;
-import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlag;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlags;
+import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
 import org.apache.kerby.kerberos.kerb.preauth.pkinit.PkinitIdenity;
 import org.apache.kerby.kerberos.kerb.preauth.pkinit.PkinitPreauthMeta;
-import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
@@ -37,7 +37,11 @@ import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaData;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataEntry;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
-import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.*;
+import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.AuthPack;
+import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.DHNonce;
+import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.PaPkAsReq;
+import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.PkAuthenticator;
+import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.TrustedCertifiers;
 import org.apache.kerby.kerberos.kerb.spec.x509.SubjectPublicKeyInfo;
 
 @SuppressWarnings("PMD")
@@ -112,7 +116,9 @@ public class PkinitPreauth extends AbstractPreauthPlugin {
                         PaData outPadata) throws KrbException {
 
         PkinitRequestContext reqCtx = (PkinitRequestContext) requestContext;
-        if (inPadata == null) return false;
+        if (inPadata == null) {
+            return false;
+        }
 
         boolean processingRequest = false;
         switch (inPadata.getPaDataType()) {
@@ -163,7 +169,7 @@ public class PkinitPreauth extends AbstractPreauthPlugin {
         authPack.setsupportedCmsTypes(pkinitContext.pluginOpts.createSupportedCMSTypes());
 
         if (usingRsa) {
-            // DH case
+           System.out.println(); // DH case
         } else {
             authPack.setClientPublicValue(null);
         }
@@ -211,9 +217,10 @@ public class PkinitPreauth extends AbstractPreauthPlugin {
 
         boolean doAgain = false;
         for (PaDataEntry pde : errPadata.getElements()) {
-            switch (pde.getPaDataType()) {
+         //   switch (pde.getPaDataType()) {
                 // TODO
-            }
+        //    }
+            System.out.println();
         }
 
         if (doAgain) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
index 63cdc41..192513c 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
@@ -144,14 +144,14 @@ public class TokenPreauth extends AbstractPreauthPlugin {
         AuthToken authToken;
         if (idToken != null) {
             authToken = (AuthToken) idToken.getValue();
-        } else if(acToken != null) {
+        } else if (acToken != null) {
             authToken = (AuthToken) acToken.getValue();
         } else {
             throw new KrbException("missing token.");
         }
 
         PaTokenRequest tokenPa = new PaTokenRequest();
-        tokenPa.setToken((KrbToken)authToken);
+        tokenPa.setToken((KrbToken) authToken);
         TokenInfo info = new TokenInfo();
         info.setTokenVendor("vendor");
         tokenPa.setTokenInfo(info);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/ArmoredRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/ArmoredRequest.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/ArmoredRequest.java
index a3f0221..2bcd75e 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/ArmoredRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/ArmoredRequest.java
@@ -121,7 +121,7 @@ public class ArmoredRequest {
 
     private void fastAsArmor(KrbFastRequestState state,
                                                   EncryptionKey armorKey, EncryptionKey subKey,
-                                                  Credential credential, KdcReq kdcReq )
+                                                  Credential credential, KdcReq kdcReq)
         throws KrbException {
         state.setArmorKey(armorKey);
         state.setFastArmor(fastArmorApRequest(subKey, credential));

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequest.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequest.java
index 5394b99..75216a8 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequest.java
@@ -113,7 +113,7 @@ public class AsRequest extends KdcRequest {
 
         PrincipalName tmpServerPrincipal = encKdcRepPart.getSname();
         tmpServerPrincipal.setRealm(encKdcRepPart.getSrealm());
-        if (! tmpServerPrincipal.equals(getServerPrincipal())) {
+        if (!tmpServerPrincipal.equals(getServerPrincipal())) {
             throw new KrbException(KrbErrorCode.KDC_ERR_SERVER_NOMATCH);
         }
 
@@ -132,9 +132,9 @@ public class AsRequest extends KdcRequest {
     }
 
     public TgtTicket getTicket() {
-        TgtTicket TgtTicket = new TgtTicket(getKdcRep().getTicket(),
+        TgtTicket tgtTicket = new TgtTicket(getKdcRep().getTicket(),
                 (EncAsRepPart) getKdcRep().getEncPart(), getKdcRep().getCname().getName());
-        return TgtTicket;
+        return tgtTicket;
     }
 
     private PrincipalName makeTgsPrincipal() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithKeytab.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithKeytab.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithKeytab.java
index 3cde244..f6a191c 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithKeytab.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithKeytab.java
@@ -30,7 +30,7 @@ import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 import java.io.File;
 import java.io.IOException;
 
-public class AsRequestWithKeytab extends AsRequest{
+public class AsRequestWithKeytab extends AsRequest {
 
     public AsRequestWithKeytab(KrbContext context) {
         super(context);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
index d66dd3e..7ebc64d 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
@@ -198,7 +198,7 @@ public abstract class KdcRequest {
         HostAddresses addresses = null;
         if (!hostAddresses.isEmpty()) {
             addresses = new HostAddresses();
-            for(HostAddress ha : hostAddresses) {
+            for (HostAddress ha : hostAddresses) {
                 addresses.addElement(ha);
             }
         }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbErrorUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbErrorUtil.java b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbErrorUtil.java
index 8e1ff56..a4ce350 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbErrorUtil.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbErrorUtil.java
@@ -19,7 +19,13 @@
  */
 package org.apache.kerby.kerberos.kerb.common;
 
-import org.apache.kerby.kerberos.kerb.spec.base.*;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
+import org.apache.kerby.kerberos.kerb.spec.base.EtypeInfo;
+import org.apache.kerby.kerberos.kerb.spec.base.EtypeInfo2;
+import org.apache.kerby.kerberos.kerb.spec.base.EtypeInfo2Entry;
+import org.apache.kerby.kerberos.kerb.spec.base.EtypeInfoEntry;
+import org.apache.kerby.kerberos.kerb.spec.base.KrbError;
+import org.apache.kerby.kerberos.kerb.spec.base.MethodData;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataEntry;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 
@@ -34,11 +40,10 @@ public class KrbErrorUtil {
         MethodData methodData = new MethodData();
         methodData.decode(error.getEdata());
 
-        for( PaDataEntry pd : methodData.getElements()) {
-            if( pd.getPaDataType() == PaDataType.ETYPE_INFO2 ) {
+        for (PaDataEntry pd : methodData.getElements()) {
+            if (pd.getPaDataType() == PaDataType.ETYPE_INFO2) {
                 return getEtypes2(pd.getPaDataValue());
-            }
-            else if( pd.getPaDataType() == PaDataType.ETYPE_INFO ) {
+            } else if (pd.getPaDataType() == PaDataType.ETYPE_INFO) {
                 return getEtypes(pd.getPaDataValue());
             }
         }
@@ -49,7 +54,7 @@ public class KrbErrorUtil {
         EtypeInfo info = new EtypeInfo();
         info.decode(data);
         List<EncryptionType> results = new ArrayList<EncryptionType>();
-        for( EtypeInfoEntry entry : info.getElements() ) {
+        for (EtypeInfoEntry entry : info.getElements()) {
             results.add(entry.getEtype());
         }
         return results;
@@ -59,7 +64,7 @@ public class KrbErrorUtil {
         EtypeInfo2 info2 = new EtypeInfo2();
         info2.decode(data);
         List<EncryptionType> results = new ArrayList<EncryptionType>();
-        for( EtypeInfo2Entry entry : info2.getElements() ) {
+        for (EtypeInfo2Entry entry : info2.getElements()) {
             results.add(entry.getEtype());
         }
         return results;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/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 780e61b..7174edd 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
@@ -85,7 +85,7 @@ public abstract class KdcNetwork {
                 try {
                     checkAndAccept();
                 } catch (SocketTimeoutException e) { //NOPMD
-                    //NOOP as normal
+                    System.err.println(e); //NOOP as normal
                 } catch (IOException e) {
                     throw new RuntimeException("Error occured while checking tcp connections", e);
                 }
@@ -94,8 +94,8 @@ public abstract class KdcNetwork {
             if (tpair.udpAddress != null) {
                 try {
                     checkUdpMessage();
-                } catch (SocketTimeoutException e) { //NOPMD
-                    //NOOP as normal
+                } catch (SocketTimeoutException e) {
+                    System.err.println(e); //NOOP as normal
                 } catch (IOException e) {
                     throw new RuntimeException("Error occured while checking udp connections", e);
                 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTcpTransport.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTcpTransport.java b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTcpTransport.java
index 89b5ec5..6b7cdee 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTcpTransport.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTcpTransport.java
@@ -75,7 +75,7 @@ public class KrbTcpTransport
         try {
             socket.close();
         } catch (IOException e) { //NOPMD
-            // NOOP
+            System.err.println(e); // NOOP
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbUdpTransport.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbUdpTransport.java b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbUdpTransport.java
index 29ef34b..906bdc7 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbUdpTransport.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbUdpTransport.java
@@ -77,7 +77,7 @@ public class KrbUdpTransport
         try {
             channel.close();
         } catch (IOException e) { //NOPMD
-            //NOOP
+            System.err.println(e); //NOOP
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
index a589dfa..21317a9 100644
--- a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
+++ b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
@@ -19,7 +19,12 @@
  */
 package org.apache.kerby.kerberos.kerb.codec;
 
-import org.apache.kerby.kerberos.kerb.spec.base.*;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
+import org.apache.kerby.kerberos.kerb.spec.base.HostAddrType;
+import org.apache.kerby.kerberos.kerb.spec.base.HostAddress;
+import org.apache.kerby.kerberos.kerb.spec.base.KrbMessageType;
+import org.apache.kerby.kerberos.kerb.spec.base.NameType;
+import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 import org.apache.kerby.kerberos.kerb.spec.kdc.AsReq;
 import org.apache.kerby.kerberos.kerb.spec.kdc.KdcReqBody;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaData;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosTime.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosTime.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosTime.java
index 2a39ec8..ed1b5a3 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosTime.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosTime.java
@@ -19,10 +19,10 @@
  */
 package org.apache.kerby.kerberos.kerb.spec;
 
-import java.util.Date;
-
 import org.apache.kerby.asn1.type.Asn1GeneralizedTime;
 
+import java.util.Date;
+
 /**
  * A specialization of the ASN.1 GeneralTime. The Kerberos time contains date and
  * time up to the seconds, but with no fractional seconds. It's also always
@@ -133,8 +133,12 @@ public class KerberosTime extends Asn1GeneralizedTime {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
 
         KerberosTime time = (KerberosTime) o;
         return this.getValue().equals(time.getValue());

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
index 3a6d5b6..0936a8e 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
@@ -85,13 +85,13 @@ public class HostAddress extends KrbSequenceType {
         }
         if (other == this) {
             return true;
-        } else if (! (other instanceof HostAddress)) {
+        } else if (!(other instanceof HostAddress)) {
             return false;
         }
 
         HostAddress that = (HostAddress) other;
-        if (getAddrType() == that.getAddrType() &&
-                Arrays.equals(getAddress(), that.getAddress())) {
+        if (getAddrType() == that.getAddrType()
+                && Arrays.equals(getAddress(), that.getAddress())) {
             return true;
         }
         return false;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KeyUsage.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KeyUsage.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KeyUsage.java
index ba317b7..c1b07bc 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KeyUsage.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KeyUsage.java
@@ -24,8 +24,7 @@ import org.apache.kerby.kerberos.kerb.spec.KrbEnum;
 /**
  * From krb5.hin
  */
-public enum KeyUsage implements KrbEnum
-{
+public enum KeyUsage implements KrbEnum {
     UNKNOWN(-1),
     NONE(0),
     //AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the client key

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
index 7db96f2..b84992c 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
@@ -112,7 +112,7 @@ public class KrbFlags extends Asn1BitString {
         }
 
         byte[] valueBytes = getValue();
-        flags = ((valueBytes[0] & 0xFF) << 24) | ((valueBytes[1] & 0xFF) << 16) |
-                ((valueBytes[2] & 0xFF) << 8) | (0xFF & valueBytes[3]);
+        flags = ((valueBytes[0] & 0xFF) << 24) | ((valueBytes[1] & 0xFF) << 16)
+                | ((valueBytes[2] & 0xFF) << 8) | (0xFF & valueBytes[3]);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
index e6c27c5..730cc35 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
@@ -85,7 +85,7 @@ public class KrbToken extends KrbSequenceType implements AuthToken {
 
     private void setTokenType() {
         List<String> audiences = this.innerToken.getAudiences();
-        if(audiences.size() == 1 && audiences.get(0).startsWith(KrbConstant.TGS_PRINCIPAL)) {
+        if (audiences.size() == 1 && audiences.get(0).startsWith(KrbConstant.TGS_PRINCIPAL)) {
             isIdToken(true);
         } else {
             isAcToken(true);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
index b7e5c7c..a69c6b5 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
@@ -141,7 +141,7 @@ public class PrincipalName extends KrbSequenceType {
             String otherPrincipal = (String) other;
             String thisPrincipal = getName();
             return thisPrincipal.equals(otherPrincipal);
-        } else if (! (other instanceof PrincipalName)) {
+        } else if (!(other instanceof PrincipalName)) {
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/SamType.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/SamType.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/SamType.java
index c37dd63..5b948a7 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/SamType.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/SamType.java
@@ -21,8 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 
 import org.apache.kerby.kerberos.kerb.spec.KrbEnum;
 
-public enum SamType implements KrbEnum
-{
+public enum SamType implements KrbEnum {
     SAM_NONE(0),
     /** safe SAM type enum for Enigma Logic */
     SAM_TYPE_ENIGMA(1), // Enigma Logic"
@@ -55,7 +54,7 @@ public enum SamType implements KrbEnum
 
     public static SamType fromValue(Integer value) {
         if (value != null) {
-            for (SamType st : SamType.values() ) {
+            for (SamType st : SamType.values()) {
                 if (value == st.getValue()) {
                     return st;
                 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
index 82168cf..a9b3c48 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
@@ -26,7 +26,10 @@ import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbIntegers;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.ad.AuthorizationData;
-import org.apache.kerby.kerberos.kerb.spec.base.*;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
+import org.apache.kerby.kerberos.kerb.spec.base.HostAddresses;
+import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 import org.apache.kerby.kerberos.kerb.spec.ticket.Tickets;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
index 954b7cf..df19da1 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
@@ -24,7 +24,10 @@ import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbAppSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.ad.AuthorizationData;
-import org.apache.kerby.kerberos.kerb.spec.base.*;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
+import org.apache.kerby.kerberos.kerb.spec.base.HostAddresses;
+import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
+import org.apache.kerby.kerberos.kerb.spec.base.TransitedEncoding;
 
 /**
  -- Encrypted part of ticket

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/TicketFlag.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/TicketFlag.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/TicketFlag.java
index b9de3c8..a5ea6ca 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/TicketFlag.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/TicketFlag.java
@@ -34,7 +34,7 @@ public enum TicketFlag implements KrbEnum {
     INITIAL(0x00400000),
     PRE_AUTH(0x00200000),
     HW_AUTH(0x00100000),
-    TRANSIT_POLICY_CHECKED(  0x00080000),
+    TRANSIT_POLICY_CHECKED(0x00080000),
     OK_AS_DELEGATE(0x00040000),
     ENC_PA_REP(0x00010000),
     ANONYMOUS(0x00008000);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
index 544362a..7ee86c6 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
@@ -19,7 +19,12 @@
  */
 package org.apache.kerby.kerberos.kerb.spec.x509;
 
-import org.apache.kerby.asn1.type.*;
+
+import org.apache.kerby.asn1.type.Asn1Any;
+import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
+import org.apache.kerby.asn1.type.Asn1SequenceType;
+import org.apache.kerby.asn1.type.Asn1Type;
 
 /**
  AlgorithmIdentifier  ::=  SEQUENCE  {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
index 5aa3dca..5fb7d42 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
@@ -21,7 +21,20 @@ package org.apache.kerby.kerberos.kerb.crypto;
 
 import org.apache.kerby.kerberos.kerb.KrbErrorCode;
 import org.apache.kerby.kerberos.kerb.KrbException;
-import org.apache.kerby.kerberos.kerb.crypto.cksum.*;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.CmacCamellia128CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.CmacCamellia256CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.Crc32CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.DesCbcCheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.HmacMd5Rc4CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.HmacSha1Aes128CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.HmacSha1Aes256CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.HmacSha1Des3CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.Md5HmacRc4CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.RsaMd4CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.RsaMd4DesCheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.RsaMd5CheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.RsaMd5DesCheckSum;
+import org.apache.kerby.kerberos.kerb.crypto.cksum.Sha1CheckSum;
 import org.apache.kerby.kerberos.kerb.spec.base.CheckSum;
 import org.apache.kerby.kerberos.kerb.spec.base.CheckSumType;
 import org.apache.kerby.kerberos.kerb.spec.base.KeyUsage;
@@ -117,7 +130,7 @@ public class CheckSumHandler {
                 break;
         }
 
-        if (cksumHandler == null && ! check) {
+        if (cksumHandler == null && !check) {
             String message = "Unsupported checksum type: " + cksumType.name();
             throw new KrbException(KrbErrorCode.KDC_ERR_SUMTYPE_NOSUPP, message);
         }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
index e6b8812..bf6408f 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
@@ -19,13 +19,26 @@
  */
 package org.apache.kerby.kerberos.kerb.crypto;
 
-import javax.crypto.Cipher;
-
 import org.apache.kerby.kerberos.kerb.KrbErrorCode;
-import org.apache.kerby.kerberos.kerb.crypto.enc.*;
 import org.apache.kerby.kerberos.kerb.KrbException;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Aes128CtsHmacSha1Enc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Aes256CtsHmacSha1Enc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Camellia128CtsCmacEnc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Camellia256CtsCmacEnc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Des3CbcSha1Enc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.DesCbcCrcEnc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.DesCbcMd4Enc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.DesCbcMd5Enc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Rc4HmacEnc;
+import org.apache.kerby.kerberos.kerb.crypto.enc.Rc4HmacExpEnc;
 import org.apache.kerby.kerberos.kerb.crypto.util.Random;
-import org.apache.kerby.kerberos.kerb.spec.base.*;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
+import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
+import org.apache.kerby.kerberos.kerb.spec.base.KeyUsage;
+import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
+
+import javax.crypto.Cipher;
 
 /**
  * Encryption handler as the highest level API for encryption stuffs defined in
@@ -40,9 +53,8 @@ public class EncryptionHandler {
         try {
             isAES256Enabled = Cipher.getMaxAllowedKeyLength("AES") >= 256;
         } catch (Exception e) { //NOPMD
-            // should not happen
+            System.err.println(e);
         }
-
     }
 
     public static boolean isAES256Enabled() {
@@ -129,7 +141,7 @@ public class EncryptionHandler {
                 break;
         }
 
-        if (encHandler == null && ! check) {
+        if (encHandler == null && !check) {
             String message = "Unsupported encryption type: " + eType.name();
             throw new KrbException(KrbErrorCode.KDC_ERR_ETYPE_NOSUPP, message);
         }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/CmacKcCheckSum.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/CmacKcCheckSum.java b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/CmacKcCheckSum.java
index 90f676f..5235125 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/CmacKcCheckSum.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/CmacKcCheckSum.java
@@ -29,7 +29,7 @@ public abstract class CmacKcCheckSum extends KcCheckSum {
         super(encProvider, null, computeSize, outputSize);
     }
 
-    protected byte[] mac(byte[] Kc, byte[] data, int start, int len) throws KrbException {
-        return Cmac.cmac(encProvider(), Kc, data, start, len);
+    protected byte[] mac(byte[] kc, byte[] data, int start, int len) throws KrbException {
+        return Cmac.cmac(encProvider(), kc, data, start, len);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/ConfounderedDesCheckSum.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/ConfounderedDesCheckSum.java b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/ConfounderedDesCheckSum.java
index 7b61a39..8551156 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/ConfounderedDesCheckSum.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/ConfounderedDesCheckSum.java
@@ -87,14 +87,14 @@ public abstract class ConfounderedDesCheckSum extends AbstractKeyedCheckSumTypeH
             e.printStackTrace();
         }
         if (isWeak) {
-            key[7] = (byte)(key[7] ^ 0xF0);
+            key[7] = (byte) (key[7] ^ 0xF0);
         }
 
         return key;
     }
 
     @Override
-    public boolean verifyWithKey(byte[] data,byte[] key,
+    public boolean verifyWithKey(byte[] data, byte[] key,
                                  int usage, byte[] checksum) throws KrbException {
         // int computeSize = computeSize();
         int blockSize = encProvider().blockSize();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d312c9f/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/HmacKcCheckSum.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/HmacKcCheckSum.java b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/HmacKcCheckSum.java
index 3f2fd84..4c99e61 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/HmacKcCheckSum.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/cksum/HmacKcCheckSum.java
@@ -30,7 +30,7 @@ public abstract class HmacKcCheckSum extends KcCheckSum {
         super(encProvider, new Sha1Provider(), computeSize, outputSize);
     }
 
-    protected byte[] mac(byte[] Kc, byte[] data, int start, int len) throws KrbException {
-        return Hmac.hmac(hashProvider(), Kc, data, start, len);
+    protected byte[] mac(byte[] kc, byte[] data, int start, int len) throws KrbException {
+        return Hmac.hmac(hashProvider(), kc, data, start, len);
     }
 }


Mime
View raw message