diff options
author | Vikas Varma <vv8305@att.com> | 2020-01-10 17:55:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-10 17:55:22 +0000 |
commit | 2994a87b2564cfbfce7e82a61a0229a13e91d6e2 (patch) | |
tree | 31c0728e52ae9eb132fb111d773be593d68f0115 /cmso-service | |
parent | 7f2896d3cad2819b218cfea4c5ce3a81145417af (diff) | |
parent | 480783d421688514d9d0ebe6c928dc08aa9a596b (diff) |
Merge "replacing with the diamond operators"
Diffstat (limited to 'cmso-service')
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java | 22 | ||||
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/ticketmgt/TmClient.java | 10 |
2 files changed, 9 insertions, 23 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java index 9ddb893..0d81377 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java @@ -120,8 +120,8 @@ public class CmQueryParameters { private static String formatString(String urlName, List<String> values, QueryColumns qc) {
StringBuilder clause = new StringBuilder();
- List<String> likes = new ArrayList<String>();
- List<String> in = new ArrayList<String>();
+ List<String> likes = new ArrayList<>();
+ List<String> in = new ArrayList<>();
for (String value : values) {
if (value.contains("%")) {
likes.add(value);
@@ -170,7 +170,7 @@ public class CmQueryParameters { }
private static String formatDate(String urlName, List<String> values, QueryColumns qc) throws CmsoException {
- List<String> clauses = new ArrayList<String>();
+ List<String> clauses = new ArrayList<>();
for (String value : values) {
String[] dates = value.split(",");
switch (dates.length) {
@@ -231,19 +231,5 @@ public class CmQueryParameters { }
}
- // public static void main(String argv[])
- // {
- // List<String> values = new ArrayList<String>();
- // values.add("2017-07-08T11:12:13Z,2017-07-08T11:12:13Z");
- // values.add("2017-07-09T11:12:13Z,2017-07-09T11:12:13Z");
- // values.add(",2017-07-09T11:12:13Z");
- // values.add(" 2017-07-09T11:12:13Z");
- // try {
- // System.out.println(buildClause("request.createDateTime", values));
- // } catch (SchedulerException e) {
- // // TODO Auto-generated catch block
- // e.printStackTrace();
- // }
- //
- // }
+
}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/ticketmgt/TmClient.java b/cmso-service/src/main/java/org/onap/optf/cmso/ticketmgt/TmClient.java index 1864da7..b2b4479 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/ticketmgt/TmClient.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/ticketmgt/TmClient.java @@ -234,7 +234,7 @@ public class TmClient { }
}
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put(Variables.status.toString(), "Closed");
variables.put(Variables.requesterId.toString(), requesterId);
@@ -248,7 +248,7 @@ public class TmClient { private Map<String, Object> getCancelVariables(Schedule schedule, String changeId) {
String requesterId = schedule.getUserId();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (requesterId.length() > Variables.requesterId.getMaxLength()) {
requesterId = requesterId.substring(0, Variables.requesterId.getMaxLength());
}
@@ -259,7 +259,7 @@ public class TmClient { private Map<String, Object> getUpdateVariables(Schedule schedule, String changeId) {
String requesterId = schedule.getUserId();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (requesterId.length() > Variables.requesterId.getMaxLength()) {
requesterId = requesterId.substring(0, Variables.requesterId.getMaxLength());
}
@@ -275,7 +275,7 @@ public class TmClient { Response response = null;
debug.debug("postCloseChangeTicket {}", closeChangeRecord.asText());
Observation.report(LogMessages.TM_CLOSE_CHANGE_RECORD, "Begin", scheduleId, changeId);
- // response = vtmPost(url, closeChangeRecord, scheduleId);
+
response = tmPost(Endpoint.CLOSE, closeChangeRecord, scheduleId);
Observation.report(LogMessages.TM_CLOSE_CHANGE_RECORD, "End", scheduleId, changeId);
switch (response.getStatus()) {
@@ -338,7 +338,7 @@ public class TmClient { }
private List<TmAsset> getAssetList(List<String> vnfNames) {
- List<TmAsset> assetList = new ArrayList<TmAsset>();
+ List<TmAsset> assetList = new ArrayList<>();
for (String vnfName : vnfNames) {
TmAsset asset = new TmAsset();
asset.setAssetId(vnfName);
|