directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject directory-kerby git commit: More PMD work
Date Fri, 24 Apr 2015 09:29:27 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 6de5ada93 -> 8b74b5210


More PMD work


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

Branch: refs/heads/master
Commit: 8b74b52102659969d0fab94d97f6e00c33b02252
Parents: 6de5ada
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Apr 24 10:23:55 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Apr 24 10:23:55 2015 +0100

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/MessageCode.java |  2 +-
 .../kerberos/kerb/common/SectionConfigKey.java  |  2 +-
 .../kerb/preauth/PreauthPluginMeta.java         |  6 ++---
 .../kerb/preauth/pkinit/PkinitIdenity.java      |  1 +
 .../kerberos/kerb/transport/KdcNetwork.java     |  5 ++--
 .../kerberos/kerb/transport/KrbNetwork.java     |  1 +
 .../kerb/transport/KrbTcpTransport.java         |  3 +--
 .../kerberos/kerb/transport/KrbTransport.java   | 12 ++++-----
 .../kerb/transport/KrbUdpTransport.java         |  5 +---
 .../kerberos/kerb/identity/IdentityService.java | 10 ++++----
 .../kerb/identity/backend/IdentityBackend.java  |  8 +++---
 .../kerb/ccache/KrbCredentialCache.java         | 26 ++++++++++----------
 .../kerby/kerberos/kerb/keytab/KrbKeytab.java   | 20 +++++++--------
 13 files changed, 50 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/MessageCode.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/MessageCode.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/MessageCode.java
index a8ada14..dd40c35 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/MessageCode.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/MessageCode.java
@@ -20,5 +20,5 @@
 package org.apache.kerby.kerberos.kerb;
 
 public interface MessageCode {
-    public String getCodeName();
+    String getCodeName();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/SectionConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/SectionConfigKey.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/SectionConfigKey.java
index 0f4152c..d459a5f 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/SectionConfigKey.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/SectionConfigKey.java
@@ -27,5 +27,5 @@ import org.apache.kerby.config.ConfigKey;
  */
 public interface SectionConfigKey extends ConfigKey {
 
-    public String getSectionName();
+    String getSectionName();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java
index 22d38ac..75e5003 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java
@@ -23,10 +23,10 @@ import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 
 public interface PreauthPluginMeta {
 
-    public String getName();
+    String getName();
 
-    public int getVersion();
+    int getVersion();
 
-    public PaDataType[] getPaTypes();
+    PaDataType[] getPaTypes();
 
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/pkinit/PkinitIdenity.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/pkinit/PkinitIdenity.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/pkinit/PkinitIdenity.java
index f12e49a..cebba78 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/pkinit/PkinitIdenity.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/pkinit/PkinitIdenity.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.preauth.pkinit;
 
 import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 
+@SuppressWarnings("PMD")
 public class PkinitIdenity {
 
     public static void processIdentityOption(IdentityOpts identityOpts, String value) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/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 da4848e..ac8e82d 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
@@ -29,6 +29,7 @@ import java.nio.channels.DatagramChannel;
 /**
  * A combined and mixed network server handling UDP and TCP.
  */
+@SuppressWarnings("PMD")
 public abstract class KdcNetwork {
     private InetSocketAddress tcpAddress;
     private InetSocketAddress udpAddress;
@@ -76,7 +77,7 @@ public abstract class KdcNetwork {
 
             try {
                 checkAndAccept();
-            } catch (SocketTimeoutException e) {
+            } catch (SocketTimeoutException e) { //NOPMD
                 //NOOP as normal
             } catch (IOException e) {
                 throw new RuntimeException("Error occured while checking tcp connections",
e);
@@ -84,7 +85,7 @@ public abstract class KdcNetwork {
 
             try {
                 checkUdpMessage();
-            } catch (SocketTimeoutException e) {
+            } catch (SocketTimeoutException e) { //NOPMD
                 //NOOP as normal
             } catch (IOException e) {
                 throw new RuntimeException("Error occured while checking tcp connections",
e);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbNetwork.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbNetwork.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbNetwork.java
index f7de2cc..6be2cd5 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbNetwork.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbNetwork.java
@@ -26,6 +26,7 @@ import java.net.Socket;
 /**
  * Krb client network support.
  */
+@SuppressWarnings("PMD")
 public class KrbNetwork {
 
     private InetSocketAddress tcpAddress;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/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 cd949c5..01b5706 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
@@ -23,7 +23,6 @@ import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.net.InetAddress;
-import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.nio.ByteBuffer;
 
@@ -69,7 +68,7 @@ public class KrbTcpTransport
     public void release() {
         try {
             socket.close();
-        } catch (IOException e) {
+        } catch (IOException e) { //NOPMD
             // NOOP
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTransport.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTransport.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTransport.java
index e2d1e7e..0fa5663 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTransport.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/transport/KrbTransport.java
@@ -32,34 +32,34 @@ public interface KrbTransport {
      * Send out a Kerberos message to remote peer.
      * @param message
      */
-    public void sendMessage(ByteBuffer message) throws IOException;
+    void sendMessage(ByteBuffer message) throws IOException;
 
     /**
      * Receive a Kerberos message from remote.
      * @return
      */
-    public ByteBuffer receiveMessage() throws IOException;
+    ByteBuffer receiveMessage() throws IOException;
 
     /**
      * Get address from remote side.
      * @return address
      */
-    public InetAddress getRemoteAddress();
+    InetAddress getRemoteAddress();
 
     /**
      * Set an attachment.
      * @param attachment
      */
-    public void setAttachment(Object attachment);
+    void setAttachment(Object attachment);
 
     /**
      * Get the attachment set before.
      * @return attachment
      */
-    public Object getAttachment();
+    Object getAttachment();
 
     /**
      * Release and close related resources like connection.
      */
-    public void release();
+    void release();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/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 42708e7..068f1eb 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
@@ -19,9 +19,6 @@
  */
 package org.apache.kerby.kerberos.kerb.transport;
 
-import org.apache.kerby.kerberos.kerb.transport.AbstractKrbTransport;
-import org.apache.kerby.kerberos.kerb.transport.KrbTransport;
-
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
@@ -65,7 +62,7 @@ public class KrbUdpTransport
     public void release() {
         try {
             channel.close();
-        } catch (IOException e) {
+        } catch (IOException e) { //NOPMD
             //NOOP
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java
b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java
index a8fdfce..6083cf0 100644
--- a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java
+++ b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java
@@ -31,33 +31,33 @@ public interface IdentityService {
      * Note it's ordered by principal name.
      * @return principal names
      */
-    public List<String> getIdentities(int start, int limit);
+    List<String> getIdentities(int start, int limit);
 
     /**
      * Get the identity account specified by name.
      * @param principalName
      * @return identity
      */
-    public KrbIdentity getIdentity(String principalName);
+    KrbIdentity getIdentity(String principalName);
 
     /**
      * Add an identity, and return the newly created result.
      * @param identity
      * @return identity
      */
-    public KrbIdentity addIdentity(KrbIdentity identity);
+    KrbIdentity addIdentity(KrbIdentity identity);
 
     /**
      * Update an identity, and return the updated result.
      * @param identity
      * @return identity
      */
-    public KrbIdentity updateIdentity(KrbIdentity identity);
+    KrbIdentity updateIdentity(KrbIdentity identity);
 
     /**
      * Delete the identity specified by principal name
      * @param principalName
      *
      */
-    public void deleteIdentity(String principalName);
+    void deleteIdentity(String principalName);
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/IdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/IdentityBackend.java
b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/IdentityBackend.java
index 96e13f6..d705534 100644
--- a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/IdentityBackend.java
+++ b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/IdentityBackend.java
@@ -30,7 +30,7 @@ public interface IdentityBackend extends IdentityService, Configurable {
     /**
      * Init work for the backend can be done here.
      */
-    public void initialize();
+    void initialize();
 
     /**
      * Start the backend and return soon after the backend or the connection to
@@ -38,19 +38,19 @@ public interface IdentityBackend extends IdentityService, Configurable
{
      *
      * Will be called during KDC startup.
      */
-    public void start();
+    void start();
 
     /**
      * Stop the backend.
      *
      * Will be called during KDC stop.
      */
-    public void stop();
+    void stop();
 
     /**
      * Release the backend associated resources like connection.
      *
      * Will be called during KDC shutdown.
      */
-    public void release();
+    void release();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/ccache/KrbCredentialCache.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/ccache/KrbCredentialCache.java
b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/ccache/KrbCredentialCache.java
index f5a1b91..72820a2 100644
--- a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/ccache/KrbCredentialCache.java
+++ b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/ccache/KrbCredentialCache.java
@@ -29,29 +29,29 @@ import java.util.List;
 
 public interface KrbCredentialCache {
 
-    public PrincipalName getPrimaryPrincipal();
+    PrincipalName getPrimaryPrincipal();
 
-    public void setPrimaryPrincipal(PrincipalName principal);
+    void setPrimaryPrincipal(PrincipalName principal);
 
-    public int getVersion();
+    int getVersion();
 
-    public void setVersion(int version);
+    void setVersion(int version);
 
-    public List<Credential> getCredentials();
+    List<Credential> getCredentials();
 
-    public void addCredential(Credential credential);
+    void addCredential(Credential credential);
 
-    public void addCredentials(List<Credential> credentials);
+    void addCredentials(List<Credential> credentials);
 
-    public void removeCredentials(List<Credential> credentials);
+    void removeCredentials(List<Credential> credentials);
 
-    public void removeCredential(Credential credential);
+    void removeCredential(Credential credential);
 
-    public void load(File ccacheFile) throws IOException;
+    void load(File ccacheFile) throws IOException;
 
-    public void load(InputStream inputStream) throws IOException;
+    void load(InputStream inputStream) throws IOException;
 
-    public void store(File ccacheFile) throws IOException;
+    void store(File ccacheFile) throws IOException;
 
-    public void store(OutputStream outputStream) throws IOException;
+    void store(OutputStream outputStream) throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/8b74b521/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/KrbKeytab.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/KrbKeytab.java
b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/KrbKeytab.java
index 18c47e6..af11504 100644
--- a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/KrbKeytab.java
+++ b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/KrbKeytab.java
@@ -31,25 +31,25 @@ import java.util.List;
 
 public interface KrbKeytab {
 
-    public List<PrincipalName> getPrincipals();
+    List<PrincipalName> getPrincipals();
 
-    public void addKeytabEntries(List<KeytabEntry> entries);
+    void addKeytabEntries(List<KeytabEntry> entries);
 
-    public void removeKeytabEntries(PrincipalName principal);
+    void removeKeytabEntries(PrincipalName principal);
 
-    public void removeKeytabEntry(KeytabEntry entry);
+    void removeKeytabEntry(KeytabEntry entry);
 
-    public List<KeytabEntry> getKeytabEntries(PrincipalName principal);
+    List<KeytabEntry> getKeytabEntries(PrincipalName principal);
 
-    public EncryptionKey getKey(PrincipalName principal, EncryptionType keyType);
+    EncryptionKey getKey(PrincipalName principal, EncryptionType keyType);
 
-    public void load(File keytabFile) throws IOException;
+    void load(File keytabFile) throws IOException;
 
-    public void load(InputStream inputStream) throws IOException;
+    void load(InputStream inputStream) throws IOException;
 
     void addEntry(KeytabEntry entry);
 
-    public void store(File keytabFile) throws IOException;
+    void store(File keytabFile) throws IOException;
 
-    public void store(OutputStream outputStream) throws IOException;
+    void store(OutputStream outputStream) throws IOException;
 }


Mime
View raw message