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 199616 - Incorrect values of FileRenameEvent.getName and getExt
Summary: Incorrect values of FileRenameEvent.getName and getExt
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.0.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 198565
  Show dependency tree
 
Reported: 2011-06-22 11:37 UTC by Jan Lahoda
Modified: 2011-07-19 12:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A possible test case. (1.22 KB, patch)
2011-06-22 11:37 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2011-06-22 11:37:26 UTC
Created attachment 109049 [details]
A possible test case.

[recent sources, on Windows]
When a file is renamed in such a way that only the case differs (e.g. origi.nal to Origi.nal), the FileRenameEvent that arrives to FileChangeListener.fileRenamed returns the original name including extension
from getName() and the new name including extension from getExt(). That is
obviously not correct, and appears to be causing ugly problems to the indexing.

I am attaching a test case that will most likely fail on Windows (cannot test it right now, though).
Comment 1 Jaroslav Tulach 2011-06-23 09:06:56 UTC
The test really fails.
Comment 2 Jaroslav Tulach 2011-06-23 09:55:01 UTC
ergonomics#c7827a9c39fd
Comment 3 Jaroslav Tulach 2011-06-24 06:58:01 UTC
Jan, is this a candidate for backport to 7.0.1? If so, can you review the fix?
Comment 4 Jan Lahoda 2011-06-24 07:47:25 UTC
Yes, this is a candidate for 7.0.1. I will check the original usecase (on Windows) and take care of sending e-mail to reviewers and transplanting all the changesets to 7.0.1. Unless you insist on transplanting this one yourself, of course.
Comment 5 Quality Engineering 2011-06-25 14:08:15 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c7827a9c39fd
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #199616: Wrong FileRenameEvent.getName() and getExt()
Comment 6 Jaroslav Tulach 2011-06-27 05:59:30 UTC
OK, go on.
Comment 7 Jan Lahoda 2011-06-27 09:34:58 UTC
The patch seems fine to me.
Comment 8 Jan Lahoda 2011-07-01 09:26:53 UTC
Merged to release701:
http://hg.netbeans.org/releases/rev/bb13bb8e2b81
Comment 9 Quality Engineering 2011-07-06 00:01:34 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/bb13bb8e2b81
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #199616: Wrong FileRenameEvent.getName() and getExt()
Comment 10 Stepan Zebra 2011-07-19 12:38:27 UTC
verified in 7.0.1 build 201107160900