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 142407 - ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
Summary: ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
Status: RESOLVED DUPLICATE of bug 142405
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 13:37 UTC by dafreels
Modified: 2008-08-27 21:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dafreels 2008-07-31 13:38:15 UTC
[ BUILD # : 200807310201 ]
[ JDK VERSION : 1.6.0_04 ]

I reported this issue through the Netbeans exception reporter here:
http://statistics.netbeans.org/analytics/detail.do?id=84672.

Given this code:

Map<String, Object> propertyMap = new HashMap<String, Object>();
propertyMap.put("offered", false);

I double-clicked on the false variable and typed " to change it to a
string. This is the exception that was reported:

java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String
        at
org.netbeans.modules.java.hints.errors.Utilities.guessName(Utilities.j
ava:102)
        at
org.netbeans.modules.java.hints.introduce.IntroduceHint.computeError(I
ntroduceHint.java:359)
        at
org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceH
int.java:294)
        at
org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceH
int.java:125)
        at
org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.
java:1675)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:907)
        at java.lang.Thread.run(Thread.java:619)
Comment 1 Jan Lahoda 2008-07-31 13:39:53 UTC

*** This issue has been marked as a duplicate of 142405 ***
Comment 2 sunbiz 2008-08-27 21:04:04 UTC
Removing [65cat] from issue summary since this issue is duplicate of Issue 142405 submitted for [65cat]