Bug 140301

Summary: API documentation of CharOperation.camelCaseMatch/4 is wrong or misleading
Product: [Eclipse Project] JDT Reporter: Tom Hofmann <eclipse>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.2   
Target Milestone: 3.2 RC4   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
CharOperation.java.diff none

Description Tom Hofmann CLA 2006-05-05 03:25:50 EDT
3.2 RC2

The javadoc for CharOperation.camelCaseMatch(char[], int, int, char[], int, int) is not clear about the semantics of the indices, and the given examples are wrong.

The javadoc for the index parameters should state that the start index is inclusive (index of the first pattern/name character) and the end index exclusive (index of the first character past the end of the pattern/name).

The examples state a pattern range of [1,3) for ['N', 'P', 'E'], which is wrong, as it should be [0, 3).

The examples state a pattern range of [1,3) for ['N', 'u', 'P', 'o', 'E', 'x'], which is wrong, as it should be [0, 6).

I will attach a patch.
Comment 1 Tom Hofmann CLA 2006-05-05 03:27:04 EDT
Created attachment 40458 [details]
CharOperation.java.diff

Javadoc patch against CharOperation.java R1.72
Comment 2 Frederic Fusier CLA 2006-05-05 04:44:28 EDT
I will also fix SearchPattern corresponding string methods.
I don't think we'll ask for a rebuild for this, but I guess this at least will be put for RC4...
Comment 3 Frederic Fusier CLA 2006-05-05 04:55:37 EDT
Philippe,
Do you think it could be changed for 3.2 or we postpone this doc change for 3.3?
Comment 4 Philipe Mulet CLA 2006-05-05 05:55:47 EDT
Doc change is fine for RC4.
Comment 5 Frederic Fusier CLA 2006-05-09 07:10:24 EDT
Thanks Tom for the patch. 
've also applied your change in SearchPattern duplicated method.
Released in HEAD.

Comment 6 Olivier Thomann CLA 2006-05-11 21:56:14 EDT
Verified with I20060511-2000 for 3.2RC4