Bug 260840 - NamingConventions creates wrong plural for name ending in <vowel>y
Summary: NamingConventions creates wrong plural for name ending in <vowel>y
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.5 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-13 07:05 EST by Markus Keller CLA
Modified: 2009-03-10 09:40 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (4.28 KB, patch)
2009-03-05 11:05 EST, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-01-13 07:05:43 EST
I20090106-1323

public class Try {
	public static class Key { }
	
	Key[] getKeys() {
		return new Key[] { new Key() };
	}
}

Select "new Key[] { new Key() }" and choose Refactor > Extract Local Variable.
=> Suggests "keies".

The the "y" -> "ies" transformation does not apply if the letter before the "y" is a vowel (a, e, i, o, u).
Comment 1 David Audel CLA 2009-03-05 11:05:09 EST
Created attachment 127666 [details]
Proposed fix
Comment 2 David Audel CLA 2009-03-05 11:07:49 EST
Released for 3.5M6.

Tests added
  NamingConventionTests#testSuggestFieldName041() -> testSuggestFieldName042()
Comment 3 Olivier Thomann CLA 2009-03-10 09:40:43 EDT
Verified for 3.5M6 using I20090310-0100.