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 254799 - [81cat]Cannot refactor package names - applies for Java, Java web and enterprise ANT projects
Summary: [81cat]Cannot refactor package names - applies for Java, Java web and enterpr...
Status: RESOLVED DUPLICATE of bug 238062
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-28 08:24 UTC by manikantannaren
Modified: 2015-08-30 08:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (125.89 KB, text/plain)
2015-08-28 08:24 UTC, manikantannaren
Details
Package BEAN retained (78.14 KB, image/png)
2015-08-28 08:26 UTC, manikantannaren
Details
Package in class changed to bean (38.79 KB, image/png)
2015-08-28 08:26 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2015-08-28 08:24:37 UTC
Product Version = NetBeans IDE Dev (Build 201508270002)
Operating System = Mac OS X version 10.10.4 running on x86_64
Java; VM; Vendor = 1.8.0_60-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Steps to reproduce
1. Create a Java Web project
2. Define a package say BEAN
3. Define a new class (can be a simple POJO or a session bean or entity bean)
4. Right click on package Choose Refactor->Rename
5. in the rename dialog enter "bean" i.e. the lower case of the previously entered name.
6. Click Refactor
7. again right click on BEAN package, and choose Refactor->Rename
8. in the rename dialog enter BEAN1
9. Click Refactor

Expected result
1. After Step 6: package BEAN is renamed as bean, package declaration in class is "package bean;"
2. After Step 8: Package BEAN is renamed BEAN1

Actual Result
1. After Step 6: package BEAN remains as BEAN, package declaration in class is "package bean;"
2. After Step 8: Package BEAN1 is added, Package BEAN remains as BEAN
Comment 1 manikantannaren 2015-08-28 08:24:43 UTC
Created attachment 155707 [details]
IDE log
Comment 2 manikantannaren 2015-08-28 08:26:44 UTC
Created attachment 155708 [details]
Package BEAN retained
Comment 3 manikantannaren 2015-08-28 08:26:53 UTC
Created attachment 155709 [details]
Package in class changed to bean
Comment 4 manikantannaren 2015-08-28 08:27:40 UTC
Other things tried
1. Closed and open project - No Effect
2. Maven projects - Such behaviour not exhibited.
Comment 5 stwr 2015-08-28 08:56:52 UTC
I am not able to rename the package 'BEAN' to 'bean'. The refactor dialog displays on the bottom the following error: Package "bean" already exists.

Product Version: NetBeans IDE Dev (Build 201508280002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 6 stwr 2015-08-28 08:57:24 UTC
I forgot one thing - I have tested Java & Java Web Application.
Comment 7 manikantannaren 2015-08-28 09:08:22 UTC
Could it be because on Windows FileSystem file names are case insensitive
Comment 8 Jiri Kovalsky 2015-08-28 11:04:17 UTC
Yes, that's the reason. See issue #7086
Comment 9 Ralph Ruijs 2015-08-30 08:43:04 UTC

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