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.
[recent build based on 8a5f80ebb3dd] I would expect that this (junit) test case would pass (File=java.io.File, FileUtil=org.openide.filesystems.FileUtil,IOException=java.io.IOException): ------------------------------------------------------------- public void testSomeMethod() throws IOException { File a = new File("C:\\a"); a.delete();//so the test can be restarted assertTrue(a.createNewFile()); File A = new File("C:\\A"); assertEquals(a.getAbsolutePath(),FileUtil.normalizeFile(A).getAbsolutePath()); assertTrue(A.delete()); assertTrue(A.createNewFile()); assertEquals(A.getAbsolutePath(),FileUtil.normalizeFile(A).getAbsolutePath()); } ------------------------------------------------------------- But it does not. Note that in the end the file that exists on disk is C:\A, but normalize file returns C:\a in this case, because it remembers the result of the first normalizeFile. If the first normalizeFile would not be called, the result of the second normalize file would be C:\A, which is correct, IMO. This leads into quite unpredictable behavior. Introduced by bug #183308. I would expect that the FileUtil.normalizeFile would: -not change the input cases for non-existing files -return the exact cases as are on disk for existing files
Integrated into 'main-golden', will be available in build *201106180600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ad241dfb5678 User: Jan Lahoda <jlahoda@netbeans.org> Log: #198565: file normalization after resolving relative file is probably not needed in BuildArtifactsMapperImpl, and causes problems due to #199471.
Possibly also causes bug 199551. Should we remove the caching?
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/3775016f7d8a User: Jan Lahoda <jlahoda@netbeans.org> Log: #198565: file normalization after resolving relative file is probably not needed in BuildArtifactsMapperImpl, and causes problems due to #199471.
ergonomics#43c8189679b6
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/43c8189679b6 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #199471: FileUtil.normalizeFile may normalized into incorrect cases Don't rely on cache when case of normalized file is changed