diff options
author | mmis <michael.morris@ericsson.com> | 2018-03-16 09:44:46 +0000 |
---|---|---|
committer | mmis <michael.morris@ericsson.com> | 2018-03-16 10:13:43 +0000 |
commit | bcd810498395759aa3519b8a4e021c049918b2dc (patch) | |
tree | 6e7e4e72f8374423dffda0ac0edb76e6bfd7d531 /utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java | |
parent | a467c9229c8294d74b33ddb5a413d0515f8b714b (diff) |
Removed checkstyle warnings
Removed checkstyle warnings in policy/common/utils
Issue-ID: POLICY-695
Change-Id: I831b74c889d44784d6328619d88eb92fb524ce74
Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java')
-rw-r--r-- | utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java b/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java index 2ed54196..3532002e 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java +++ b/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java @@ -23,37 +23,37 @@ package org.onap.policy.common.utils.jpa; import javax.persistence.EntityManager; /** - * Wrapper for an <i>EntityManager</i>, providing auto-close functionality. This - * is useful in try-with-resources statements. + * Wrapper for an <i>EntityManager</i>, providing auto-close functionality. This is useful in + * try-with-resources statements. */ public class EntityMgrCloser implements AutoCloseable { - /** - * The wrapped manager. - */ - private final EntityManager em; - - /** - * - * @param em - * manager to be auto-closed - */ - public EntityMgrCloser(EntityManager em) { - this.em = em; - } - - /** - * Gets the EntityManager wrapped within this object. - * - * @return the associated EntityManager - */ - public EntityManager getManager() { - return em; - } - - @Override - public void close() { - em.close(); - } + /** + * The wrapped manager. + */ + private final EntityManager em; + + /** + * Construct an instance with the EntityManager. + * + * @param em manager to be auto-closed + */ + public EntityMgrCloser(EntityManager em) { + this.em = em; + } + + /** + * Gets the EntityManager wrapped within this object. + * + * @return the associated EntityManager + */ + public EntityManager getManager() { + return em; + } + + @Override + public void close() { + em.close(); + } } |