diff options
author | manisha07 <cmanis10@in.ibm.com> | 2019-11-06 15:54:51 +0530 |
---|---|---|
committer | chapalamadugu manisha <cmanis10@in.ibm.com> | 2019-11-06 10:44:40 +0000 |
commit | 480783d421688514d9d0ebe6c928dc08aa9a596b (patch) | |
tree | e0af73262383d6372dfaef7761a1fa53a6af0e30 /cmso-service/src/main | |
parent | b0ea96ed0edd3436e2a9de33ce8340279982d445 (diff) |
replacing with the diamond operators
Issue-ID: OPTFRA-635
Change-Id: I2cfd17d545a89b0be27bd4b73e402074465bcaa3
Signed-off-by: manisha07 <cmanis10@in.ibm.com>
Diffstat (limited to 'cmso-service/src/main')
-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 1e4a46a..ebad49f 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) {
@@ -232,19 +232,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);
|