Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-525

Default names should maybe follow the inferring rules from the JavaBean spec

    XMLWordPrintable

Details

    • Clarification
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Out of Date
    • 1.2.Final
    • None
    • None
    • None

    Description

      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.

      As a result, the default name for a bean class URLMatcher should be uRLMatcher. On the other hand the JavaBean spec is using different rules when inferring property names, 8.8 Capitalization of inferred names:

      However to support the occasional use of all upper-case names, we check if the first two characters of the name are both upper case and if so leave it alone.

      I.e. the property name for getter getURLMatcher() woud be URLMatcher.

      Note that there is no TCK test for this and so implementations may differ (issue is already filed: CDITCK-473). Weld is using java.beans.Introspector.decapitalize() and so it follows the JavaBean spec even now. I'm not sure about OpenWebBeans.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkouba@redhat.com Martin Kouba
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: