[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:17:42 EDT 2014
Author: rdw
Date: Sun Jun 29 10:17:41 2014
New Revision: 6183
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6183&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/policyrule/impl/AbstractStringPolicyRule.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeIssuerPolicyRuleTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeRequesterPolicyRuleTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AuthenticationMethodPolicyRuleTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/PrincipalNamePolicyRuleTest.java
trunk/idp-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/AbstractStringPolicyRuleParser.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/policy/AttributeIssuerRuleParserTest.java
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/policy/AttributeRequesterRuleParserTest.java
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/AbstractStringPolicyRule.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/AbstractStringPolicyRule.java?rev=6183&r1=6182&r2=6183&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/AbstractStringPolicyRule.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/AbstractStringPolicyRule.java Sun Jun 29 10:17:41 2014
@@ -31,7 +31,7 @@
private String matchString;
/** Whether the match evaluation is case sensitive. */
- private boolean caseSensitive;
+ private boolean ignoreCase;
/**
* Gets the string to match for a positive evaluation.
@@ -52,21 +52,21 @@
}
/**
- * 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.
*
- * @param isCaseSensitive whether the match evaluation is case sensitive
+ * @param isIgnoreCase whether the match evaluation is case sensitive
*/
- public void setCaseSensitive(boolean isCaseSensitive) {
- caseSensitive = isCaseSensitive;
+ public void setIgnoreCase(boolean isIgnoreCase) {
+ ignoreCase = isIgnoreCase;
}
/**
@@ -82,10 +82,10 @@
boolean result;
if (value == null) {
result = matchString == null;
- } else if (caseSensitive) {
+ } else if (ignoreCase) {
+ result = value.equalsIgnoreCase(matchString);
+ } else {
result = value.equals(matchString);
- } else {
- result = value.equalsIgnoreCase(matchString);
}
if (result) {
return Tristate.TRUE;
Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeIssuerPolicyRuleTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeIssuerPolicyRuleTest.java?rev=6183&r1=6182&r2=6183&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeIssuerPolicyRuleTest.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/AttributeIssuerPolicyRuleTest.java Sun Jun 29 10:17:41 2014
@@ -19,7 +19,6 @@
import net.shibboleth.idp.attribute.filter.PolicyRequirementRule.Tristate;
import net.shibboleth.idp.attribute.filter.matcher.impl.DataSources;
-import net.shibboleth.idp.attribute.filter.policyrule.filtercontext.impl.AttributeIssuerPolicyRule;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
[... 150 lines stripped ...]
More information about the commits
mailing list