Skip to content

Commit

Permalink
fix issue with types
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBredl committed May 31, 2024
1 parent 43a806e commit d9498da
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@NoArgsConstructor(access = lombok.AccessLevel.PRIVATE)
public class ImsEventTypes {

private static final List<FieldSchemaDefinition> DEFAULT_ISSUE_DATA = List.of(
private static final List<DefaultFieldSchemaDefinition> DEFAULT_ISSUE_DATA = List.of(
DefaultFieldSchemaDefinition.builder()
.setName("issueId")
.setType(AllowedDataType.STRING)
Expand All @@ -25,9 +25,8 @@ public class ImsEventTypes {
.setRequired(true)
.build());

@SafeVarargs
private static <T> List<T> concat(List<T> list1, T... otherElements) {
List<T> result = new ArrayList<>(list1);
private static List<DefaultFieldSchemaDefinition> defaultDataAnd(DefaultFieldSchemaDefinition... otherElements) {
List<DefaultFieldSchemaDefinition> result = new ArrayList<>(ImsEventTypes.DEFAULT_ISSUE_DATA);
Collections.addAll(result, otherElements);
return result;
}
Expand All @@ -41,8 +40,7 @@ private static <T> List<T> concat(List<T> list1, T... otherElements) {
.setDefaultVisibility(EventVisibility.PUBLIC)
.setEventSchema(DefaultSchemaDefinition.builder()
.setFields(
concat(
DEFAULT_ISSUE_DATA,
defaultDataAnd(
DefaultFieldSchemaDefinition.builder()
.setName("assigneeId")
.setType(AllowedDataType.STRING)
Expand Down Expand Up @@ -81,8 +79,7 @@ private static <T> List<T> concat(List<T> list1, T... otherElements) {
.setDefaultVisibility(EventVisibility.PUBLIC)
.setEventSchema(DefaultSchemaDefinition.builder()
.setFields(
concat(
DEFAULT_ISSUE_DATA,
defaultDataAnd(
DefaultFieldSchemaDefinition.builder()
.setName("comment")
.setType(AllowedDataType.STRING)
Expand Down

0 comments on commit d9498da

Please sign in to comment.