diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-10-09 12:45:27 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-10-15 10:48:39 +0300 |
commit | 44d74d78855bb6d9f7d9f87ade4dd9a8f629bf90 (patch) | |
tree | b41653f7fd7f519b1b354e1d3541e5ae31691234 /mso-api-handlers/mso-requests-db-repositories | |
parent | db90144322187faee71622702bff58c43a2af300 (diff) |
Cleaning up unused variables and redundant initializers to
remove static analyzer warnings
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: I5dee12e1935c152865963359d0fc869673393aad
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.java | 16 |
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; |