Fixed a problem with matching function boolean logic.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 19 Dec 2002 20:16:18 +0000 (20:16 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 19 Dec 2002 20:16:18 +0000 (20:16 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@386 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/arp/provider/ExactSharMatchFunction.java
src/edu/internet2/middleware/shibboleth/aa/arp/provider/RegexMatchFunction.java
src/edu/internet2/middleware/shibboleth/aa/arp/provider/ResourceTreeMatchFunction.java

index cfffb4a..a3f89cf 100755 (executable)
@@ -68,7 +68,7 @@ public class ExactSharMatchFunction implements MatchFunction {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
-               if (!(arpComponent instanceof String) && !(requestComponent instanceof String)) {
+               if (!(arpComponent instanceof String) || !(requestComponent instanceof String)) {
                        log.error("Invalid use of ARP matching function (ExacthSharMatchFunction).");
                        throw new MatchingException("Invalid use of ARP matching function (ExacthSharMatchFunction).");
                }
                        log.error("Invalid use of ARP matching function (ExacthSharMatchFunction).");
                        throw new MatchingException("Invalid use of ARP matching function (ExacthSharMatchFunction).");
                }
index 8de03d1..b586a6c 100755 (executable)
@@ -72,7 +72,7 @@ public class RegexMatchFunction implements MatchFunction {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
-               if (!(arpComponent instanceof String) && !(requestComponent instanceof String || requestComponent instanceof URL)) {
+               if (!(arpComponent instanceof String) || !(requestComponent instanceof String || requestComponent instanceof URL)) {
                        log.error("Invalid use of ARP matching function (RegexMatchFunction).");
                        throw new MatchingException(
                                "Invalid use of ARP matching function (RegexMatchFunction).");
                        log.error("Invalid use of ARP matching function (RegexMatchFunction).");
                        throw new MatchingException(
                                "Invalid use of ARP matching function (RegexMatchFunction).");
index ef9ea9a..ece33c1 100755 (executable)
@@ -72,7 +72,7 @@ public class ResourceTreeMatchFunction implements MatchFunction {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
        public boolean match(Object arpComponent, Object requestComponent)
                throws MatchingException
        {
-               if (!(arpComponent instanceof String) && !(requestComponent instanceof URL)) {
+               if (!(arpComponent instanceof String) || !(requestComponent instanceof URL)) {
                        log.error("Invalid use of ARP matching function (ResourceTreeMatchFunction).");
                        throw new MatchingException(
                                "Invalid use of ARP matching function (ResourceTreeMatchFunction).");
                        log.error("Invalid use of ARP matching function (ResourceTreeMatchFunction).");
                        throw new MatchingException(
                                "Invalid use of ARP matching function (ResourceTreeMatchFunction).");