directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r345877 - /directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java
Date Mon, 21 Nov 2005 09:14:34 GMT
Author: elecharny
Date: Mon Nov 21 01:14:14 2005
New Revision: 345877

URL: http://svn.apache.org/viewcvs?rev=345877&view=rev
Log:
- Protect the code from NPE

Modified:
    directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java

Modified: directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java?rev=345877&r1=345876&r2=345877&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java
(original)
+++ directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/schema/RegexNormalizer.java
Mon Nov 21 01:14:14 2005
@@ -31,6 +31,7 @@
 {
     /** the perl 5 regex engine */
     private final Perl5Util perl = new Perl5Util() ;
+    
     /** the set of regular expressions used to transform values*/
     private String [] regexes ;
 
@@ -51,6 +52,11 @@
      */
     public Object normalize( final Object value )
     {
+        if ( value == null )
+        {
+            return null;
+        }
+        
         if ( value instanceof String )
         {
             String str = ( String ) value ;



Mime
View raw message