Skip to content

Commit c31bfe6

Browse files
committed
Drop outdated DeferredQueryInvocationHandler.finalize() implementation
Issue: SPR-15363 (cherry picked from commit b2a6a57)
1 parent 22ddb35 commit c31bfe6

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -384,16 +384,6 @@ else if (targetClass.isInstance(proxy)) {
384384
}
385385
}
386386
}
387-
388-
@Override
389-
protected void finalize() throws Throwable {
390-
// Trigger explicit EntityManager.close() call on garbage collection,
391-
// in particular for open/close statistics to be in sync. This is
392-
// only relevant if the Query object has not been executed, e.g.
393-
// when just used for the early validation of query definitions.
394-
EntityManagerFactoryUtils.closeEntityManager(this.em);
395-
super.finalize();
396-
}
397387
}
398388

399389
}

0 commit comments

Comments
 (0)