W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/src/org/w3c/unicorn/input URIInputParameter.java,1.13,1.14

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 07 Oct 2009 12:48:40 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MvVwe-0007iA-JV@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/input
In directory hutz:/tmp/cvs-serv29626/src/org/w3c/unicorn/input

Modified Files:
	URIInputParameter.java 
Log Message:
fixed potential NPE

Index: URIInputParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- URIInputParameter.java	6 Oct 2009 10:04:41 -0000	1.13
+++ URIInputParameter.java	7 Oct 2009 12:48:38 -0000	1.14
@@ -36,7 +36,7 @@
 	public void check() throws UnicornException {
 		URL docUrl = null;
 		try {
-			if (uri.equals(""))
+			if (uri == null || uri.equals(""))
 				throw new UnicornException(Message.ERROR, "$message_empty_uri");
 			
 			Pattern urlPattern = Pattern.compile("^(https?)://([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)*(:(\\d+))?([/#]\\p{ASCII}*)?", Pattern.CASE_INSENSITIVE);
Received on Wednesday, 7 October 2009 12:48:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:15 GMT