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.
Created attachment 127320 [details] contains the folders where the issue occurs and JunitTest Hi dear support, I have an unexpected behavior when i created FileObject for 2 files. Here are the folders that pose problem: D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADZ#CT#SLT.label\definition.math D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADXACT#SLT.label\definition.math When i'm creating a FileObject for each parent directory all works fine: 1/creating FileObject for : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADZ#CT#SLT.label =>OK 2/creating FileObject for : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADXACT#SLT.label => OK But if you try to create successively FileObject with subfiles as definition.math, The second FileObject points to the first: 1/creating FileObject for : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADZ#CT#SLT.label\definition.math => OK 2/creating FileObject for : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADXACT#SLT.label\definition.math => KO ==> Here the target file of FileObject is: D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADZ#CT#SLT.label\definition.math ==> I expected as target file :D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADXACT#SLT.label\definition.math If you replace the '#' with '_' in the name of the folder ADXACT#SLT.label all works fine again... To reproduce the bug, I attached a zip file that contains the folders and files to test, and a JUnitTest file BugFileObject.java. Thanks for your help. Best regards Product Version: NetBeans IDE 7.0.1 (Build 201107282000) Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11 System: Windows XP version 5.1 running on x86; Cp1252; fr_FR (nb) Userdir: D:\Documents and settings\ejacquot\.netbeans\7.0
Additional information : the hash is the same for this folders File : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADZ#CT#SLT.label hash1:-1735403051 File : D:\ManoloSVN\BugsPlones\Plone134\superbugName\ADXACT#SLT.label hash2:-1735403051 best regards manu
The set of sort of useless if it is using hardcoded paths like "D:\\ManoloSVN\\". I know there used to be bug related to hashCode in previous versions of NetBeans, but I believe I fixed it. Why don't you try to run the same test with NetBeans 7.3? It should be much easier for you, when you have the right paths on your disk. Marking incomplete: I either need information how the test behaves with NetBeans 7.3 or I need a test that I could really invoke.
Hi Jaroslav , Thanks for your help ! I will try the junit test with netbeans 7.3 I tried with previous version of netbeans 7.2.1 but the bug occurs again. to test the Junit you can create the folder "D:\\ManoloSVN\\BugsPlones\\Plone134\\" on your computer and copy the contents of the zip in this folder before start the test. Or you can create your folder, copy the contents of the zip to the new folder and replace the path (with your folder path)in the Junit test. Thanks for your help i contact you after i will test the junit on netbeans 7.3. manu
Created attachment 129202 [details] Project with JUnit test and results in text file Hi dear support, I try my Junit test on Netbeans 7.3 beta but the issue is not resolved. I attached a new project that contains a new Junit test and the results in the file TestResults.txt. The project was be made on netbeans 7.2.1 To RUN the Junit test file BugFileObjectTest.java open the project ProjectBugName and call the actions "debug file" or "debug test files". With this actions the test folders under module1 will be found. With this test you can see that for 2 folders an identical hash code is generated and when i try to get a child file (with the same name). the method getFileObject() returns the child file of previous folder ! I saw in netbeans sources that a global map store the FileObjects using like key the HashCode of files, but this HashCode is not unique. For my company this issues is critical because if we can't get the good data file, our mathematical calculations will be wrong. Thanks for your help. manu
Hi dear support, I try my Junit test on Netbeans 7.3 beta but the issue is not resolved. I attached a new project that contains a new Junit test and the results in the file TestResults.txt. The project was be made on netbeans 7.2.1 To RUN the Junit test file BugFileObjectTest.java open the project ProjectBugName and call the actions "debug file" or "debug test files". With this actions the test folders under module1 will be found. With this test you can see that for 2 folders an identical hash code is generated and when i try to get a child file (with the same name). the method getFileObject() returns the child file of previous folder ! I saw in netbeans sources that a global map store the FileObjects using like key the HashCode of files, but this HashCode is not unique. For my company this issues is critical because if we can't get the good data file, our mathematical calculations will be wrong. Thanks for your help. manu
The donated "test" is not very polished, but it gives me the idea. Yes, this seems serious enough issue.
Hi Jaroslav, Thanks for your answer. To debug, i put a breakpoint on the secondary method getFileObject() (at line 83 of JUnit test) and I step into all methods called. In one of this méhods a global map returns the bad FileObject because 2 HashCodes are equals for 2 different Files. Thank you very much for your help. Best regards. manu
Tests that fail on windows: http://hg.netbeans.org/ergonomics/rev/de0ec293eb99
ergonomics#a39e478feb40
Hi Jaroslav, Have you been able to reproduce the issue? You have a solution? if yes, the fix will be integrated in the next version of Netbeans? Thank you very much. manu
Integrated into 'main-golden', will be available in build *201212170919* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/de0ec293eb99 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #221653: Test to emulate the problem
Hi Jaroslav , Thank you very much for your help. It works fine ! Best regards. manu