commit: fixed: avoid nullpointerexception if ACCEPT_LOCAL_ADDRESSES is not set

changeset:   1240:8163bd431b77
user:        Thomas Gambet <tgambet@w3.org>
date:        Mon Jun 14 11:15:48 2010 -0400
files:       src/org/w3c/unicorn/input/URIInputParameter.java
description:
fixed: avoid nullpointerexception if ACCEPT_LOCAL_ADDRESSES is not set


diff -r 1f0784ac9474 -r 8163bd431b77 src/org/w3c/unicorn/input/URIInputParameter.java
--- a/src/org/w3c/unicorn/input/URIInputParameter.java	Mon Jun 14 11:14:06 2010 -0400
+++ b/src/org/w3c/unicorn/input/URIInputParameter.java	Mon Jun 14 11:15:48 2010 -0400
@@ -83,7 +83,7 @@
 			if (!docUrl.getProtocol().equals("http") && !docUrl.getProtocol().equals("https"))
 				throw new UnicornException(Message.ERROR, "$message_unsupported_protocol", null, docUrl.getProtocol());
 			
-			if (!Property.get("ACCEPT_LOCAL_ADDRESSES").equals("true")) {
+			if (!"true".equals(Property.get("ACCEPT_LOCAL_ADDRESSES"))) {
 				InetAddress add = InetAddress.getByName(docUrl.getHost());
 				if (add.isSiteLocalAddress() || add.isLoopbackAddress())
 					throw new UnicornException(Message.ERROR, "$message_local_address_provided");

Received on Monday, 14 June 2010 15:18:06 UTC