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 211940 - Cannot delete file containing badly named class
Summary: Cannot delete file containing badly named class
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 09:13 UTC by Jiri Prox
Modified: 2012-05-05 10:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2012-05-02 09:13:23 UTC
The file containing badly named class cannot be deleted from project view. The message 'File is empty' is displayed and the file is not deleted. The badly named class can be produced for example by Copy class feature

The worst case is when there is another class matching the file name. then this file is deleted instead of the selected file!

Steps to reproduce:
1) create file Test1.java containing class Test
2) select it in project view
3) press Delete
-> 'File is empty. Cannot find references'

4) create new file Test.java containing class Test
5) select Test1 it in project view
6) press Delete
-> file Test.java is deleted. There is dialog saying that the class Test will be deleted but is it easy to miss it.


Product Version: NetBeans IDE Dev (Build 201205010400)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 1 Jan Becicka 2012-05-03 13:57:54 UTC
Changeset: 22792f31defd
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2012-05-03 10:03
Message:   
Issue #211940 - Cannot delete file containing badly named class
Comment 2 Quality Engineering 2012-05-05 10:21:56 UTC
Integrated into 'main-golden', will be available in build *201205050400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/22792f31defd
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #211940 - Cannot delete file containing badly named class