[jboss-jira] [JBoss JIRA] (WFCORE-3256) Filters.filterToFilterSpec fails if ANY or ALL include legal undefined fields
Brian Stansberry (JIRA)
issues at jboss.org
Thu Sep 7 16:45:00 EDT 2017
[ https://issues.jboss.org/browse/WFCORE-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460538#comment-13460538 ]
Brian Stansberry commented on WFCORE-3256:
------------------------------------------
[~jamezp] I did work around it in the WFCORE-3255 fix, and really the "workaround" was better code overall and not a workaround. So to me this is just something I noticed that's not quite right but isn't a big deal at all.
> 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