Skip to content

Commit

Permalink
Use Collection instead of List in model classes
Browse files Browse the repository at this point in the history
  • Loading branch information
pathob committed Feb 16, 2024
1 parent d4d810f commit 43f0b70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
* Bean for directory settings in REST requests.
Expand All @@ -34,10 +34,10 @@ public class DirectoryInternalBean extends AbstractDirectoryBean {
// in external directories also, so we just start with the internal directory for now.

@XmlElement
private List<GroupBean> groups;
private Collection<GroupBean> groups;

@XmlElement
private List<UserBean> users;
private Collection<UserBean> users;

@Data
@NoArgsConstructor
Expand All @@ -59,7 +59,7 @@ public static class DirectoryInternalCredentialPolicy {
private Long passwordMaxChangeTime;

@XmlElement
private List<Integer> passwordExpiryNotificationDays;
private Collection<Integer> passwordExpiryNotificationDays;

@XmlElement
private String passwordEncryptionMethod;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/aservo/confapi/commons/model/UserBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
import java.util.Collection;

/**
* Bean for users REST requests.
Expand Down Expand Up @@ -40,7 +40,7 @@ public class UserBean {
private String password;

@XmlElement
private List<GroupBean> groups;
private Collection<GroupBean> groups;

// Example instances for documentation and tests

Expand Down

0 comments on commit 43f0b70

Please sign in to comment.