Commons Digester
  1. Commons Digester
  2. DIGESTER-14

[digester] Named stacks are not popped at end of processing

    Details

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

      Operating System: All
      Platform: All

      Description

      The method org.apache.commons.digester.Digester.endDocument() pops the main
      stack in a loop, but does not perform the same operation on stacksByName. This
      is inconsistent, and may result in an ever-growing stack if a Digester instance
      is cached and reused (notwithstanding documentation that Digester instances
      should not be reused anyway).
      An alternative to clearing stacksByName in endDocument() would be to do so in
      clear().

      It also would be more consistent (and useful) to have a method
      public Object peek(String stackName, int n);

        Activity

        Hide
        Simon Kitching added a comment -

        Thanks for the suggestion Brian. The change has been committed.

        Show
        Simon Kitching added a comment - Thanks for the suggestion Brian. The change has been committed.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian Hanafee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development