From 5a357d6354eeca5999fd56437b5b492cd8bbc310 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 28 Nov 2018 10:54:32 -0600 Subject: Add more Path Wildcard Issue-ID: AAF-649 Change-Id: I3eb81782dc899fb66d170c2ee7f3bfadccb01f22 Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/cadi/aaf/PermEval.java | 15 +++++++++++++-- .../java/org/onap/aaf/cadi/aaf/test/JU_PermEval.java | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java index 2c7aa12b..7c843dbd 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java @@ -66,11 +66,22 @@ public class PermEval { if (sInst.charAt(0)==startChar) { // To compare key-to-key, both strings must be keys String[] skeys=Split.split(startChar,sInst); String[] pkeys=Split.split(startChar,pInst); - if (skeys.length!=pkeys.length) return false; + if (pkeys.length skeys.length && + (skeys.length==0 || !ASTERIX.equals(skeys[skeys.length-1]))) { + return false; + } boolean pass = true; for (int i=1;pass && i