Bug 260840

Summary: NamingConventions creates wrong plural for name ending in <vowel>y
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann
Version: 3.5   
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

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.