directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-105 - [fortress-core] - fix npe with pw
Date Mon, 18 May 2015 19:46:40 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 2e5a93cb8 -> 4d037cb2b


FC-105 - [fortress-core] - fix npe with pw


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/4d037cb2
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/4d037cb2
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/4d037cb2

Branch: refs/heads/master
Commit: 4d037cb2b5aae082159371b4460921610c8af644
Parents: 2e5a93c
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon May 18 14:46:27 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon May 18 14:46:27 2015 -0500

----------------------------------------------------------------------
 .../org/apache/directory/fortress/core/rbac/User.java   | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4d037cb2/src/main/java/org/apache/directory/fortress/core/rbac/User.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/User.java b/src/main/java/org/apache/directory/fortress/core/rbac/User.java
index 464c01d..04dfa6b 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/User.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/User.java
@@ -376,7 +376,8 @@ public class User extends FortEntity implements Constraint, Serializable
     public User( String userId, char[] password )
     {
         this.userId = userId;
-        this.password = password.clone();
+        if( password != null )
+            this.password = password.clone();
     }
 
 
@@ -390,7 +391,8 @@ public class User extends FortEntity implements Constraint, Serializable
     public User( String userId, char[] password, String roleName )
     {
         this.userId = userId;
-        this.password = password.clone();
+        if( password != null )
+            this.password = password.clone();
         setRole( new UserRole( roleName ) );
     }
 
@@ -405,7 +407,8 @@ public class User extends FortEntity implements Constraint, Serializable
     public User( String userId, char[] password, String[] roleNames )
     {
         this.userId = userId;
-        this.password = password.clone();
+        if( password != null )
+            this.password = password.clone();
 
         if ( roleNames != null )
         {
@@ -428,7 +431,8 @@ public class User extends FortEntity implements Constraint, Serializable
     public User( String userId, char[] password, String roleName, String ou )
     {
         this.userId = userId;
-        this.password = password.clone();
+        if( password != null )
+            this.password = password.clone();
         setRole( new UserRole( roleName ) );
         this.ou = ou;
     }


Mime
View raw message