Project: JDT
Bug 118399 [refactoring] Rename type with similar elements does not work for URL
Reported: 2005-11-29 05:31:20 | Status: verified fixed

code for I20051129-0800 Renaming classes with multiple consecutive uppercase characters does not work as expected. For a class like URL, variables are usually called url or fUrl, and not uRL or fURL. Currently, only the latter version is found. I guess single-character CamelCase hunks need special treatment. class URL { private URL fUrl, fURL2; URL createUrl() { URL url= fUrl, uRL2= fURL2; return null; } } Ideal result when renaming to UniformResourceLocator: class UniformResourceLocator { private UniformResourceLocator fUniformResourceLocator, fUniformResourceLocator2; UniformResourceLocator createfUniformResourceLocator() { UniformResourceLocator uniformResourceLocator= fUniformResourceLocator, uniformResourceLocator2= fUniformResourceLocator2; return null; } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenamingNameSuggestorTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java