Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-355

Minor tweak to AddResource to make writing unit tests easier

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.2
    • Component/s: None
    • Labels:
      None

      Description

      Currently the AddResource.writeWithFullHeader method takes an ExtensionResponseWrapper object as a parameter.
      This makes calling this method from places other than the ExtensionsFilter difficult. In particular, it makes it difficult
      to call this method from a unit test.

      As the only thing done with this parameter is to convert it to a string, the attached patch changes this API to take a
      plain string parameter instead (and changes ExtensionsFilter to match).

      This also makes the writeWithFullHeader method less coupled to the ExtensionsFilter class, and generally simpler
      to understand.

      I hope you find this patch useful.

      Regards, Simon

        Attachments

        1. ExtensionsFilter.java.patch.txt
          0.8 kB
          Simon Kitching
        2. AddResource.java.patch.txt
          1 kB
          Simon Kitching

          Activity

            People

            • Assignee:
              mmarinschek Martin Marinschek
              Reporter:
              skitching Simon Kitching
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: