diff --git a/src/main/java/net/spy/memcached/ops/OperationException.java b/src/main/java/net/spy/memcached/ops/OperationException.java index c3a5c4b1e..0e1260838 100644 --- a/src/main/java/net/spy/memcached/ops/OperationException.java +++ b/src/main/java/net/spy/memcached/ops/OperationException.java @@ -62,7 +62,7 @@ public OperationErrorType getType() { @Override public String toString() { - String rv = null; + String rv; if (type == OperationErrorType.GENERAL) { rv = "OperationException: " + type; } else { diff --git a/src/main/java/net/spy/memcached/protocol/ascii/FlushOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/FlushOperationImpl.java index 834f9ace7..8aeac7615 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/FlushOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/FlushOperationImpl.java @@ -56,7 +56,7 @@ public void handleLine(String line) { @Override public void initialize() { - ByteBuffer b = null; + ByteBuffer b; if (delay == -1) { b = ByteBuffer.wrap(FLUSH); } else { diff --git a/src/main/java/net/spy/memcached/protocol/ascii/MutatorOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/MutatorOperationImpl.java index e49a02a12..db3210266 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/MutatorOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/MutatorOperationImpl.java @@ -60,7 +60,7 @@ public MutatorOperationImpl(Mutator m, String k, long amt, @Override public void handleLine(String line) { getLogger().debug("Result: %s", line); - OperationStatus found = null; + OperationStatus found; if (line.equals("NOT_FOUND")) { found = NOT_FOUND; } else { diff --git a/src/main/java/net/spy/memcached/protocol/ascii/TouchOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/TouchOperationImpl.java index 0c4270581..f3c67399f 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/TouchOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/TouchOperationImpl.java @@ -69,7 +69,7 @@ public void handleLine(String line) { @Override public void initialize() { - ByteBuffer b = null; + ByteBuffer b; b = ByteBuffer.allocate(KeyUtil.getKeyBytes(key).length + String.valueOf(exp).length() + OVERHEAD); b.put(("touch " + key + " " + exp + "\r\n").getBytes()); diff --git a/src/main/java/net/spy/memcached/tapmessage/ResponseMessage.java b/src/main/java/net/spy/memcached/tapmessage/ResponseMessage.java index 1cd7734c4..6d23ef2d5 100644 --- a/src/main/java/net/spy/memcached/tapmessage/ResponseMessage.java +++ b/src/main/java/net/spy/memcached/tapmessage/ResponseMessage.java @@ -333,7 +333,7 @@ private Object deserialize() { SerializingTranscoder tc = new SerializingTranscoder(); CachedData d = new CachedData(this.getItemFlags(), this.getValue(), CachedData.MAX_SIZE); - Object rv = null; + Object rv; rv = tc.decode(d); return rv; }