[Sunxacml-commit] sunxacml/com/sun/xacml/cond MatchFunction.java,1.1.1.1,1.2
Brought to you by:
farrukh_najmi,
sethp
From: <se...@us...> - 2004-01-07 21:31:23
|
Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond In directory sc8-pr-cvs1:/tmp/cvs-serv23329/sun/xacml/cond Modified Files: MatchFunction.java Log Message: brought over a few fixes from the 1.1 branch Index: MatchFunction.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/cond/MatchFunction.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MatchFunction.java 13 Feb 2003 22:19:10 -0000 1.1.1.1 --- MatchFunction.java 7 Jan 2004 21:31:18 -0000 1.2 *************** *** 174,185 **** // in several ways; the next several code blocks transform // the XACML syntax into a semantically equivalent Pattern syntax // in order to handle the requirement that the string is // considered to match the pattern if any substring matches ! // the pattern, we prepend ".*" and append ".*" to the reg exp ! StringBuffer buf = new StringBuffer(arg0); ! buf = buf.insert(0, ".*"); ! buf = buf.insert(buf.length(), ".*"); // in order to handle Unicode blocks, we replace all --- 174,190 ---- // in several ways; the next several code blocks transform // the XACML syntax into a semantically equivalent Pattern syntax + + StringBuffer buf = new StringBuffer(arg0); + // in order to handle the requirement that the string is // considered to match the pattern if any substring matches ! // the pattern, we prepend ".*" and append ".*" to the reg exp, ! // but only if there isn't an anchor (^ or $) in place ! if (arg0.charAt(0) != '^') ! buf = buf.insert(0, ".*"); ! if (arg0.charAt(arg0.length() - 1) != '$') ! buf = buf.insert(buf.length(), ".*"); // in order to handle Unicode blocks, we replace all |