< prev index next >

src/java.desktop/share/classes/java/awt/Toolkit.java

Print this page

        

*** 461,472 **** * * @param atName the name of the class to be loaded */ private static void fallbackToLoadClassForAT(String atName) { try { ! Class<?> c = Class.forName(atName, false, ClassLoader.getSystemClassLoader()); ! c.newInstance(); } catch (ClassNotFoundException e) { newAWTError(e, "Assistive Technology not found: " + atName); } catch (InstantiationException e) { newAWTError(e, "Could not instantiate Assistive Technology: " + atName); } catch (IllegalAccessException e) { --- 461,474 ---- * * @param atName the name of the class to be loaded */ private static void fallbackToLoadClassForAT(String atName) { try { ! @SuppressWarnings("deprecation") ! Object o = Class.forName(atName, ! false, ! ClassLoader.getSystemClassLoader()).newInstance(); } catch (ClassNotFoundException e) { newAWTError(e, "Assistive Technology not found: " + atName); } catch (InstantiationException e) { newAWTError(e, "Could not instantiate Assistive Technology: " + atName); } catch (IllegalAccessException e) {
*** 577,587 **** } } } try { if (cls != null) { ! toolkit = (Toolkit)cls.newInstance(); if (GraphicsEnvironment.isHeadless()) { toolkit = new HeadlessToolkit(toolkit); } } } catch (final InstantiationException ignored) { --- 579,591 ---- } } } try { if (cls != null) { ! @SuppressWarnings("deprecation") ! Object tmp = cls.newInstance(); ! toolkit = (Toolkit)tmp; if (GraphicsEnvironment.isHeadless()) { toolkit = new HeadlessToolkit(toolkit); } } } catch (final InstantiationException ignored) {
< prev index next >