[jboss-jira] [JBoss JIRA] (WFCORE-3256) Filters.filterToFilterSpec fails if ANY or ALL include legal undefined fields

James Perkins (JIRA) issues at jboss.org
Thu Sep 7 11:36:00 EDT 2017


    [ https://issues.jboss.org/browse/WFCORE-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460400#comment-13460400 ] 

James Perkins commented on WFCORE-3256:
---------------------------------------

That is correct that the {{filter}} is the older attribute and {{filter-spec}} should be used. I'll have a look at this though.

> Filters.filterToFilterSpec fails if ANY or ALL include legal undefined fields
> -----------------------------------------------------------------------------
>
>                 Key: WFCORE-3256
>                 URL: https://issues.jboss.org/browse/WFCORE-3256
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Brian Stansberry
>            Assignee: James Perkins
>            Priority: Minor
>
> Say you have a filter value like this:
> {code}
> {
>     "any" => {
>         "match" => ".*",
>         "change-level" => undefined,
>         "level" => undefined,
>         "level-range" => undefined,
>         "not" => undefined
>     },
>     "all" => undefined,
>     "change-level" => undefined,
>     "level" => undefined,
>     "level-range" => undefined,
>     "not" => undefined
> }
> {code}
> Writing that will fail with "WFLYLOG0025: Filter ("change-level" => undefined) is invalid".
> This is because filterToFilterSpec will process the "any" node by iterating over its fields and recursing, and as soon as it gets to one of the 'undefined' ones it will fail. But the overall structure should be fine.
> I hit this when testing a WFCORE-3255 fix, one that had the effect of adding "change-level" => undefined, etc to the params used by LoggingOperationsSubsystemTestCase.testLegacyFilters.
> I can probably work around this easily enough and IIRC this 'filter' stuff is real old, so this is no big deal.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list