Skip to content

Commit

Permalink
HHH-10831 - Fix checkstyle error
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Mar 23, 2017
1 parent acae69f commit 1f9adce
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions hibernate-core/src/main/java/org/hibernate/Hibernate.java
Expand Up @@ -202,13 +202,14 @@ public static boolean isPropertyInitialized(Object proxy, String propertyName) {
* @param proxy the {@link HibernateProxy} to be unproxied
* @return the proxy's underlying implementation object, or the supplied object otherwise
*/
public static Object unproxy(Object proxy) {
if (proxy instanceof HibernateProxy) {
HibernateProxy hibernateProxy = (HibernateProxy) proxy;
LazyInitializer initializer = hibernateProxy.getHibernateLazyInitializer();
return initializer.getImplementation();
} else {
return proxy;
}
}
public static Object unproxy(Object proxy) {
if ( proxy instanceof HibernateProxy ) {
HibernateProxy hibernateProxy = (HibernateProxy) proxy;
LazyInitializer initializer = hibernateProxy.getHibernateLazyInitializer();
return initializer.getImplementation();
}
else {
return proxy;
}
}
}

0 comments on commit 1f9adce

Please sign in to comment.