Skip to content

Commit

Permalink
Merge pull request #96 from thc202/tweaks
Browse files Browse the repository at this point in the history
Tidy up code
  • Loading branch information
kingthorin authored Oct 11, 2021
2 parents 27c28ed + 5a49a30 commit cc7c4d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum Risk {
Low,
Medium,
High
};
}
/**
* @deprecated (2.4.0) Replaced by {@link Confidence}. Use of reliability has been deprecated in
* favour of using confidence.
Expand All @@ -35,15 +35,15 @@ public enum Risk {
public enum Reliability {
Suspicious,
Warning
};
}

public enum Confidence {
FalsePositive,
Low,
Medium,
High,
Confirmed
};
}

private String id;
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ApiResponseList extends ApiResponse {

public ApiResponseList(String name) {
super(name);
this.list = new ArrayList<ApiResponse>();
this.list = new ArrayList<>();
}

public ApiResponseList(Node node) throws ClientApiException {
Expand All @@ -45,7 +45,7 @@ public ApiResponseList(Node node) throws ClientApiException {
public ApiResponseList(Node node, ApiResponseList template) throws ClientApiException {
super(node.getNodeName());
try {
this.list = new ArrayList<ApiResponse>();
this.list = new ArrayList<>();
Class<? extends ApiResponse> clazz = template.getItemsClass();
if (clazz != null) {

Expand All @@ -64,7 +64,7 @@ public ApiResponseList(Node node, ApiResponseList template) throws ClientApiExce

public ApiResponseList(String name, ApiResponse[] array) {
super(name);
this.list = new ArrayList<ApiResponse>();
this.list = new ArrayList<>();
for (ApiResponse resp : array) {
list.add(resp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void checkAlerts(List<Alert> ignoreAlerts, List<Alert> requireAlerts, Fil
}

public List<Alert> getAlerts(String baseUrl, int start, int count) throws ClientApiException {
List<Alert> alerts = new ArrayList<Alert>();
List<Alert> alerts = new ArrayList<>();
ApiResponse response =
alert.alerts(baseUrl, String.valueOf(start), String.valueOf(count), null);
if (response != null && response instanceof ApiResponseList) {
Expand Down

0 comments on commit cc7c4d7

Please sign in to comment.