zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1685167 - in /zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java
Date Fri, 12 Jun 2015 21:02:55 GMT
Author: rgs
Date: Fri Jun 12 21:02:55 2015
New Revision: 1685167

URL: http://svn.apache.org/r1685167
Log:
ZOOKEEPER-2214: Findbugs warning: LearnerHandler.packetToString Dead
store to local variable (Hongchao Deng via rgs)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1685167&r1=1685166&r2=1685167&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Fri Jun 12 21:02:55 2015
@@ -199,6 +199,9 @@ IMPROVEMENTS:
   ZOOKEEPER-2208: Log type of unexpected quorum packet in observer loop
   (Akihiro Suda via rgs)
 
+  ZOOKEEPER-2214: Findbugs warning: LearnerHandler.packetToString Dead
+  store to local variable (Hongchao Deng via rgs)
+
 Release 3.5.0 - 8/4/2014
 
 NEW FEATURES:

Modified: zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java?rev=1685167&r1=1685166&r2=1685167&view=diff
==============================================================================
--- zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java (original)
+++ zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java Fri
Jun 12 21:02:55 2015
@@ -255,9 +255,8 @@ public class LearnerHandler extends ZooK
     }
 
     static public String packetToString(QuorumPacket p) {
-        String type = null;
+        String type;
         String mess = null;
-        Record txn = null;
 
         switch (p.getType()) {
         case Leader.ACK:
@@ -279,7 +278,7 @@ public class LearnerHandler extends ZooK
             type = "PROPOSAL";
             TxnHeader hdr = new TxnHeader();
             try {
-                txn = SerializeUtils.deserializeTxn(p.getData(), hdr);
+                SerializeUtils.deserializeTxn(p.getData(), hdr);
                 // mess = "transaction: " + txn.toString();
             } catch (IOException e) {
                 LOG.warn("Unexpected exception",e);



Mime
View raw message