Skip to content

Commit

Permalink
[2.26.x] Fix multi-value exports for RTF (#6767)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexabird authored Oct 6, 2023
1 parent 14658fb commit 10b488e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ private ExportValue emptyValue() {

private ExportValue simpleValue(Attribute attribute) {
return new JustValue(
Optional.ofNullable(attribute.getValue()).map(Object::toString).orElse(null),
Optional.ofNullable(
attribute.getValues().stream()
.map(Object::toString)
.collect(Collectors.joining(", ")))
.orElse(null),
ValueType.SIMPLE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ Attribute createGifThumbnailAttribute() throws IOException {
Attribute createExtendedAttribute() {
Attribute mockAttribute = mock(Attribute.class);
when(mockAttribute.getValue()).thenReturn("Extended Value");

when(mockAttribute.getValues()).thenReturn(Collections.singletonList("Extended Value"));
return mockAttribute;
}

Attribute createSimpleAttribute() {
Attribute mockAttribute = mock(Attribute.class);
when(mockAttribute.getValue()).thenReturn("Simple value");

when(mockAttribute.getValues()).thenReturn(Collections.singletonList("Simple value"));
return mockAttribute;
}

Expand Down

0 comments on commit 10b488e

Please sign in to comment.