From 8540f879bdb126f8f03da1186d025253c53ba95b Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 21 Feb 2013 15:41:33 +0100 Subject: [PATCH] Fix a bug in Peer error logging, found by FindBugs. --- core/src/main/java/com/google/bitcoin/core/Peer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Peer.java b/core/src/main/java/com/google/bitcoin/core/Peer.java index 627bdc72..8962682b 100644 --- a/core/src/main/java/com/google/bitcoin/core/Peer.java +++ b/core/src/main/java/com/google/bitcoin/core/Peer.java @@ -212,7 +212,7 @@ public class Peer { public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { String s; PeerAddress addr = address.get(); - s = address == null ? "?" : address.toString(); + s = addr == null ? "?" : addr.toString(); if (e.getCause() instanceof ConnectException || e.getCause() instanceof IOException) { // Short message for network errors log.info(s + " - " + e.getCause().getMessage());