Skip to content

Commit cc7c4d7

Browse files
authored
Merge pull request #96 from thc202/tweaks
Tidy up code
2 parents 27c28ed + 5a49a30 commit cc7c4d7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/Alert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public enum Risk {
2626
Low,
2727
Medium,
2828
High
29-
};
29+
}
3030
/**
3131
* @deprecated (2.4.0) Replaced by {@link Confidence}. Use of reliability has been deprecated in
3232
* favour of using confidence.
@@ -35,15 +35,15 @@ public enum Risk {
3535
public enum Reliability {
3636
Suspicious,
3737
Warning
38-
};
38+
}
3939

4040
public enum Confidence {
4141
FalsePositive,
4242
Low,
4343
Medium,
4444
High,
4545
Confirmed
46-
};
46+
}
4747

4848
private String id;
4949
private String name;

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ApiResponseList.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class ApiResponseList extends ApiResponse {
3030

3131
public ApiResponseList(String name) {
3232
super(name);
33-
this.list = new ArrayList<ApiResponse>();
33+
this.list = new ArrayList<>();
3434
}
3535

3636
public ApiResponseList(Node node) throws ClientApiException {
@@ -45,7 +45,7 @@ public ApiResponseList(Node node) throws ClientApiException {
4545
public ApiResponseList(Node node, ApiResponseList template) throws ClientApiException {
4646
super(node.getNodeName());
4747
try {
48-
this.list = new ArrayList<ApiResponse>();
48+
this.list = new ArrayList<>();
4949
Class<? extends ApiResponse> clazz = template.getItemsClass();
5050
if (clazz != null) {
5151

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

6565
public ApiResponseList(String name, ApiResponse[] array) {
6666
super(name);
67-
this.list = new ArrayList<ApiResponse>();
67+
this.list = new ArrayList<>();
6868
for (ApiResponse resp : array) {
6969
list.add(resp);
7070
}

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public void checkAlerts(List<Alert> ignoreAlerts, List<Alert> requireAlerts, Fil
264264
}
265265

266266
public List<Alert> getAlerts(String baseUrl, int start, int count) throws ClientApiException {
267-
List<Alert> alerts = new ArrayList<Alert>();
267+
List<Alert> alerts = new ArrayList<>();
268268
ApiResponse response =
269269
alert.alerts(baseUrl, String.valueOf(start), String.valueOf(count), null);
270270
if (response != null && response instanceof ApiResponseList) {

0 commit comments

Comments
 (0)