aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorByung-Woo Jun <byung-woo.jun@ericsson.com>2018-09-04 11:41:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 11:41:38 +0000
commit2f83719d60238ea7aeeae7e8e6cb4aa46b39a80c (patch)
treea86533cb0d8361f38a5f8b27a9a9b32396a050b8 /adapters
parentdb6e6e6fa12b144b2d500ac2c5cc5e8164c20c5f (diff)
parent28b9689cc93f6806a59b61246c63ccf90c3a4f1c (diff)
Merge "fixed sonar issue in ArchiveInfraRequestsScheduler"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
index 9a7382f200..28c56b32cd 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -76,14 +78,14 @@ public class ArchiveInfraRequestsScheduler {
requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest);
logger.debug(requestsByEndTime.size() + " requests to be archived based on End Time" );
archiveInfraRequests(requestsByEndTime);
- } while(requestsByEndTime.size() > 0);
+ } while(!requestsByEndTime.isEmpty());
List<InfraActiveRequests> requestsByStartTime = new ArrayList<>();
do {
requestsByStartTime = infraActiveRepo.findByStartTimeLessThanAndEndTime(archivingDate, null, pageRequest);
logger.debug(requestsByEndTime.size() + " requests to be archived based on Start Time" );
archiveInfraRequests(requestsByStartTime);
- } while(requestsByStartTime.size() > 0);
+ } while(!requestsByStartTime.isEmpty());
logger.debug("End of archiveInfraRequestsScheduler");
}