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 212160

Summary: Refactor is not applying for a string of class or package name
Product: java Reporter: vidhyadharantechdays <vidhyadharantechdays>
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED DUPLICATE    
Severity: normal CC: hmichel, rajmahendra, vetrivendhan, vidhyadharantechdays
Priority: P4    
Version: 7.2   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description vidhyadharantechdays 2012-05-07 09:21:26 UTC
Refactor is not applying for a string. 

For example suppose i am declaring a sting like this

package com.netcat.test.*;

class AllTest{
.
.
.
.
.
String className = "com.netcat.test.JustForTest";
.
.
.
..
}
if i rename the package to "com.netcat.api.test", the refactor should rename the string as well.
Comment 1 crazyjavahacking 2012-05-08 14:55:15 UTC
I don't see the point there. String could have practically any possible value and it seems like crazy to try to scan through all of string values (from the performance side).

The only case which makes sense is the case when Class.forName() with string literal will be used.
Comment 2 vidhyadharantechdays 2012-05-08 14:58:49 UTC
No it will make sense. I saw an IDE which has this feature.
Comment 3 Ralph Ruijs 2012-05-09 09:22:59 UTC

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