Skip to content

Commit

Permalink
PDFBOX-5952: remove short constructor, use the long one
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923779 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Feb 13, 2025
1 parent 2af67b8 commit 8629cd9
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class CSDeviceN
*/
public CSDeviceN(COSArray array) throws IOException
{
deviceN = new PDDeviceN(array);
deviceN = new PDDeviceN(array, null);
DeviceNColorant[] colorants = getColorantData();
initUI(colorants);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class CSSeparation implements ChangeListener, ActionListener
*/
public CSSeparation(COSArray array) throws IOException
{
separation = new PDSeparation(array);
separation = new PDSeparation(array, null);
initUI();
initValues();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static void main(String[] args) throws IOException
PDFunctionType2 func = new PDFunctionType2(fdict);
separationArray.add(func);

PDColorSpace spotColorSpace = new PDSeparation(separationArray);
PDColorSpace spotColorSpace = new PDSeparation(separationArray, null);

try (PDPageContentStream cs = new PDPageContentStream(doc, page))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@ public PDDeviceN(COSArray deviceN, PDResources resources) throws IOException
initialColor = new PDColor(initial, this);
}

/**
* Creates a new DeviceN color space from the given COS array.
*
* @param deviceN an array containing the color space information
*
* @throws IOException if the colorspace could not be created
*/
public PDDeviceN(COSArray deviceN) throws IOException
{
this(deviceN, null);
}

// initializes the color conversion cache
private void initColorConversionCache(PDResources resources) throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ public Map<String, PDSeparation> getColorants(PDResources resources) throws IOEx
return new COSDictionaryMap<>(actuals, colorants);
}

/**
* Returns a map of colorants and their associated Separation color space.
* @return map of colorants to color spaces, never null.
* @throws IOException If there is an error reading a color space
*/
public Map<String, PDSeparation> getColorants() throws IOException
{
return getColorants(null);
}

/**
* Returns the DeviceN Process Dictionary, or null if it is missing.
* @return the DeviceN Process Dictionary, or null if it is missing.
Expand Down Expand Up @@ -159,7 +149,7 @@ public String toString()
Map<String, PDSeparation> colorants;
try
{
colorants = getColorants();
colorants = getColorants(null);
sb.append("Colorants{");
for (Map.Entry<String, PDSeparation> col : colorants.entrySet())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ public PDSeparation(COSArray separation, PDResources resources) throws IOExcepti
}
}

/**
* Creates a new Separation color space from a PDF color space array.
* @param separation an array containing all separation information.
* @throws IOException if the color space or the function could not be created.
*/
public PDSeparation(COSArray separation) throws IOException
{
this(separation, null);
}

@Override
public String getName()
{
Expand Down

0 comments on commit 8629cd9

Please sign in to comment.