summaryrefslogtreecommitdiffstats
path: root/oom-app-common/src/main/java
diff options
context:
space:
mode:
authorsurya-huawei <a.u.surya@huawei.com>2017-09-20 11:53:06 +0530
committerSURYA A U <a.u.surya@huawei.com>2017-09-20 06:34:29 +0000
commit97662b28b1cfd66c167e6a13fbac1d1567780e10 (patch)
tree78c81299d1eb78e65fd2688d261baace239aa5cd /oom-app-common/src/main/java
parent1bd57845776d0f5ffad0425718685019e1ec79c1 (diff)
Fix Sonar Issue in ccsdk/dashboard module
Few major issues *Making anonymous inner class a lambda This increases code readability *Replace the type specification with the diamond operator This reduces the verbosity of generics code Issue-Id: CCSDK-87 Change-Id: Ia527040781af3a3d006486f3d73416f2f5e288cc Signed-off-by: surya-huawei <a.u.surya@huawei.com>
Diffstat (limited to 'oom-app-common/src/main/java')
-rw-r--r--oom-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java23
1 files changed, 4 insertions, 19 deletions
diff --git a/oom-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java b/oom-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
index 241a8cf..e9369e9 100644
--- a/oom-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
+++ b/oom-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
@@ -86,32 +86,17 @@ public class CloudifyController extends DashboardRestrictedBaseController {
/**
* Supports sorting blueprints by ID
*/
- private static Comparator<CloudifyBlueprint> blueprintComparator = new Comparator<CloudifyBlueprint>() {
- @Override
- public int compare(CloudifyBlueprint o1, CloudifyBlueprint o2) {
- return o1.id.compareTo(o2.id);
- }
- };
+ private static Comparator<CloudifyBlueprint> blueprintComparator = (o1, o2) -> o1.id.compareTo(o2.id);
/**
* Supports sorting deployments by ID
*/
- private static Comparator<CloudifyDeployment> deploymentComparator = new Comparator<CloudifyDeployment>() {
- @Override
- public int compare(CloudifyDeployment o1, CloudifyDeployment o2) {
- return o1.id.compareTo(o2.id);
- }
- };
+ private static Comparator<CloudifyDeployment> deploymentComparator = (o1, o2) -> o1.id.compareTo(o2.id);
/**
* Supports sorting executions by ID
*/
- private static Comparator<CloudifyExecution> executionComparator = new Comparator<CloudifyExecution>() {
- @Override
- public int compare(CloudifyExecution o1, CloudifyExecution o2) {
- return o1.id.compareTo(o2.id);
- }
- };
+ private static Comparator<CloudifyExecution> executionComparator = (o1, o2) -> o1.id.compareTo(o2.id);
/**
* Gets one page of objects and supporting information via the REST client.
@@ -497,7 +482,7 @@ public class CloudifyController extends DashboardRestrictedBaseController {
logger.setRequestBasedDefaultsIntoGlobalLoggingContext(request, APP_NAME);
ECTransportModel result = null;
try {
- List<CloudifyExecution> itemList = new ArrayList<CloudifyExecution>();
+ List<CloudifyExecution> itemList = new ArrayList<>();
IControllerRestClient restClient = getControllerRestClient(request);
List<String> depIds = new ArrayList<>();
if (deployment_id == null) {