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.
Build: NetBeans IDE Dev (Build 201404220001) VM: Java HotSpot(TM) Client VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132 OS: Linux User Comments: vriha: Ran HTML5 sample project Responsive Rabbits in embedded browser, turned on inspection mode, click on Welcome title Stacktrace: java.lang.ClassCastException: java.lang.String cannot be cast to org.json.simple.JSONObject at org.netbeans.modules.web.webkit.debugging.api.css.Rule.<init>(Rule.java:125) at org.netbeans.modules.web.webkit.debugging.api.css.MatchedStyles.<init>(MatchedStyles.java:73) at org.netbeans.modules.web.webkit.debugging.api.css.CSS.getMatchedStyles(CSS.java:286) at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel.updateMatchedRules(CSSStylesSelectionPanel.java:644) at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel$9.run(CSSStylesSelectionPanel.java:633) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
Created attachment 146872 [details] stacktrace
Thank you for catching this. It is a consequence of the fix of issue 241098. The exception shows that "selectorList" property is present in given CSS Rule, it has "selectors" sub-property but its type is array of Strings. Unfortunately, I have tested this on the latest version of Chrome (where the type of "selectors" is array of JSONObjects) and Embedded Browser from JDK 7 (where "selectorList" is not present). I overlooked that there is another version of the protocol (used by Embedded Browser in JDK 8). For the sake of completeness, there are the mentioned changes in Chrome: Introduction of "selectorList" (with an array of Strings): http://src.chromium.org/viewvc/blink/trunk/Source/devtools/Inspector-1.1.json?r1=129469&r2=129470& Replacement of the array of Strings by an array of Selectors (JSONObjects): http://src.chromium.org/viewvc/blink/trunk/Source/devtools/protocol.json?r1=159732&r2=159733&
Fixed by http://hg.netbeans.org/web-main/rev/d45037796e43
Verified, thank you Product Version: NetBeans IDE Dev (Build 201406040001) Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Linux version 3.13.0-27-generic running on i386; UTF-8; en_US (nb) User directory: /home/vriha/.netbeans/dev Cache directory: /home/vriha/.cache/netbeans/dev