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 186740 - [69cat] rename on masterfs is broken
Summary: [69cat] rename on masterfs is broken
Status: RESOLVED DUPLICATE of bug 184854
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 13:26 UTC by mgoe
Modified: 2010-06-04 10:02 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 170143


Attachments
stacktrace (1.86 KB, text/plain)
2010-05-26 13:26 UTC, mgoe
Details
stacktrace (1.95 KB, text/plain)
2010-06-01 17:21 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mgoe 2010-05-26 13:26:24 UTC
This bug was originally marked as duplicate of bug 169352, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201005170932)
VM: Java HotSpot(TM) Server VM, 16.2-b04, Java(TM) SE Runtime Environment, 1.6.0_19-b04
OS: Linux

User Comments:
fsoares: Editing a file in the java editor

GUEST: Mouse to select that code then throw this error. 
The code is:throw new UnsupportedOperationException("Not supported yet.");

mgoe: Editing source code.

GUEST: navigating among classes CTRL+mouse click

GUEST: Editing a java file

GUEST: not sure

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

petermount: Selecting a block to copy, accidentially holding down shift whilst selecting

mgoe: Editing source code




Stacktrace: 
java.lang.IllegalArgumentException: TreePathHandle [/home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java] was not created from /home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java
mine: id=MasterFileObject[/home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java@bfa08b:1467fd,valid=true], url=file:/home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java
remote: id=MasterFileObject[/home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java@308924:e75f86,valid=true], url=file:/home/mgoe/pv.HEAD/gen/java/platform/Test/src/de/bruker/mri/test/TestManager.java
   at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:421)
   at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:151)
   at org.netbeans.modules.java.hints.introduce.IntroduceHint.computeIntroduceMethod(IntroduceHint.java:494)
   at org.netbeans.modules.java.hints.introduce.IntroduceHint.computeError(IntroduceHint.java:465)
   at org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceHint.java:320)
   at org.netbeans.modules.java.hints.introduce.IntroduceHint.run(IntroduceHint.java:144)
Comment 1 mgoe 2010-05-26 13:26:29 UTC
Created attachment 99493 [details]
stacktrace
Comment 2 Jan Lahoda 2010-06-01 12:11:26 UTC
Duplicate FileObjects.
Comment 3 _ tboudreau 2010-06-01 17:21:02 UTC
Created attachment 99726 [details]
stacktrace

Refactor/renamed Sha1StreamWrapper to SHA1StreamWrapper on Mac OS case-preserving-but-insensitive filesystem.  Java infrastructure is returning handles created for Sha1StreamWrapper which is not the same FileObject.
Comment 4 _ tboudreau 2010-06-01 17:23:15 UTC
This happens on Mac OS (filesystem is case-preserving but case-insensitive), if you rename a class to the same name with different case.  I just reproduced it by renaming a class called Sha1StreamWrapper to SHA1StreamWrapper.  This results in two FileObjects, but the Java parsing infrastructure returns TreePathHandles for the old Sha1StreamWrapper which is not the same FileObject.
Comment 5 petermount 2010-06-02 08:57:06 UTC
I'll add that the default filesystem on OSX preserves case but is case insensitive, however OSX does have an option for the filesystem to be case sensitive.

Just a warning for those who can't reproduce this bug because they are using the latter.
Comment 6 Jaroslav Tulach 2010-06-04 10:02:14 UTC

*** This bug has been marked as a duplicate of bug 184854 ***