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.

Bug 238928 - ClassCastException: java.lang.Long cannot be cast to java.lang.String
Summary: ClassCastException: java.lang.Long cannot be cast to java.lang.String
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-28 12:07 UTC by Vladimir Riha
Modified: 2014-06-30 11:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205637


Attachments
stacktrace (2.76 KB, text/plain)
2013-11-28 12:07 UTC, Vladimir Riha
Details
stacktrace (2.76 KB, text/plain)
2014-01-29 08:10 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-11-28 12:07:30 UTC
Build: NetBeans IDE Dev (Build 201311280002)
VM: Java HotSpot(TM) Client VM, 25.0-b59, Java(TM) SE Runtime Environment, 1.8.0-ea-b117
OS: Linux

User Comments:
vriha: Less compiler 1.5 adds support for source maps (see issue 238924). This exception popped out when : 
  - I had css with  this new source maps 
  - css contains simple rule for div element
  - run project in Chrome with NB integration
  - selected div in Browser DOM




Stacktrace: 
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
   at org.netbeans.modules.web.inspect.sourcemap.SourceMap.<init>(SourceMap.java:104)
   at org.netbeans.modules.web.inspect.sourcemap.SourceMap.<init>(SourceMap.java:94)
   at org.netbeans.modules.web.inspect.sourcemap.SourceMap.parse(SourceMap.java:82)
   at org.netbeans.modules.web.inspect.webkit.ui.RuleInfo.fillMetaSourceInfo(RuleInfo.java:179)
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedRulesNode.createMatchedRuleNode(MatchedRulesNode.java:148)
   at org.netbeans.modules.web.inspect.webkit.ui.MatchedRulesNode.initChildren(MatchedRulesNode.java:100)
Comment 1 Vladimir Riha 2013-11-28 12:07:31 UTC
Created attachment 142671 [details]
stacktrace
Comment 2 Vladimir Riha 2013-11-28 12:15:02 UTC
Possible patch candidate. It would be good to somehow handle source maps for Less. I think for patch it could be enough to completely ignore them in 7.4 - no exceptions, no information about them in CSS Styles. I don't know if CSS Styles works or not with Less source maps (except of this exception)
Comment 3 Vladimir Riha 2014-01-29 08:10:10 UTC
Created attachment 144499 [details]
stacktrace

Happened when I was running project from template [1] in Chrome with NB integration and went to project properties to enable Less compiler
Comment 4 Vladimir Riha 2014-01-29 08:15:33 UTC
Could someone please evaluate? If this won't be fixed for 8.0, then issue 238924 must be reverted as this CCE pops out each time you use Less source maps. Thank you.
Comment 5 Exceptions Reporter 2014-04-22 08:44:44 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=205637
Comment 6 Jan Stola 2014-04-22 13:48:32 UTC
The exception shows that the version of a source map generated by LESS is not stored as a string but as a number. I have modified the corresponding code to handle both case well.

Modified file: http://hg.netbeans.org/web-main/rev/707424268603
Comment 7 Vladimir Riha 2014-06-30 11:42:48 UTC
Thank you, verified

Product Version: NetBeans IDE Dev (Build 201406300002)
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-29-generic running on i386; UTF-8; en_US (nb)