Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1397

Incorrect nesting level counting for matcher mbean name

    XMLWordPrintableJSON

Details

    Description

      The nesting level in the mbean name of composite matcher is incorrect if there are more than one composite matcher in the same nesting level.
      Consider this:

      <matcher name="composite" match="Or">
      <matcher match="And">
      <matcher match="SubjectIs=example"/>
      </matcher>
      <matcher match="And">
      <matcher match="SenderIsRegex=example.*"/>
      </matcher>
      </matcher>

      mbean name will be
      SubjectIs: <parent part>subtype2=matcher,index2=0,matchername2=SubjectIs
      SenderIsRegex: <parent part>subtype3=matcher,index3=0,matchername3=SenderIsRegex
      first And: <parent part>subtype1=matcher,index1=0,matchername1=And
      second And: <parent part>subtype1=matcher,index1=1,matchername1=And

      nesting level of SenderIsRegex should be 2 instead of 3

      Attachments

        1. fix_mbean_level.patch
          2 kB
          TzeKai Lee

        Activity

          People

            eric@apache.org Eric Charles
            chikei TzeKai Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: