XalanJ2
  1. XalanJ2
  2. XALANJ-2554

Inconsistent Javadoc comment and code for setOutput(OutputProperties) in org.apache.xalan.templates.Stylesheet

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.1, 2.7
    • Fix Version/s: None
    • Component/s: Xalan
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • Labels:
    • Environment:
      Platform Independent

      Description

      The Javadoc comment below states that the parameter v is a "non-null reference to the OutputProperties object to be added to the collection":
      /**
      ...

      • @param v non-null reference to the OutputProperties object to be
      • added to the collection.
        */
        public void setOutput(OutputProperties v)
        However, the method return normally without throwing any exception when called with a null v.

      Suggested Fixes:
      1. Change "@param v non-null reference to the OutputProperties object to be added to the collection." to "@param v reference to the OutputProperties object to be added to the collection,null will be ignored."
      or
      2. Remove "non-null" from @param.

        Activity

        Hide
        SHIN HWEI TAN added a comment -

        The Javadoc comments reported above are referring to the "@param v non-null reference to the OutputProperties object to be" tag in the templates/Stylesheet.java file.

        Since a null element may be added to the m_output vector, the Javadoc comment "@return non-null reference to an OutputProperties object." for the corresponding getter (ie. getOutput(int i)) in templates/Stylesheet.java also need to be changed.

        Show
        SHIN HWEI TAN added a comment - The Javadoc comments reported above are referring to the "@param v non-null reference to the OutputProperties object to be" tag in the templates/Stylesheet.java file. Since a null element may be added to the m_output vector, the Javadoc comment "@return non-null reference to an OutputProperties object." for the corresponding getter (ie. getOutput(int i)) in templates/Stylesheet.java also need to be changed.
        Hide
        Steven J. Hathaway added a comment -

        XALANJ-2554 JavaDoc Comments

        Related Files: Needs Confirmation – Identify needed comment changes

        templates/OutputProperties.java: * @param method non-null reference to method name.
        templates/OutputProperties.java: * @param root non-null reference to the stylesheet root object.
        templates/OutputProperties.java: * @return non-null reference to Properties object.
        templates/OutputProperties.java: * @param src non-null reference to the source properties.
        templates/OutputProperties.java: * @param src non-null reference to the source properties.
        templates/OutputProperties.java: * @param opsrc non-null reference to an OutputProperties.
        templates/OutputProperties.java: * @param key non-null reference to key name.
        templates/OutputProperties.java: * @param method non-null reference to method name.
        templates/Stylesheet.java: * @param v non-null reference to the OutputProperties object to be
        templates/Stylesheet.java: * @return non-null reference to an OutputProperties object.

        Show
        Steven J. Hathaway added a comment - XALANJ-2554 JavaDoc Comments Related Files: Needs Confirmation – Identify needed comment changes templates/OutputProperties.java: * @param method non-null reference to method name. templates/OutputProperties.java: * @param root non-null reference to the stylesheet root object. templates/OutputProperties.java: * @return non-null reference to Properties object. templates/OutputProperties.java: * @param src non-null reference to the source properties. templates/OutputProperties.java: * @param src non-null reference to the source properties. templates/OutputProperties.java: * @param opsrc non-null reference to an OutputProperties. templates/OutputProperties.java: * @param key non-null reference to key name. templates/OutputProperties.java: * @param method non-null reference to method name. templates/Stylesheet.java: * @param v non-null reference to the OutputProperties object to be templates/Stylesheet.java: * @return non-null reference to an OutputProperties object.
        SHIN HWEI TAN created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            SHIN HWEI TAN
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 0.05h
              0.05h
              Remaining:
              Remaining Estimate - 0.05h
              0.05h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development