Skip to content

Commit b5d78af

Browse files
committed
8254863: Delete code leftover from old fixes
Reviewed-by: azeemj, kizune, prr
1 parent 8066b33 commit b5d78af

File tree

5 files changed

+12
-62
lines changed

5 files changed

+12
-62
lines changed

src/java.desktop/share/classes/java/awt/color/ICC_Profile.java

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,6 @@ else if ((getColorSpaceType (p) == ColorSpace.TYPE_RGB) &&
831831
*/
832832
public static ICC_Profile getInstance (int cspace) {
833833
ICC_Profile thisProfile = null;
834-
String fileName;
835-
836834
switch (cspace) {
837835
case ColorSpace.CS_sRGB:
838836
synchronized(ICC_Profile.class) {
@@ -870,17 +868,11 @@ public static ICC_Profile getInstance (int cspace) {
870868
case ColorSpace.CS_PYCC:
871869
synchronized(ICC_Profile.class) {
872870
if (PYCCprofile == null) {
873-
if (standardProfileExists("PYCC.pf"))
874-
{
875-
ProfileDeferralInfo pInfo =
876-
new ProfileDeferralInfo("PYCC.pf",
877-
ColorSpace.TYPE_3CLR, 3,
878-
CLASS_DISPLAY);
879-
PYCCprofile = getDeferredInstance(pInfo);
880-
} else {
881-
throw new IllegalArgumentException(
882-
"Can't load standard profile: PYCC.pf");
883-
}
871+
ProfileDeferralInfo pInfo =
872+
new ProfileDeferralInfo("PYCC.pf",
873+
ColorSpace.TYPE_3CLR, 3,
874+
CLASS_DISPLAY);
875+
PYCCprofile = getDeferredInstance(pInfo);
884876
}
885877
thisProfile = PYCCprofile;
886878
}
@@ -1851,17 +1843,6 @@ private static boolean isChildOf(File f, String dirName) {
18511843
}
18521844
}
18531845

1854-
/**
1855-
* Checks whether built-in profile specified by fileName exists.
1856-
*/
1857-
private static boolean standardProfileExists(final String fileName) {
1858-
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
1859-
public Boolean run() {
1860-
return PCMM.class.getResource("profiles/"+fileName) != null;
1861-
}
1862-
});
1863-
}
1864-
18651846
/*
18661847
* Serialization support.
18671848
*

src/java.desktop/share/classes/sun/java2d/cmm/CMSManager.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,11 @@
2525

2626
package sun.java2d.cmm;
2727

28+
import java.awt.color.CMMException;
2829
import java.awt.color.ColorSpace;
2930
import java.awt.color.ICC_Profile;
30-
import java.awt.color.CMMException;
31-
import java.awt.image.BufferedImage;
32-
import java.awt.image.Raster;
33-
import java.awt.image.WritableRaster;
3431
import java.security.AccessController;
35-
import java.security.PrivilegedAction;
32+
3633
import sun.security.action.GetPropertyAction;
3734

3835
public class CMSManager {
@@ -103,11 +100,6 @@ public Profile loadProfile(byte[] data) {
103100
return p;
104101
}
105102

106-
public void freeProfile(Profile p) {
107-
System.err.printf(cName + ".freeProfile(ID=%s)\n", p.toString());
108-
tcmm.freeProfile(p);
109-
}
110-
111103
public int getProfileSize(Profile p) {
112104
System.err.print(cName + ".getProfileSize(ID=" + p + ")");
113105
int size = tcmm.getProfileSize(p);

src/java.desktop/share/classes/sun/java2d/cmm/PCMM.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@ public interface PCMM {
3333

3434
/* methods invoked from ICC_Profile */
3535
public Profile loadProfile(byte[] data);
36-
public void freeProfile(Profile p);
3736
public int getProfileSize(Profile p);
3837
public void getProfileData(Profile p, byte[] data);
3938
public void getTagData(Profile p, int tagSignature, byte[] data);

src/java.desktop/share/classes/sun/java2d/cmm/ProfileDeferralMgr.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -59,23 +59,6 @@ public static void registerDeferral(ProfileActivator pa) {
5959
}
6060

6161

62-
/**
63-
* Removes a ProfileActivator object from the vector of ProfileActivator
64-
* objects whose activate method will be called if the CMM needs to be
65-
* activated.
66-
*/
67-
public static void unregisterDeferral(ProfileActivator pa) {
68-
69-
if (!deferring) {
70-
return;
71-
}
72-
if (aVector == null) {
73-
return;
74-
}
75-
aVector.removeElement(pa);
76-
return;
77-
}
78-
7962
/**
8063
* Removes a ProfileActivator object from the vector of ProfileActivator
8164
* objects whose activate method will be called if the CMM needs to be

src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
2727

2828
import java.awt.color.CMMException;
2929
import java.awt.color.ICC_Profile;
30+
3031
import sun.java2d.cmm.ColorTransform;
3132
import sun.java2d.cmm.PCMM;
3233
import sun.java2d.cmm.Profile;
@@ -56,12 +57,6 @@ private LCMSProfile getLcmsProfile(Profile p) {
5657
throw new CMMException("Invalid profile: " + p);
5758
}
5859

59-
60-
@Override
61-
public void freeProfile(Profile p) {
62-
// we use disposer, so this method does nothing
63-
}
64-
6560
@Override
6661
public int getProfileSize(final Profile p) {
6762
synchronized (p) {

0 commit comments

Comments
 (0)