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 Mon, 20 Apr 2015 10:21:06 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master ce1e7c473 -> 7392deca8


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/7392deca
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/7392deca
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/7392deca

Branch: refs/heads/master
Commit: 7392deca8d6e09ab96ec413bf1761f37a85a3831
Parents: ce1e7c4
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Apr 20 11:20:55 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Apr 20 11:20:55 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/kerby/config/Config.java    | 84 ++++++++++----------
 .../java/org/apache/kerby/config/ConfigKey.java |  4 +-
 .../org/apache/kerby/config/Configurable.java   |  4 +-
 .../java/org/apache/kerby/event/Dispatcher.java |  6 +-
 .../org/apache/kerby/event/EventHandler.java    |  8 +-
 .../org/apache/kerby/event/EventWaiter.java     |  8 +-
 .../kerby/event/InternalEventHandler.java       | 10 +--
 .../org/apache/kerby/transport/Network.java     |  2 +-
 .../org/apache/kerby/transport/Transport.java   |  4 +-
 .../kerby/transport/tcp/DecodingCallback.java   |  6 +-
 .../kerby/transport/tcp/StreamingDecoder.java   |  2 +-
 .../apache/kerby/transport/tcp/TcpAcceptor.java |  2 +-
 12 files changed, 70 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-config/src/main/java/org/apache/kerby/config/Config.java
----------------------------------------------------------------------
diff --git a/lib/kerby-config/src/main/java/org/apache/kerby/config/Config.java b/lib/kerby-config/src/main/java/org/apache/kerby/config/Config.java
index 7713418..2eade15 100644
--- a/lib/kerby-config/src/main/java/org/apache/kerby/config/Config.java
+++ b/lib/kerby-config/src/main/java/org/apache/kerby/config/Config.java
@@ -28,112 +28,112 @@ import java.util.Set;
  * set configuration properties to ease the preparation of a Config.
  */
 public interface Config {
-    public String getResource();
-    public Set<String> getNames();
+    String getResource();
+    Set<String> getNames();
 
-    public String getString(String name);
-    public String getString(ConfigKey name);
-    public String getString(String name, String defaultValue);
+    String getString(String name);
+    String getString(ConfigKey name);
+    String getString(String name, String defaultValue);
 
     /**
      * Set a string value for the specified property
      * @param name
      * @param value
      */
-    public void setString(String name, String value);
+    void setString(String name, String value);
 
     /**
      * Set a string value for the specified property
      * @param name
      * @param value
      */
-    public void setString(ConfigKey name, String value);
+    void setString(ConfigKey name, String value);
 
-    public String getTrimmed(String name);
-    public String getTrimmed(ConfigKey name);
-    public Boolean getBoolean(String name);
-    public Boolean getBoolean(ConfigKey name);
-    public Boolean getBoolean(String name, boolean defaultValue);
+    String getTrimmed(String name);
+    String getTrimmed(ConfigKey name);
+    Boolean getBoolean(String name);
+    Boolean getBoolean(ConfigKey name);
+    Boolean getBoolean(String name, boolean defaultValue);
 
     /**
      * Set a boolean value for the specified property
      * @param name
      * @param value
      */
-    public void setBoolean(String name, boolean value);
+    void setBoolean(String name, boolean value);
 
     /**
      * Set a boolean value for the specified property
      * @param name
      * @param value
      */
-    public void setBoolean(ConfigKey name, boolean value);
+    void setBoolean(ConfigKey name, boolean value);
 
-    public Integer getInt(String name);
-    public Integer getInt(ConfigKey name);
-    public Integer getInt(String name, int defaultValue);
+    Integer getInt(String name);
+    Integer getInt(ConfigKey name);
+    Integer getInt(String name, int defaultValue);
 
     /**
      * Set an int value for the specified property
      * @param name
      * @param value
      */
-    public void setInt(String name, int value);
+    void setInt(String name, int value);
 
     /**
      * Set an int value for the specified property
      * @param name
      * @param value
      */
-    public void setInt(ConfigKey name, int value);
+    void setInt(ConfigKey name, int value);
 
 
-    public Long getLong(String name);
-    public Long getLong(ConfigKey name);
-    public Long getLong(String name, long defaultValue);
+    Long getLong(String name);
+    Long getLong(ConfigKey name);
+    Long getLong(String name, long defaultValue);
 
     /**
      * Set a long value for the specified property
      * @param name
      * @param value
      */
-    public void setLong(String name, long value);
+    void setLong(String name, long value);
 
     /**
      * Set a long value for the specified property
      * @param name
      * @param value
      */
-    public void setLong(ConfigKey name, long value);
+    void setLong(ConfigKey name, long value);
 
-    public Float getFloat(String name);
-    public Float getFloat(ConfigKey name);
-    public Float getFloat(String name, float defaultValue);
+    Float getFloat(String name);
+    Float getFloat(ConfigKey name);
+    Float getFloat(String name, float defaultValue);
 
     /**
      * Set a float value for the specified property
      * @param name
      * @param value
      */
-    public void setFloat(String name, float value);
+    void setFloat(String name, float value);
 
     /**
      * Set a float value for the specified property
      * @param name
      * @param value
      */
-    public void setFloat(ConfigKey name, float value);
-
-    public List<String> getList(String name);
-    public List<String> getList(String name, String[] defaultValue);
-    public List<String> getList(ConfigKey name);
-    public Config getConfig(String name);
-    public Config getConfig(ConfigKey name);
-
-    public Class<?> getClass(String name) throws ClassNotFoundException;
-    public Class<?> getClass(String name, Class<?> defaultValue) throws ClassNotFoundException;
-    public Class<?> getClass(ConfigKey name) throws ClassNotFoundException;
-    public <T> T getInstance(String name) throws ClassNotFoundException;
-    public <T> T getInstance(ConfigKey name) throws ClassNotFoundException;
-    public <T> T getInstance(String name, Class<T> xface) throws ClassNotFoundException;
+    void setFloat(ConfigKey name, float value);
+
+    List<String> getList(String name);
+    List<String> getList(String name, String[] defaultValue);
+    List<String> getList(ConfigKey name);
+    Config getConfig(String name);
+    Config getConfig(ConfigKey name);
+
+    Class<?> getClass(String name) throws ClassNotFoundException;
+    Class<?> getClass(String name, Class<?> defaultValue) throws ClassNotFoundException;
+    Class<?> getClass(ConfigKey name) throws ClassNotFoundException;
+    <T> T getInstance(String name) throws ClassNotFoundException;
+    <T> T getInstance(ConfigKey name) throws ClassNotFoundException;
+    <T> T getInstance(String name, Class<T> xface) throws ClassNotFoundException;
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-config/src/main/java/org/apache/kerby/config/ConfigKey.java
----------------------------------------------------------------------
diff --git a/lib/kerby-config/src/main/java/org/apache/kerby/config/ConfigKey.java b/lib/kerby-config/src/main/java/org/apache/kerby/config/ConfigKey.java
index 47f7727..4424f22 100644
--- a/lib/kerby-config/src/main/java/org/apache/kerby/config/ConfigKey.java
+++ b/lib/kerby-config/src/main/java/org/apache/kerby/config/ConfigKey.java
@@ -20,6 +20,6 @@
 package org.apache.kerby.config;
 
 public interface ConfigKey {
-    public String getPropertyKey();
-    public Object getDefaultValue();
+    String getPropertyKey();
+    Object getDefaultValue();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-config/src/main/java/org/apache/kerby/config/Configurable.java
----------------------------------------------------------------------
diff --git a/lib/kerby-config/src/main/java/org/apache/kerby/config/Configurable.java b/lib/kerby-config/src/main/java/org/apache/kerby/config/Configurable.java
index 5f83341..fd41dab 100644
--- a/lib/kerby-config/src/main/java/org/apache/kerby/config/Configurable.java
+++ b/lib/kerby-config/src/main/java/org/apache/kerby/config/Configurable.java
@@ -24,7 +24,7 @@ package org.apache.kerby.config;
  */
 public interface Configurable {
 
-    public void setConfig(Config config);
+    void setConfig(Config config);
 
-    public Config getConfig();
+    Config getConfig();
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/event/Dispatcher.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/event/Dispatcher.java b/lib/kerby-event/src/main/java/org/apache/kerby/event/Dispatcher.java
index f5a9f53..f730745 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/event/Dispatcher.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/event/Dispatcher.java
@@ -21,9 +21,9 @@ package org.apache.kerby.event;
 
 public interface Dispatcher {
 
-    public void dispatch(Event event);
+    void dispatch(Event event);
 
-    public void register(EventHandler handler);
+    void register(EventHandler handler);
 
-    public void register(InternalEventHandler internalHandler);
+    void register(InternalEventHandler internalHandler);
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/event/EventHandler.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/event/EventHandler.java b/lib/kerby-event/src/main/java/org/apache/kerby/event/EventHandler.java
index b9ef871..27c4a44 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/event/EventHandler.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/event/EventHandler.java
@@ -21,11 +21,11 @@ package org.apache.kerby.event;
 
 public interface EventHandler {
 
-    public void handle(Event event);
+    void handle(Event event);
 
-    public EventType[] getInterestedEvents();
+    EventType[] getInterestedEvents();
 
-    public Dispatcher getDispatcher();
+    Dispatcher getDispatcher();
 
-    public void setDispatcher(Dispatcher dispatcher);
+    void setDispatcher(Dispatcher dispatcher);
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/event/EventWaiter.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/event/EventWaiter.java b/lib/kerby-event/src/main/java/org/apache/kerby/event/EventWaiter.java
index 5b41111..dacc5eb 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/event/EventWaiter.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/event/EventWaiter.java
@@ -24,14 +24,14 @@ import java.util.concurrent.TimeoutException;
 
 public interface EventWaiter {
 
-    public abstract Event waitEvent(EventType event);
+    Event waitEvent(EventType event);
 
-    public abstract Event waitEvent();
+    Event waitEvent();
 
-    public abstract Event waitEvent(EventType event, long timeout,
+    Event waitEvent(EventType event, long timeout,
                                     TimeUnit timeUnit) throws TimeoutException;
 
-    public abstract Event waitEvent(long timeout,
+    Event waitEvent(long timeout,
                                     TimeUnit timeUnit) throws TimeoutException;
 
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/event/InternalEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/event/InternalEventHandler.java
b/lib/kerby-event/src/main/java/org/apache/kerby/event/InternalEventHandler.java
index 6adff3c..e7fafad 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/event/InternalEventHandler.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/event/InternalEventHandler.java
@@ -21,14 +21,14 @@ package org.apache.kerby.event;
 
 public interface InternalEventHandler extends EventHandler {
 
-    public int id();
+    int id();
 
-    public void init();
+    void init();
 
-    public void start();
+    void start();
 
-    public void stop();
+    void stop();
 
-    public boolean isStopped();
+    boolean isStopped();
 }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/transport/Network.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/transport/Network.java b/lib/kerby-event/src/main/java/org/apache/kerby/transport/Network.java
index 707b3a0..9ade687 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/transport/Network.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/transport/Network.java
@@ -277,7 +277,7 @@ public class Network extends LongRunningEventHandler {
                     SelectionKey.OP_READ | SelectionKey.OP_WRITE, transport);
                 onNewTransport(transport);
             }
-        } catch (ClosedByInterruptException e) {
+        } catch (ClosedByInterruptException e) { //NOPMD
             // No op as normal
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/transport/Transport.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/transport/Transport.java b/lib/kerby-event/src/main/java/org/apache/kerby/transport/Transport.java
index 152e30a..bdf2ff7 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/transport/Transport.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/transport/Transport.java
@@ -34,8 +34,8 @@ public abstract class Transport {
 
     protected TransBuffer sendBuffer;
 
-    private int readableCount = 0;
-    private int writableCount = 0;
+    protected int readableCount = 0;
+    protected int writableCount = 0;
 
     public Transport(InetSocketAddress remoteAddress) {
         this.remoteAddress = remoteAddress;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/DecodingCallback.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/DecodingCallback.java
b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/DecodingCallback.java
index 4dd179a..561f78f 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/DecodingCallback.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/DecodingCallback.java
@@ -24,15 +24,15 @@ public interface DecodingCallback {
     /**
      * OK, enough data is ready, a message can be out
      */
-    public void onMessageComplete(int messageLength, int adjustOffset);
+    void onMessageComplete(int messageLength, int adjustOffset);
 
     /**
      * Need more data to be available
      */
-    public void onMoreDataNeeded();
+    void onMoreDataNeeded();
 
     /**
      * Need more data to be available, with determined more data length given
      */
-    public void onMoreDataNeeded(int needDataLength);
+    void onMoreDataNeeded(int needDataLength);
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/StreamingDecoder.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/StreamingDecoder.java
b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/StreamingDecoder.java
index ed9eb72..953b34a 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/StreamingDecoder.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/StreamingDecoder.java
@@ -22,5 +22,5 @@ package org.apache.kerby.transport.tcp;
 import java.nio.ByteBuffer;
 
 public interface StreamingDecoder {
-    public void decode(ByteBuffer streamingBuffer, DecodingCallback callback);
+    void decode(ByteBuffer streamingBuffer, DecodingCallback callback);
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7392deca/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/TcpAcceptor.java
----------------------------------------------------------------------
diff --git a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/TcpAcceptor.java
b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/TcpAcceptor.java
index 0d5ae05..752f5d7 100644
--- a/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/TcpAcceptor.java
+++ b/lib/kerby-event/src/main/java/org/apache/kerby/transport/tcp/TcpAcceptor.java
@@ -96,7 +96,7 @@ public class TcpAcceptor extends Acceptor {
                     SelectionKey.OP_READ | SelectionKey.OP_WRITE, transport);
                 onNewTransport(transport);
             }
-        } catch (ClosedByInterruptException e) {
+        } catch (ClosedByInterruptException e) { //NOPMD
             // No op as normal
         }
     }


Mime
View raw message