[ https://issues.apache.org/jira/browse/SYNCOPE-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675105#comment-16675105 ]
ASF GitHub Bot commented on SYNCOPE-1393: ----------------------------------------- AlexTsvetkov closed pull request #87: SYNCOPE-1393 URL: https://github.com/apache/syncope/pull/87 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java index a3b5c36831..e049faaee9 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/jexl/SyncopeJexlFunctions.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.commons.collections4.IterableUtils; import org.apache.commons.lang3.StringUtils; @@ -57,7 +58,7 @@ public String fullPath2Dn(final String fullPath, final String attr) { public String fullPath2Dn(final String fullPath, final String attr, final String prefix) { String[] fullPathSplitted = fullPath.split("/"); if (fullPathSplitted == null || fullPathSplitted.length <= 1) { - return prefix; + return StringUtils.EMPTY; } List<String> headless = Arrays.asList(fullPathSplitted).subList(1, fullPathSplitted.length); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > jexl function fullPath2Dn return invalid value for ROOT realm > ------------------------------------------------------------- > > Key: SYNCOPE-1393 > URL: https://issues.apache.org/jira/browse/SYNCOPE-1393 > Project: Syncope > Issue Type: Bug > Affects Versions: 2.0.10, 2.1.1 > Reporter: Alexander Tsvetkov > Priority: Major > Fix For: 2.1.0 > > > In mapping I have Object link: > 'cn=' + username + syncope:fullPath2Dn(realm, 'ou', ',') + > ',OU=BY,DC=sesdev,DC=lab' > For root realm it returns value with extra comma: > 'cn=testUser,,OU=BY,DC=sesdev,DC=lab' > BUT should return > 'cn=testUser,OU=BY,DC=sesdev,DC=lab' > So, for ROOT realm fullPath2Dn(realm, 'ou', ',') should return empty string, > BUT not comma. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)