File tree Expand file tree Collapse file tree
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,13 +124,14 @@ public void setFile(PDFileSpecification fs)
124124 * This will specify whether to open the destination document in a new window, in the same
125125 * window, or behave in accordance with the current user preference.
126126 *
127- * @return A flag specifying how to open the destination document.
127+ * @return A flag specifying how to open the destination document, never null .
128128 */
129129 public OpenMode getOpenInNewWindow ()
130130 {
131- if (getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW ) instanceof COSBoolean )
131+ COSBase dictionaryObject = getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW );
132+ if (dictionaryObject instanceof COSBoolean )
132133 {
133- COSBoolean b = (COSBoolean ) getCOSObject (). getDictionaryObject ( COSName . NEW_WINDOW ) ;
134+ COSBoolean b = (COSBoolean ) dictionaryObject ;
134135 return b .getValue () ? OpenMode .NEW_WINDOW : OpenMode .SAME_WINDOW ;
135136 }
136137 return OpenMode .USER_PREFERENCE ;
You can’t perform that action at this time.
0 commit comments