Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1941

Name given to bean with @Named annotation is not the correct default if it begins with two or more capitals

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      Create a bean class with a name that has more than one capital letters at the beginning and an @Named annotation. Try to call a method in this bean from a jsp.

      Show
      Create a bean class with a name that has more than one capital letters at the beginning and an @Named annotation. Try to call a method in this bean from a jsp.

      Description

      The CDI spec states:
      3.1.5. Default bean name for a managed bean
      The default name for a managed bean is the unqualified class name of the bean class, after
      converting the first character to lower case.
      For example, if the bean class is named ProductList, the default bean name is productList.

      This does not happen if the class name has two or more capital letters at the beginning, instead it does not decapitalize the first letter. e.g. if the class is named JSFBean the default bean name is JSFBean not jSFBean as excpected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mkouba Martin Kouba
              Reporter:
              katheris Katherine Stanley (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: