Revision 90d49e1d
Added by Andreas Müller almost 2 years ago
cdmlib-cache/src/main/java/eu/etaxonomy/cdm/cache/ProxyUtils.java | ||
---|---|---|
142 | 142 |
* otherwise <code>o</code> is returned. |
143 | 143 |
*/ |
144 | 144 |
public static <T extends Object> T deproxyIfInitialized(T o) { |
145 |
if(o != null && o instanceof HibernateProxy) {
|
|
145 |
if(o instanceof HibernateProxy) { |
|
146 | 146 |
LazyInitializer hli = ((HibernateProxy)o).getHibernateLazyInitializer(); |
147 | 147 |
if(!hli.isUninitialized()) { |
148 | 148 |
@SuppressWarnings("unchecked") |
... | ... | |
151 | 151 |
} |
152 | 152 |
} |
153 | 153 |
|
154 |
if(o != null && o instanceof PersistentCollection) {
|
|
154 |
if(o instanceof PersistentCollection) { |
|
155 | 155 |
PersistentCollection pc = ((PersistentCollection)o); |
156 | 156 |
if(pc.wasInitialized()) { |
157 | 157 |
@SuppressWarnings("unchecked") |
pom.xml | ||
---|---|---|
1371 | 1371 |
<artifactId>byte-buddy</artifactId> |
1372 | 1372 |
<version>1.12.10</version> |
1373 | 1373 |
</dependency> |
1374 |
<!-- dependency of hibernate-core and hibernate-search -->
|
|
1374 |
<!-- dependency of hibernate-core --> |
|
1375 | 1375 |
<dependency> |
1376 | 1376 |
<groupId>org.jboss.spec.javax.transaction</groupId> |
1377 | 1377 |
<artifactId>jboss-transaction-api_1.2_spec</artifactId> |
Also available in: Unified diff
cleanup