- From: Jean-Guilhem Rouel via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 27 Feb 2007 22:55:19 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/css In directory hutz:/tmp/cvs-serv1865/org/w3c/css/css Modified Files: StyleSheetGeneratorHTML2.java Log Message: Fixed a NullPointerException Index: StyleSheetGeneratorHTML2.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleSheetGeneratorHTML2.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- StyleSheetGeneratorHTML2.java 16 Dec 2006 20:22:27 -0000 1.51 +++ StyleSheetGeneratorHTML2.java 27 Feb 2007 22:55:17 -0000 1.52 @@ -332,17 +332,18 @@ Warning warn = warning[i]; if (warn.getLevel() <= warningLevel) { - if (!warn.getSourceFile().equals(oldSourceFile)) { - if (open) { - ret.append("\n</table>\n<!--end of individual warning section--></div>"); - } - oldSourceFile = warn.getSourceFile(); - ret.append("\n<div class='warnings-section'><h3>URI : <a href=\""); - ret.append(oldSourceFile).append("\">"); - ret.append(oldSourceFile).append("</a></h3><table>"); - open = true; - } - oldLine = warn.getLine(); + String currentSourceFile = warn.getSourceFile(); + if (currentSourceFile != null && !currentSourceFile.equals(oldSourceFile)) { + if (open) { + ret.append("\n</table>\n<!--end of individual warning section--></div>"); + } + oldSourceFile = warn.getSourceFile(); + ret.append("\n<div class='warnings-section'><h3>URI : <a href=\""); + ret.append(oldSourceFile).append("\">"); + ret.append(oldSourceFile).append("</a></h3><table>"); + open = true; + } + oldLine = warn.getLine(); oldMessage = warn.getWarningMessage(); // Starting a line for each new warning
Received on Tuesday, 27 February 2007 22:55:26 UTC