[freenet-cvs] r12169 - trunk/freenet/src/freenet/node/fcp

nextgens at freenetproject.org nextgens at freenetproject.org
Sat Mar 17 11:58:11 UTC 2007


Author: nextgens
Date: 2007-03-17 11:58:10 +0000 (Sat, 17 Mar 2007)
New Revision: 12169

Modified:
   trunk/freenet/src/freenet/node/fcp/AddPeer.java
Log:
Fix error handling in AddPeer

Modified: trunk/freenet/src/freenet/node/fcp/AddPeer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/AddPeer.java	2007-03-16 23:25:33 UTC (rev 12168)
+++ trunk/freenet/src/freenet/node/fcp/AddPeer.java	2007-03-17 11:58:10 UTC (rev 12169)
@@ -64,7 +64,7 @@
 			if(ref == null) {
 				throw new MessageInvalidException(ProtocolErrorMessage.REF_PARSE_ERROR, "Error parsing ref from URL <"+urlString+ '>', null, false);
 			}
-			if(ref.equals("")) {
+			if("".equals(ref.toString())) {
 				throw new MessageInvalidException(ProtocolErrorMessage.REF_PARSE_ERROR, "Error parsing ref from URL <"+urlString+ '>', null, false);
 			}
 			try {
@@ -95,7 +95,7 @@
 			if(ref == null) {
 				throw new MessageInvalidException(ProtocolErrorMessage.REF_PARSE_ERROR, "Error parsing ref from file <"+fileString+ '>', null, false);
 			}
-			if(ref.equals("")) {
+			if("".equals(ref.toString())) {
 				throw new MessageInvalidException(ProtocolErrorMessage.REF_PARSE_ERROR, "Error parsing ref from file <"+fileString+ '>', null, false);
 			}
 			try {




More information about the cvs mailing list