DATAJPA-1379 - Polishing.

Improve variable names.

Original pull request: #287.
This commit is contained in:
Mark Paluch
2018-08-02 11:03:53 +02:00
parent c46d6e34bd
commit 8047dda884

View File

@@ -41,15 +41,18 @@ abstract class JpaClassUtils {
*
* @param em must not be {@literal null}.
* @param type the fully qualified expected {@link EntityManager} type, must not be {@literal null} or empty.
* @return wether the given {@code EntityManager} is of the given type.
* @return whether the given {@code EntityManager} is of the given type.
*/
public static boolean isEntityManagerOfType(EntityManager em, String type) {
EntityManager entityManagerToUse = em;
Object delegate = em.getDelegate();
if (delegate instanceof EntityManager) {
em = (EntityManager) delegate;
entityManagerToUse = (EntityManager) delegate;
}
return isOfType(em, type, delegate.getClass().getClassLoader());
return isOfType(entityManagerToUse, type, entityManagerToUse.getClass().getClassLoader());
}
public static boolean isMetamodelOfType(Metamodel metamodel, String type) {