Skip to content

Commit f3d67d4

Browse files
committed
PDFBOX-5660: optimize, as suggested by Valery Bokov, closes #372
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930520 13f79535-47bb-0310-9956-ffa450edef68
1 parent 20c901c commit f3d67d4

File tree

1 file changed

+4
-3
lines changed
  • pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color

1 file changed

+4
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceN.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ private void initColorConversionCache(PDResources resources) throws IOException
122122

123123
// process components
124124
colorantToComponent = new int[numColorants];
125-
if (attributes.getProcess() != null)
125+
PDDeviceNProcess process = attributes.getProcess();
126+
if (process != null)
126127
{
127-
List<String> components = attributes.getProcess().getComponents();
128+
List<String> components = process.getComponents();
128129

129130
// map each colorant name to the corresponding process component name (if any)
130131
for (int c = 0; c < numColorants; c++)
@@ -133,7 +134,7 @@ private void initColorConversionCache(PDResources resources) throws IOException
133134
}
134135

135136
// process color space
136-
processColorSpace = attributes.getProcess().getColorSpace();
137+
processColorSpace = process.getColorSpace();
137138
}
138139
else
139140
{

0 commit comments

Comments
 (0)