< prev index next >
src/java.desktop/share/classes/java/awt/print/PrinterJob.java
Print this page
@@ -77,11 +77,13 @@
return java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<PrinterJob>() {
public PrinterJob run() {
String nm = System.getProperty("java.awt.printerjob", null);
try {
- return (PrinterJob)Class.forName(nm).newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName(nm).newInstance();
+ return (PrinterJob)tmp;
} catch (ClassNotFoundException e) {
throw new AWTError("PrinterJob not found: " + nm);
} catch (InstantiationException e) {
throw new AWTError("Could not instantiate PrinterJob: " + nm);
} catch (IllegalAccessException e) {
< prev index next >