Skip to content

Commit

Permalink
[FIXED JENKINS-38238] - Properly handle user lists for build wrappers (
Browse files Browse the repository at this point in the history
…#51)

The change prevents the proken item separation in the list.

https://issues.jenkins-ci.org/browse/JENKINS-38236
  • Loading branch information
oleg-nenashev committed Sep 15, 2016
1 parent a813396 commit 1c9e093
Showing 1 changed file with 4 additions and 12 deletions.
Expand Up @@ -119,16 +119,9 @@ public static Set<String> getSecondaryOwnerIds(@Nonnull OwnershipDescription des
* @deprecated Use {@link #getAllOwnerIdsString(com.synopsys.arc.jenkins.plugins.ownership.OwnershipDescription)}
*/
@Deprecated
public static @Nonnull String getCoOwnerIDs(@Nonnull OwnershipDescription descr) {
StringBuilder coowners= new StringBuilder();
for (String userId : getSecondaryOwnerIds(descr, true)) {
//TODO: Bug? Should it be != ?
if (coowners.length() == 0) {
coowners.append(",");
}
coowners.append(userId);
}
return coowners.toString();
@Nonnull
public static String getCoOwnerIDs(@Nonnull OwnershipDescription descr) {
return getAllOwnerEmailsString(descr);
}

/**
Expand All @@ -141,8 +134,7 @@ public static Set<String> getSecondaryOwnerIds(@Nonnull OwnershipDescription des
public static String getAllOwnerIdsString(@Nonnull OwnershipDescription descr) {
StringBuilder coowners= new StringBuilder();
for (String userId : getSecondaryOwnerIds(descr, true)) {
//TODO: Bug? Should it be != ?
if (coowners.length() == 0) {
if (coowners.length() != 0) {
coowners.append(",");
}
coowners.append(userId);
Expand Down

0 comments on commit 1c9e093

Please sign in to comment.