kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: KAFKA-4774; Inner classes which don't need a reference to the outer c…
Date Sat, 18 Feb 2017 14:43:06 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk c6fcc721e -> 916edc3a4


KAFKA-4774; Inner classes which don't need a reference to the outer c…

…lass should be static

Author: Colin P. Mccabe <cmccabe@confluent.io>

Reviewers: Jason Gustafson <jason@confluent.io>, Ismael Juma <ismael@juma.me.uk>

Closes #2558 from cmccabe/KAFKA-4774


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/916edc3a
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/916edc3a
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/916edc3a

Branch: refs/heads/trunk
Commit: 916edc3a4ed0b44e64d0a0410137bf96e2a5558d
Parents: c6fcc72
Author: Colin P. Mccabe <cmccabe@confluent.io>
Authored: Sat Feb 18 06:40:35 2017 -0800
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Sat Feb 18 06:40:35 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/kafka/common/security/ssl/SslFactory.java    | 2 +-
 .../kafka/connect/runtime/rest/resources/ConnectorsResource.java | 4 ++--
 .../kafka/streams/processor/internals/GlobalStateUpdateTask.java | 2 +-
 .../processor/internals/assignment/StickyTaskAssignor.java       | 2 +-
 .../org/apache/kafka/streams/state/internals/NamedCache.java     | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/916edc3a/clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java b/clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java
index 09af520..ca49a3b 100644
--- a/clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java
+++ b/clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java
@@ -196,7 +196,7 @@ public class SslFactory implements Configurable {
         }
     }
 
-    private class SecurityStore {
+    private static class SecurityStore {
         private final String type;
         private final String path;
         private final Password password;

http://git-wip-us.apache.org/repos/asf/kafka/blob/916edc3a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
----------------------------------------------------------------------
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
index e8f134d..366aac5 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
@@ -285,14 +285,14 @@ public class ConnectorsResource {
         T translate(RestServer.HttpResponse<U> response);
     }
 
-    private class IdentityTranslator<T> implements Translator<T, T> {
+    private static class IdentityTranslator<T> implements Translator<T, T> {
         @Override
         public T translate(RestServer.HttpResponse<T> response) {
             return response.body();
         }
     }
 
-    private class CreatedConnectorInfoTranslator implements Translator<Herder.Created<ConnectorInfo>,
ConnectorInfo> {
+    private static class CreatedConnectorInfoTranslator implements Translator<Herder.Created<ConnectorInfo>,
ConnectorInfo> {
         @Override
         public Herder.Created<ConnectorInfo> translate(RestServer.HttpResponse<ConnectorInfo>
response) {
             boolean created = response.status() == 201;

http://git-wip-us.apache.org/repos/asf/kafka/blob/916edc3a/streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
index 6da37e4..a5504d1 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateUpdateTask.java
@@ -29,7 +29,7 @@ import java.util.Set;
  */
 public class GlobalStateUpdateTask implements GlobalStateMaintainer {
 
-    private class SourceNodeAndDeserializer {
+    private static class SourceNodeAndDeserializer {
         private final SourceNode sourceNode;
         private final RecordDeserializer deserializer;
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/916edc3a/streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/StickyTaskAssignor.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/StickyTaskAssignor.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/StickyTaskAssignor.java
index 6d49b72..7c81f64 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/StickyTaskAssignor.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/StickyTaskAssignor.java
@@ -253,7 +253,7 @@ public class StickyTaskAssignor<ID> implements TaskAssignor<ID,
TaskId> {
             return new Pair(task2, task1);
         }
 
-        class Pair {
+        private static class Pair {
             private final TaskId task1;
             private final TaskId task2;
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/916edc3a/streams/src/main/java/org/apache/kafka/streams/state/internals/NamedCache.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/NamedCache.java
b/streams/src/main/java/org/apache/kafka/streams/state/internals/NamedCache.java
index 931ab17..8dcbf90 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/NamedCache.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/NamedCache.java
@@ -320,7 +320,7 @@ class NamedCache {
     /**
      * A simple wrapper class to implement a doubly-linked list around MemoryLRUCacheBytesEntry
      */
-    class LRUNode {
+    static class LRUNode {
         private final Bytes key;
         private LRUCacheEntry entry;
         private LRUNode previous;


Mime
View raw message