This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using Netbeans beta 2, under Mandrake linux, to check a cascade style sheet (using the green arrow down button), an exception is thrown. The content of a css file (test.css) is: table.componentList img { behavior:url(); } The exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:558) at org.w3c.flute.parser.Parser.url(Parser.java:2772) at org.w3c.flute.parser.Parser.term(Parser.java:2466) at org.w3c.flute.parser.Parser.expr(Parser.java:2202) at org.w3c.flute.parser.Parser.declaration(Parser.java:2081) at org.w3c.flute.parser.Parser.styleRule(Parser.java:1405) at org.w3c.flute.parser.Parser.afterImportDeclaration(Parser.java:561) at org.w3c.flute.parser.Parser.parserUnit(Parser.java:498) at org.w3c.flute.parser.Parser.parseStyleSheet(Parser.java:107) at org.w3c.flute.parser.Parser.parseStyleSheet(Parser.java:119) at org.netbeans.modules.css.actions.CheckStyleAction.performAction(CheckStyleAction.java:90) at org.openide.util.actions.NodeAction$3.run(NodeAction.java:531) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:81) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:74) at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:24) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:72) at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:41) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:471) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:904)
It looks like problem in the w3c parser. I'm afraid we will not have time to fix it in NB 5.0 timeframe
This is a bug in Flute parser implementation, specifically in Parser.url() method: String urlname = n.image.substring(4, n.image.length()-1).trim(); ...is errorneous since it supposes the content of the URL in some form which doesn't need to be always true. I tried Flute 1.3, but it contains the same error. So we can: 1) fix the Flute parser sources and distribute patched version. W3C license allows this IMHO. 2) replace the Flute parser by some other, like Batik 3) just catch the exceptions from the parser and present them to the user in some more reasonable form. My preference is - do #3 in any case, then probably #1, then #2 Opinions? BTW, there is more issue related to bugs in flute, I marked them by FLUTE status whiteboard.
I have implemented the option #3 - a message about internal flute error is written into the css check output window + the exception is logged with INFO level. I am leaving the issue opened so we can track the flute problem somehow. Checking in CheckStyleAction.java; /cvs/web/css/src/org/netbeans/modules/css/actions/CheckStyleAction.java,v <-- CheckStyleAction.java new revision: 1.3; previous revision: 1.2 done
minor issue, fixed on nb side already
moving opened issues from TM <= 6.1 to TM=Dev
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team