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 104188 - [tests] Popup menu called on watches of primitive types produces exception
Summary: [tests] Popup menu called on watches of primitive types produces exception
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 16:07 UTC by ehucka
Modified: 2007-06-05 13:43 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 ehucka 2007-05-17 16:07:28 UTC
NetBeans IDE Dev (Build 200705161800)
1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
Linux version 2.6.16-1.2122_FC5 running on i386
en_US (nb); UTF-8

I created a watch of int variable and try to delete it by popup menu in watches
view. The popup menu was not shown.


java.lang.ClassCastException: com.sun.tools.jdi.IntegerValueImpl cannot be cast
to com.sun.jdi.ObjectReference
        at
org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getUniqueID(AbstractObjectVariable.java:645)
        at
org.netbeans.modules.debugger.jpda.heapwalk.models.HeapActionsFilter$1.isEnabled(HeapActionsFilter.java:91)
        at
org.netbeans.spi.viewmodel.Models$ActionSupport.isEnabled(Models.java:467)
        at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:840)
        at org.openide.awt.Actions.connect(Actions.java:166)
        at org.openide.awt.Actions$MenuItem.<init>(Actions.java:1167)
        at
org.netbeans.modules.openide.awt.DefaultAWTBridge.createPopupPresenter(DefaultAWTBridge.java:61)
        at org.openide.util.Utilities.actionsToPopup(Utilities.java:2660)
        at org.openide.util.Utilities.actionsToPopup(Utilities.java:2732)
        at org.openide.explorer.view.TreeView.createExtendedPopup(TreeView.java:901)
        at
org.openide.explorer.view.TreeTableView.createPopup(TreeTableView.java:792)
        at
org.openide.explorer.view.TreeTableView.createPopup(TreeTableView.java:782)
        at
org.openide.explorer.view.TreeTableView.access$300(TreeTableView.java:169)
        at
org.openide.explorer.view.TreeTableView$5.showPopup(TreeTableView.java:499)
        at
org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:158)
        at
org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:149)
Comment 1 Martin Entlicher 2007-05-18 12:27:24 UTC
Reproduced.
In Watches, unfortunately, we do not know whether the value will be
ObjectVariable or PrimitiveVariable in advance. :-(
Comment 2 Martin Entlicher 2007-05-18 12:35:57 UTC
Fixed in trunk:

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java,v
 <--  AbstractObjectVariable.java
new revision: 1.2; previous revision: 1.1
Comment 3 ehucka 2007-06-05 13:43:27 UTC
verified