File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
preflight/src/main/java/org/apache/pdfbox/preflight Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,11 @@ private static ICCProfileWrapper searchFirstICCProfile(PreflightContext context)
123
123
PDDocumentCatalog catalog = document .getDocumentCatalog ();
124
124
COSArray outputIntents = catalog .getCOSObject ().getCOSArray (COSName .OUTPUT_INTENTS );
125
125
126
- for (int i = 0 ; outputIntents != null && i < outputIntents .size (); ++i )
126
+ if (outputIntents == null )
127
+ {
128
+ return null ;
129
+ }
130
+ for (int i = 0 ; i < outputIntents .size (); ++i )
127
131
{
128
132
COSDictionary outputIntentDict = (COSDictionary ) outputIntents .getObject (i );
129
133
COSBase destOutputProfile = outputIntentDict
Original file line number Diff line number Diff line change @@ -192,7 +192,11 @@ private void validateOutputIntent(PreflightContext ctx) throws ValidationExcepti
192
192
{
193
193
COSArray outputIntents = catalog .getCOSObject ().getCOSArray (COSName .OUTPUT_INTENTS );
194
194
Map <COSObjectKey , Boolean > tmpDestOutputProfile = new HashMap <>();
195
- for (int i = 0 ; outputIntents != null && i < outputIntents .size (); ++i )
195
+ if (outputIntents == null )
196
+ {
197
+ return ;
198
+ }
199
+ for (int i = 0 ; i < outputIntents .size (); ++i )
196
200
{
197
201
COSDictionary outputIntentDict = (COSDictionary ) outputIntents .getObject (i );
198
202
You can’t perform that action at this time.
0 commit comments