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-165 - getRootDn bug with tenant context
Date Sat, 02 Apr 2016 13:37:39 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 5c68cf02e -> fcdf5cae8


 FC-165 - getRootDn bug with tenant context


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/fcdf5cae
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/fcdf5cae
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/fcdf5cae

Branch: refs/heads/master
Commit: fcdf5cae8f7b9db287e5c7d1e871ad13a5ed23ec
Parents: 5c68cf0
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sat Apr 2 08:37:33 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sat Apr 2 08:37:33 2016 -0500

----------------------------------------------------------------------
 .../directory/fortress/core/ldap/ApacheDsDataProvider.java   | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/fcdf5cae/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
b/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
index 5158aaa..5e410c7 100644
--- a/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/ApacheDsDataProvider.java
@@ -298,13 +298,11 @@ public abstract class ApacheDsDataProvider
         if ( StringUtils.isNotEmpty( contextId ) && !contextId.equalsIgnoreCase(
GlobalIds.NULL ) && !contextId
             .equals( GlobalIds.HOME ) )
         {
-            int idx = szDn.indexOf( Config.getProperty( GlobalIds.SUFFIX ) );
-
-            if ( idx != -1 )
+          int idx = szDn.indexOf( Config.getProperty( GlobalIds.SUFFIX ) );
+          if ( idx > 0 )
             {
-                // Found. The DN is ,ou=<contextId>,  
+                // Found. The DN is ,ou=<contextId>,
                 StringBuilder dn = new StringBuilder();
-
                 dn.append( szDn.substring( 0, idx - 1 ) ).append( "," ).append( SchemaConstants.OU_AT
).append( "=" )
                     .append(
                         contextId ).append( "," ).append( szDn.substring( idx ) );


Mime
View raw message