[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 00:03:00 EDT 2017
Brian Stansberry created WFCORE-3256:
----------------------------------------
Summary: 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