summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db-repositories
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-10-15 10:42:07 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-15 10:42:07 +0000
commite772b85547d47e27df284a8303efdefe8aaf26f0 (patch)
tree4de412658e62eb5c3f224ecc04bf3dd88eda92c1 /mso-api-handlers/mso-requests-db-repositories
parent5f898d39ba86fe34f01cfb0342ab68c967ad77e4 (diff)
parent44d74d78855bb6d9f7d9f87ade4dd9a8f629bf90 (diff)
Merge "Cleaning up unused variables and redundant initializers to remove static analyzer warnings"
Diffstat (limited to 'mso-api-handlers/mso-requests-db-repositories')
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java16
1 files changed, 2 insertions, 14 deletions
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
index 9cf71538b1..ad1e46a1c6 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
@@ -114,7 +114,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
private List<InfraActiveRequests> executeInfraQuery(final CriteriaQuery<InfraActiveRequests> crit,
final List<Predicate> predicates, final Order order) {
- final long startTime = System.currentTimeMillis();
logger.debug("Execute query on infra active request table");
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
@@ -131,15 +130,12 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests getRequestFromInfraActive(final String requestId) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get request {} from InfraActiveRequests DB", requestId);
- InfraActiveRequests ar = null;
final Query query = entityManager
.createQuery("from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId");
query.setParameter(REQUEST_ID, requestId);
- ar = this.getSingleResult(query);
- return ar;
+ return this.getSingleResult(query);
}
/*
@@ -239,7 +235,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(
final Map<String, List<String>> orchestrationMap) {
-
final List<Predicate> predicates = new LinkedList<>();
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class);
@@ -416,17 +411,13 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests getRequestFromInfraActive(final String requestId, final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get infra request from DB with id {}", requestId);
- InfraActiveRequests ar = null;
-
final Query query = entityManager.createQuery(
"from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType");
query.setParameter(REQUEST_ID, requestId);
query.setParameter(REQUEST_TYPE, requestType);
- ar = this.getSingleResult(query);
- return ar;
+ return this.getSingleResult(query);
}
@@ -440,7 +431,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests checkDuplicateByVnfName(final String vnfName, final String action,
final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get infra request from DB for VNF {} and action {} and requestType {}", vnfName, action,
requestType);
@@ -470,7 +460,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests checkDuplicateByVnfId(final String vnfId, final String action,
final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get list of infra requests from DB for VNF {} and action {}", vnfId, action);
InfraActiveRequests ar = null;
@@ -496,7 +485,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests checkVnfIdStatus(final String operationalEnvironmentId) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get Infra request from DB for OperationalEnvironmentId {}", operationalEnvironmentId);
InfraActiveRequests ar = null;