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 159828 - IllegalArgumentException: TreePathHandle [H:\work\actual\trunk\NetBeansModule\src\org\netbeans\modules\javacard\templates\ClassicAppletDeploymentVisualPanel.java] was not created from H:\work\actual\t
Summary: IllegalArgumentException: TreePathHandle [H:\work\actual\trunk\NetBeansModule...
Status: RESOLVED DUPLICATE of bug 130998
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-06 21:29 UTC by _ tboudreau
Modified: 2009-05-25 21:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147242


Attachments
stacktrace (2.25 KB, text/plain)
2009-03-06 21:30 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2009-03-06 21:29:56 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments:
tboudreau: Copying and pasting a block of code out of one method and into another

tboudreau: Occurred after I deleted a file called ClassicAppletX, copied a file called ExtendedAppletX and refactor-pasted it as ClassicAppletX1 (note the 1), then renamed it to ClassicAppletX



Stacktrace: 
java.lang.IllegalArgumentException: TreePathHandle [H:\work\actual\trunk\NetBeansModule\src\org\netbeans\modules\javacard\templates\ClassicAppletDeploymentVisualPanel.java] was not created from H:\work\actual\trunk\NetBeansModule\src\org\netbeans\modules\javacard\templates\ClassicAppletDeploymentVisualPanel.java
mine: id=31283105, valid=true, url=file:/H:/work/actual/trunk/NetBeansModule/src/org/netbeans/modules/javacard/templates/ClassicAppletDeploymentVisualPanel.java
remote: id=28489881, valid=true, url=file:/H:/work/actual/trunk/NetBeansModule/src/org/netbeans/modules/javacard/templates/ClassicAppletDeploymentVisualPanel.java
---------------------------------------------------
FileObjectFactory=[C:/NetBeans 6.7 M2/ide11/modules/org-netbeans-modules-tasklist-projectint.jar, C:/NetBeans 6.7 M2/java2/modules/org-netbeans-modules-ant-freeform.jar, C:/NetBeans 6.7 M2/platform10/modules/org-netbeans-modules-sendopts.jar, C:/NetBeans 6.7 M2/ide11/modules/org-netbeans-modules-editor-settings-storage.jar, C:/NetBe
        at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:438)
        at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:142)
        at org.netbeans.modules.java.hints.introduce.IntroduceHint.computeIntroduceMethod(IntroduceHint.java:477)
        at org.netbeans.modules.java.hints.introduce.IntroduceHint.computeError(IntroduceHint.java:448)
        at org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceHint.java:299)
        at org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceHint.java:128)
Comment 1 _ tboudreau 2009-03-06 21:30:01 UTC
Created attachment 77852 [details]
stacktrace
Comment 2 Rastislav Komara 2009-03-25 15:28:47 UTC
Please provide steps to reproduce, sample project and messages.log file.
Comment 3 David Strupl 2009-03-31 16:02:26 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 4 _ tboudreau 2009-04-01 06:49:42 UTC
I don't have the log file, but I provided steps to reproduce, an exception was thrown while pasting in the editor, and
this was filed three weeks ago.  And the problem seems to be fairly obvious from the error message:  File A existed;  a
DataObject or Node for it existed with a TreePathHandle for that file.  Then A was deleted. File B was pasted into that
package and renamed A.  Pasting a block of code into the new A file triggered the exception.

Most likely somehow a TreePathHandle from the original A was cached by something and survived, and the hints
infrastructure tried to use it against the new A.  I would look at any caching mechanisms in the hints infrastructure
that could cache TreePathHandles and possibly persist them in a way that could survive the file being deleted.
Comment 5 Jan Lahoda 2009-05-04 15:18:07 UTC
Unfortunately, the above evaluation is likely to be incorrect. Seems like a similar problem that was described in issue
#130998.
Comment 6 Jiri Skrivanek 2009-05-05 12:55:54 UTC
Yes, it is a duplicate of 130998. I thought it is fixed. In spite I am not able to reproduce it I did another attempt to
prevent duplicate valid file objects. Please, let me know if you see it again in newer builds.
http://hg.netbeans.org/core-main/rev/167e21070a01


*** This issue has been marked as a duplicate of 130998 ***