[ 
https://issues.apache.org/jira/browse/TEXT-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18020002#comment-18020002
 ] 

Piotr Karwasz commented on TEXT-238:
------------------------------------

There is nothing disqualifying about using AI. We use the *AI-generated* 
checkbox to help triage review effort:

* *Clearly AI-generated PRs (no human in the loop):* These can overwhelm our 
capacity, often lack afterthought or a human to discuss with, and, ironically, 
most of the time do *not* tick the checkbox.
* *AI-assisted changes:* These are fine, but they require closer review. AI 
often introduces subtle mistakes a human wouldn’t. It does not actually *read* 
the Javadoc of called methods; it infers behavior from common method-name 
patterns.


> Overload CaseUtils.toCamelCase to default capitalizeFirstLetter=false
> ---------------------------------------------------------------------
>
>                 Key: TEXT-238
>                 URL: https://issues.apache.org/jira/browse/TEXT-238
>             Project: Commons Text
>          Issue Type: Improvement
>    Affects Versions: 1.14.0
>            Reporter: Kushal Dixit
>            Priority: Minor
>
> Right now, {{CaseUtils.toCamelCase(String, boolean, char...)}} always 
> requires specifying the {{capitalizeFirstLetter}} flag.
> In most real-world cases, users just want to convert a string to camelCase 
> with the first letter lowercased by default, as that is basically what 
> camelCase means originally.
> *Proposal:* add a new overload:
> {code:java}
> public static String toCamelCase(String str, char... delimiters) { ... }
> {code}
>  * Since {{delimiters}} is already a varargs parameter, an overload without 
> delimiters is not needed; callers can just omit it.
>  * This overload will also be beneficial for *method references* in JDK 8+, 
> making code like {{list.stream().map(CaseUtils::toCamelCase)}} cleaner.
> *Examples:*
> {code:java}
> CaseUtils.toCamelCase("java-utils", '-');        // javaUtils
> CaseUtils.toCamelCase("convert this string");    // convertThisString
> CaseUtils.toCamelCase("hello_world", '_')        // helloWorld{code}
> *Why it’s useful:*
> Most callers just want the first letter lowercased. Requiring {{false}} every 
> time is unnecessary boilerplate. This overload simplifies the API for the 
> common case while keeping the existing method unchanged for backward 
> compatibility.
> *Note:* Looking for feedback and approval. If this makes sense, I will raise 
> a PR with proper documentation and unit tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to