Skip to content

Commit

Permalink
Clarify behaviour of AnnotationBeanNameGenerator with acronyms
Browse files Browse the repository at this point in the history
Name transformation is delegated to Introspector#decapitalize, which
states "but in the (unusual) special case when there is more than one
character and both the first and second characters are upper case, we
leave it alone.". This commit clarifies this behavior.

See gh-2030
  • Loading branch information
matips authored and snicoll committed Nov 24, 2021
1 parent 829bed0 commit 341f488
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
*
* <p>If the annotation's value doesn't indicate a bean name, an appropriate
* name will be built based on the short name of the class (with the first
* letter lower-cased). For example:
* letter lower-cased). If two first letters of class name are uppercase, bean name will be unchanged. For example:
*
* <pre class="code">com.xyz.FooServiceImpl -&gt; fooServiceImpl</pre>
*
* <pre class="code">com.xyz.URLFooServiceImpl -&gt; URLFooServiceImpl</pre>
*
* @author Juergen Hoeller
* @author Mark Fisher
* @since 2.5
Expand Down

0 comments on commit 341f488

Please sign in to comment.