[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filte...
noreply at shibboleth.net
noreply at shibboleth.net
Sun Jun 29 10:09:45 EDT 2014
Author: rdw
Date: Sun Jun 29 10:09:45 2014
New Revision: 6182
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6182&view=rev
Log:
IDP-379 use IgnoreCase rather than IsCaseSensitive. This allows for direct injection of the config value into the bean.
Modified:
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcher.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/TargettedAttributeValueFilterTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/UntargettedAttributeValueFilterTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcherTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/AttributeScopeStringMatcherTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/AttributeValueStringMatcherTest.java
trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/matcher/AbstractStringMatcherParser.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/matcher/AttributeScopeMatcherParserTest.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/matcher/AttributeValueMatcherParserTest.java
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcher.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcher.java?rev=6182&r1=6181&r2=6182&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcher.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/impl/AbstractStringMatcher.java Sun Jun 29 10:09:45 2014
@@ -30,7 +30,7 @@
private String matchString;
/** Whether the match evaluation is case sensitive. */
- private boolean caseSensitive;
+ private boolean ignoreCase = true;
/**
* Gets the string to match for a positive evaluation.
@@ -51,23 +51,23 @@
}
/**
- * Gets whether the match evaluation is case sensitive.
+ * Gets whether the match evaluation is case insensitive.
*
- * @return whether the match evaluation is case sensitive
+ * @return whether the match evaluation is case insensitive
*/
- public boolean getCaseSensitive() {
- return caseSensitive;
+ public boolean isIgnoreCase() {
+ return ignoreCase;
}
/**
- * Sets whether the match evaluation is case sensitive.
+ * Sets whether the match evaluation is case insensitive.
*
- * @param isCaseSensitive whether the match evaluation is case sensitive
+ * @param isCaseInsensitive whether the match evaluation is case sensitive
*/
- public void setCaseSensitive(boolean isCaseSensitive) {
- caseSensitive = isCaseSensitive;
+ public void setIgnoreCase(boolean isCaseInsensitive) {
+ ignoreCase = isCaseInsensitive;
}
-
+
/**
* Matches the given value against the provided match string.
*
@@ -80,10 +80,10 @@
return matchString == null;
}
- if (caseSensitive) {
+ if (ignoreCase) {
+ return value.equalsIgnoreCase(matchString);
+ } else {
return value.equals(matchString);
- } else {
- return value.equalsIgnoreCase(matchString);
}
}
}
Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/TargettedAttributeValueFilterTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/TargettedAttributeValueFilterTest.java?rev=6182&r1=6181&r2=6182&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/TargettedAttributeValueFilterTest.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/TargettedAttributeValueFilterTest.java Sun Jun 29 10:09:45 2014
@@ -50,7 +50,7 @@
private Matcher valueMatcher() {
AttributeValueStringMatcher retVal = new AttributeValueStringMatcher();
- retVal.setCaseSensitive(true);
+ retVal.setIgnoreCase(false);
retVal.setMatchString("jsmith");
retVal.setId("Test");
try {
[... 211 lines stripped ...]
More information about the commits
mailing list