Skip to content

Commit

Permalink
fix: capitalize java bean property names, #528
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed May 15, 2023
1 parent 677ff84 commit 5eba002
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/googlecode/aviator/utils/Reflector.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,14 @@ static Object invokeMatchingMethod(final String methodName, final List methods,

}


public static StringBuilder capitalize(final StringBuilder sb, final String s) {
if (s == null) {
return sb;
}
if (s.length() > 1 && Character.isUpperCase(s.charAt(1))) {
return sb.append(s);
}
sb.append(s.substring(0, 1).toUpperCase());
sb.append(s.substring(1));
return sb;
Expand Down

0 comments on commit 5eba002

Please sign in to comment.