- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Oct 2009 12:48:40 +0000
- To: www-validator-cvs@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 UTC