Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-970

Verify attributes in TLD match setters in Tag class

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • General
    • None

    Description

      A few times MyFaces has had problems where a TLD declares an attribute but there isn't any such setter on the Tag class.
      It should be possible to check for this in a unit test:

      • use Class.getResource to fetch the TLD file
      • for each <tag> element in the TLD
      • instantiate the specified tag class
      • for each <attribute> tag
      • verify there is a matching setter on the tag instance

      This would need to be applied to myfaces_core.tld, myfaces_html.tld, tomahawk.tld and sandbox.tld.
      Therefore base code for this could go in "share" with the actual test class (specifying the tld file) in the
      various subproject tests.

      I'm planning to tackle this in the next few weeks, but anyone else with an itch to implement this straight away is welcome

      Attachments

        1. AbstractTagLibTestCase.java
          2 kB
          Dennis Christopher Byrne
        2. SettersTestCase.java
          2 kB
          Dennis Christopher Byrne

        Issue Links

          Activity

            People

              dennisbyrne Dennis Christopher Byrne
              skitching Simon Kitching
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: