Bug 140301 - API documentation of CharOperation.camelCaseMatch/4 is wrong or misleading
Summary: API documentation of CharOperation.camelCaseMatch/4 is wrong or misleading
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.2 RC4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-05 03:25 EDT by Tom Hofmann CLA
Modified: 2006-05-11 21:56 EDT (History)
1 user (show)

See Also:


Attachments
CharOperation.java.diff (2.66 KB, patch)
2006-05-05 03:27 EDT, Tom Hofmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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