[spring-extensions] branch master updated: IDP-1450 Fix previous over-aggressive checkin

Rod Widdowson rdw at steadingsoftware.com
Mon Jul 22 06:33:45 EDT 2019


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository spring-extensions.

View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=12bb3f64c0c7ee575fa77f470a0b294e8404d85c

The following commit(s) were added to refs/heads/master by this push:
       new  12bb3f6   
       new  IDP-1450  Fix previous over-aggressive checkin
12bb3f6 is described below

commit 12bb3f64c0c7ee575fa77f470a0b294e8404d85c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jul 22 11:33:24 2019 +0100

    
IDP-1450 Fix previous over-aggressive checkin
---
 .../net/shibboleth/ext/spring/factory/PatternFactoryBean.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/main/java/net/shibboleth/ext/spring/factory/PatternFactoryBean.java b/src/main/java/net/shibboleth/ext/spring/factory/PatternFactoryBean.java
index 3c7122a..0a993a8 100644
--- a/src/main/java/net/shibboleth/ext/spring/factory/PatternFactoryBean.java
+++ b/src/main/java/net/shibboleth/ext/spring/factory/PatternFactoryBean.java
@@ -56,6 +56,7 @@ public class PatternFactoryBean extends AbstractComponentAwareFactoryBean<Patter
      * @param what The value to set.
      */
     public void setCaseSensitive(@Nullable final String what) {
+        Constraint.isNotNull(what, "caseSensitive cannot be null");
         caseSensitive = what;
     }
 
@@ -81,8 +82,13 @@ public class PatternFactoryBean extends AbstractComponentAwareFactoryBean<Patter
     @Override protected Pattern doCreateInstance() throws Exception {
         Constraint.isNotNull(regexp, "Regular expression cannot be null");
         
-        final Boolean isCaseSentitive = StringSupport.booleanOf(caseSensitive);
-        Constraint.isNotNull(isCaseSentitive, "caseSensitive cannot be null");
+        final Boolean isCaseSentitive;
+        if (caseSensitive != null) {
+            isCaseSentitive = StringSupport.booleanOf(caseSensitive);
+            Constraint.isNotNull(isCaseSentitive, "caseSensitive cannot be null");
+        } else {
+            isCaseSentitive = true;
+        }
 
         if (isCaseSentitive) {
             return Pattern.compile(regexp, 0);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list