Use instanceof instead of Class#isInstance where feasible

Closes gh-25446
This commit is contained in:
XenoAmess
2020-07-21 23:00:43 +08:00
committed by Sam Brannen
parent 9fe1feea9a
commit c547809e89
10 changed files with 10 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ public class SessionHolder extends EntityManagerHolder {
public SessionHolder(Session session) {
// Check below is always true against Hibernate >= 5.2 but not against 5.0/5.1 at runtime
super(EntityManager.class.isInstance(session) ? session : null);
super(session instanceof EntityManager ? session : null);
this.session = session;
}