Skip to content

Commit

Permalink
add trim for descriptionPropertyValue (jenkinsci#100)
Browse files Browse the repository at this point in the history
try to fix jenkinsci#81

for selectContent.jelly  <j:forEach var="value" items="${effectiveValue}"> this will be trim by jelly tag forEach.

for computeDefaultValue this will be trim by method computeDefaultValueMap

but descriptionPropertyValue was not trim.

Change-Id: Ic05be1679436d7c6c80c4d585a301acfbeaa5cc7
  • Loading branch information
bright.ma committed Nov 5, 2023
1 parent eb11820 commit 95bc8f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ private Map<String, String> computeDescriptionMap(String effectiveValue) {
descMap = new HashMap<>();
String[] descA = Iterables.toArray(Splitter.on(multiSelectDelimiter).split(desc), String.class);
for (int i = 0; i < values.length && i < descA.length; i++) {
descMap.put(values[i], descA[i]); // 每个value和每个description一一对应.
descMap.put(StringUtils.trim(values[i]), StringUtils.trim(descA[i])); // 每个value和每个description一一对应.
}
}
}
Expand Down

0 comments on commit 95bc8f2

Please sign in to comment.