Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4953507

Contradiction in description of method GrammarLoaderFactory.setFeature()

XMLWordPrintable

    • generic
    • generic

      Name: eaR10174 Date: 11/13/2003


        There is a contradiction in the description of the method
      javax.xml.grammar.GrammarLoaderFactory.setFeature():
        
          public abstract void setFeature(String name,
                                      boolean value)
                               throws ParserConfigurationException
          ...

          A FactoryConfigurationError is thrown if the feature is not valid for the Factory.
          
          ...

          Throws:
              ParserConfigurationException - If feature is not valid for the Parser


      According to the first sentence the method throws FactoryConfigurationError. But the
      last sentence states that the method throws ParserConfigurationException in case when a
      feature is not valid.

        Another thing is that the text of the section 'Throws' of the method setFeature()
      differs from the text in the method getFeature():
        
        public abstract boolean getFeature(String name)
                                  throws ParserConfigurationException

          ...
          Throws:
              ParserConfigurationException - if the feature name is not known


        The text should be the same in both sections. The variant of the method getFeature() is
      more preferable.

        The bug is found in the javadoc of jdk1.5.0beta-b28.


      ======================================================================

            vkorcl Venugopal K (Inactive)
            evgsunw Evg Evg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: