JRE-571 Print to PDF not working when no printers installed on macOS
port of JDK-8211055 from OpenJDK 12
fix compilation for earlier versions of macOS (10.10)
(cherry picked from commit 109165b76c610b79a54020108ac8da7440e3245a)
diff --git a/src/macosx/native/sun/awt/CPrinterJob.m b/src/macosx/native/sun/awt/CPrinterJob.m
index ba45f8d..542f16f 100644
--- a/src/macosx/native/sun/awt/CPrinterJob.m
+++ b/src/macosx/native/sun/awt/CPrinterJob.m
@@ -310,7 +310,7 @@
static JNF_MEMBER_CACHE(jm_setPageRange, sjc_CPrinterJob, "setPageRange", "(II)V");
static JNF_MEMBER_CACHE(jm_setPrintToFile, sjc_CPrinterJob, "setPrintToFile", "(Z)V");
- NSPrintJobDispositionValue jobDisposition = [src jobDisposition];
+ NSString *jobDisposition = [src jobDisposition];
if (jobDisposition == NSPrintSaveJob) {
JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, true);
} else {