Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4099

Javadoc for ActionSupport.getText() incorrectly states null is returned when no message is found

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3.1, 2.3.14.3
    • Fix Version/s: 2.3.16
    • Component/s: Documentation
    • Labels:
      None

      Description

      The javadoc description of ActionSupport.getText(String aTextName) states:

      Description copied from interface: TextProvider
      Gets a message based on a message key, or null if no message is found.

      This is not correct, because the default text provider is TextProviderSupport, which uses the supplied key as the value to return if no message matching the key is found. This is true with all descriptions of the method variants that do not take a default value as a parameter.

      Additionally, the the descriptions of these methods in the TextProvider interface should not state "or null if no message is found" because this is just an interface, and the underlying behavior is really determined by the implementation class of course.

      The descriptions of getText() in ActionSupport should contain links to the corresponding descriptions in TextProviderSupport, along with a note that says that class is the default text provider. The TextProviderSupport methods should indicate that the message key is returned in cases where no default value is a parameter.

        Attachments

          Activity

            People

            • Assignee:
              bphillips Bruce Allen Phillips
              Reporter:
              chris.deangelis Chris De Angelis
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: