From e3035927b9c49478e28e5ca7fca7c42c43b7300e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 10 Feb 2021 14:23:02 -0500 Subject: More sonar issues in common Addressed the issues: - use of eq() in verify() - remove @NamedQueries - use computeIfAbsent() Issue-ID: POLICY-2914 Change-Id: I265bc98f0f326e7b4ce86c25e68fc4859bd7fb02 Signed-off-by: Jim Hahn --- .../java/org/onap/policy/common/ia/jpa/IntegrityAuditEntity.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'integrity-audit') diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/jpa/IntegrityAuditEntity.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/jpa/IntegrityAuditEntity.java index 2b2b806a..121b28b4 100644 --- a/integrity-audit/src/main/java/org/onap/policy/common/ia/jpa/IntegrityAuditEntity.java +++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/jpa/IntegrityAuditEntity.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Integrity Audit * ================================================================================ - * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 2020-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; @@ -43,9 +42,8 @@ import org.onap.policy.common.ia.AuditorTime; @Entity @Table(name = "IntegrityAuditEntity") -@NamedQueries({@NamedQuery(name = " IntegrityAuditEntity.findAll", query = "SELECT e FROM IntegrityAuditEntity e "), - @NamedQuery(name = "IntegrityAuditEntity.deleteAll", - query = "DELETE FROM IntegrityAuditEntity WHERE 1=1")}) +@NamedQuery(name = " IntegrityAuditEntity.findAll", query = "SELECT e FROM IntegrityAuditEntity e ") +@NamedQuery(name = "IntegrityAuditEntity.deleteAll", query = "DELETE FROM IntegrityAuditEntity WHERE 1=1") public class IntegrityAuditEntity implements Serializable { private static final long serialVersionUID = 1L; -- cgit 1.2.3-korg