- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 05 Feb 2009 14:56:10 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1 In directory hutz:/tmp/cvs-serv28217/org/w3c/css/properties/css1 Modified Files: Css1Style.java Log Message: fixing a potential NullPointerException Index: Css1Style.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/Css1Style.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Css1Style.java 4 Feb 2009 15:16:39 -0000 1.13 +++ Css1Style.java 5 Feb 2009 14:56:08 -0000 1.14 @@ -2566,8 +2566,14 @@ if (cssFloat != null) { if(cssWidth == null ) { String selectorElement = selector.getElement(); - if ((selectorElement.equals("html")) || (selectorElement.equals("img")) || (selectorElement.equals("input")) - || (selectorElement.equals("object")) || (selectorElement.equals("textarea")) || (selectorElement.equals("select"))) { + if (selectorElement != null){ + if ((selectorElement.equals("html")) || (selectorElement.equals("img")) || (selectorElement.equals("input")) + || (selectorElement.equals("object")) || (selectorElement.equals("textarea")) || (selectorElement.equals("select"))) { + } + else { + // for elements without intrinsic width, float needs a declared width + warnings.addWarning(new Warning(cssFloat, "float-no-width", 1, ac)); + } } else { // for elements without intrinsic width, float needs a declared width
Received on Thursday, 5 February 2009 14:56:20 UTC