Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
Reviewed
Description
AutoCreatedQueueTemplate calculates wrong wildcard level so a root.* wildcard won't match for a root.queue for example.
Here the min should be min(queuePathMaxIndex, MAX_WILDCARD_LEVEL), instead of this:
int supportedWildcardLevel = Math.min(queuePathMaxIndex - 1, MAX_WILDCARD_LEVEL);
Test code to validate the fix:
@Test public void testWildcardAfterRoot() { conf.set(getTemplateKey("root.*", "acl_submit_applications"), "user"); AutoCreatedQueueTemplate template = new AutoCreatedQueueTemplate(conf, new QueuePath("root.a")); template.setTemplateEntriesForChild(conf, "root.a"); Assert.assertEquals("acl_submit_applications is set", "user", template.getTemplateProperties().get("acl_submit_applications")); }
Attachments
Issue Links
- links to