Bug 44065 - NPE during hot code replace
Summary: NPE during hot code replace
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-02 07:06 EDT by Jerome Lanneluc CLA
Modified: 2003-10-13 05:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2003-10-02 07:06:28 EDT
Build 20030930

Got the following NPE after saving a change in the top frame's method 
(autobuild was on).

java.lang.NullPointerException
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager.getAffectedFra
me(JavaHotCodeReplaceManager.java:721)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager.getAffectedFra
mes(JavaHotCodeReplaceManager.java:675)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager.attemptPopFram
es(JavaHotCodeReplaceManager.java:625)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager.doHotCodeRepla
ce(JavaHotCodeReplaceManager.java:377)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager.access$0
(JavaHotCodeReplaceManager.java:358)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager$1.run
(JavaHotCodeReplaceManager.java:287)
        at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1555)
        at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1572)
        at 
org.eclipse.jdt.internal.debug.core.hcr.JavaHotCodeReplaceManager$3.run
(JavaHotCodeReplaceManager.java:1105)
        at java.lang.Thread.run(Thread.java:536)
Comment 1 Jerome Lanneluc CLA 2003-10-02 07:27:31 EDT
Note to reproduce you might need the JDT/Core preview 
(http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-
home/r3.0/main.html#updates) and enable the JDT/UI working copy owner support 
(JavaPlugin.USE_WORKING_COPY_OWNERS must be set to true).
Comment 2 Jerome Lanneluc CLA 2003-10-02 09:47:38 EDT
getCorrespondingResource() returns null for working copies but it should not 
return null for primary compilation units in working copy mode.

Moving to JDT/Core
Comment 3 Jerome Lanneluc CLA 2003-10-02 10:21:10 EDT
Fixed and added regression test 
WorkingCopyOwnerTests.testGetCorrespondingResource()
Comment 4 David Audel CLA 2003-10-13 05:55:47 EDT
Verified.