Skip to content

Commit

Permalink
Avoid using deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkurka committed Mar 16, 2021
1 parent f2dc48e commit d00b72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h2o-core/src/main/java/water/Weaver.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static Class<?> javassistLoadClass(int id, Class<?> iced_clazz) throws C
CtClass icer_cc = _pool.getOrNull(icer_name); // Full Name Lookup of Icer
if( icer_cc != null ) {
synchronized( iced_clazz ) {
if( !icer_cc.isFrozen() ) icer_cc.toClass(iced_clazz.getClassLoader()); // Load class (but does not link & init)
if( !icer_cc.isFrozen() ) icer_cc.toClass(iced_clazz.getClassLoader(), null); // Load class (but does not link & init)
return Class.forName(icer_name,true,iced_clazz.getClassLoader()); // Found a pre-cooked Icer implementation
}
}
Expand Down Expand Up @@ -111,7 +111,7 @@ private static Class<?> javassistLoadClass(int id, Class<?> iced_clazz) throws C
icer_cc = _pool.getOrNull(icer_name); // Retry under lock
if( icer_cc != null ) return Class.forName(icer_name); // Found a pre-cooked Icer implementation
icer_cc = genIcerClass(id,iced_cc,iced_clazz,icer_name,super_id,super_icer_cc);
icer_cc.toClass(iced_clazz.getClassLoader()); // Load class (but does not link & init)
icer_cc.toClass(iced_clazz.getClassLoader(), null); // Load class (but does not link & init)
return Class.forName(icer_name,true, iced_clazz.getClassLoader()); // Initialize class now, before subclasses
}
}
Expand Down

0 comments on commit d00b72d

Please sign in to comment.