File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1717package org .apache .pdfbox .pdmodel .interactive .action ;
1818
1919import java .io .IOException ;
20+ import org .apache .pdfbox .cos .COSBase ;
2021import org .apache .pdfbox .cos .COSBoolean ;
2122
2223import org .apache .pdfbox .cos .COSDictionary ;
@@ -211,9 +212,10 @@ public void setP( String p )
211212 */
212213 public OpenMode getOpenInNewWindow ()
213214 {
214- if (getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW ) instanceof COSBoolean )
215+ COSBase dictionaryObject = getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW );
216+ if (dictionaryObject instanceof COSBoolean )
215217 {
216- COSBoolean b = (COSBoolean ) getCOSObject (). getDictionaryObject ( COSName . NEW_WINDOW ) ;
218+ COSBoolean b = (COSBoolean ) dictionaryObject ;
217219 return b .getValue () ? OpenMode .NEW_WINDOW : OpenMode .SAME_WINDOW ;
218220 }
219221 return OpenMode .USER_PREFERENCE ;
Original file line number Diff line number Diff line change @@ -118,9 +118,10 @@ public void setD( COSBase d )
118118 */
119119 public OpenMode getOpenInNewWindow ()
120120 {
121- if (getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW ) instanceof COSBoolean )
121+ COSBase dictionaryObject = getCOSObject ().getDictionaryObject (COSName .NEW_WINDOW );
122+ if (dictionaryObject instanceof COSBoolean )
122123 {
123- COSBoolean b = (COSBoolean ) getCOSObject (). getDictionaryObject ( COSName . NEW_WINDOW ) ;
124+ COSBoolean b = (COSBoolean ) dictionaryObject ;
124125 return b .getValue () ? OpenMode .NEW_WINDOW : OpenMode .SAME_WINDOW ;
125126 }
126127 return OpenMode .USER_PREFERENCE ;
You can’t perform that action at this time.
0 commit comments