< prev index next >

src/java.logging/share/classes/java/util/logging/MemoryHandler.java

Print this page

        

*** 115,125 **** + " does not specify a target"); } Class<?> clz; try { clz = ClassLoader.getSystemClassLoader().loadClass(targetName); ! target = (Handler) clz.newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { throw new RuntimeException("MemoryHandler can't load handler target \"" + targetName + "\"" , e); } init(); } --- 115,127 ---- + " does not specify a target"); } Class<?> clz; try { clz = ClassLoader.getSystemClassLoader().loadClass(targetName); ! @SuppressWarnings("deprecation") ! Object o = clz.newInstance(); ! target = (Handler) o; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { throw new RuntimeException("MemoryHandler can't load handler target \"" + targetName + "\"" , e); } init(); }
< prev index next >