mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 09:40:10 +00:00
6521783: Unnecessary final modifier for a method in a final class
Reviewed-by: pchelko, prr
This commit is contained in:
parent
9547753bd6
commit
7dfb61d5ef
@ -114,7 +114,7 @@ public final class JRSUIControl {
|
||||
changes.putAll(other.changes);
|
||||
}
|
||||
|
||||
protected synchronized final void finalize() throws Throwable {
|
||||
protected synchronized void finalize() throws Throwable {
|
||||
if (cfDictionaryPtr == 0) return;
|
||||
disposeCFDictionary(cfDictionaryPtr);
|
||||
cfDictionaryPtr = 0;
|
||||
|
||||
@ -54,11 +54,11 @@ public final class NSPrintInfo implements PrintJobAttribute, PrintRequestAttribu
|
||||
return "" + fNSPrintInfo;
|
||||
}
|
||||
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
public Class<? extends Attribute> getCategory() {
|
||||
return NSPrintInfo.class;
|
||||
}
|
||||
|
||||
public final String getName() {
|
||||
public String getName() {
|
||||
return "nsPrintInfo";
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ public final class FFT {
|
||||
calc(fftFrameSize, data, sign, w);
|
||||
}
|
||||
|
||||
private final static double[] computeTwiddleFactors(int fftFrameSize,
|
||||
private static double[] computeTwiddleFactors(int fftFrameSize,
|
||||
int sign) {
|
||||
|
||||
int imax = (int) (Math.log(fftFrameSize) / Math.log(2.));
|
||||
@ -122,7 +122,7 @@ public final class FFT {
|
||||
return warray;
|
||||
}
|
||||
|
||||
private final static void calc(int fftFrameSize, double[] data, int sign,
|
||||
private static void calc(int fftFrameSize, double[] data, int sign,
|
||||
double[] w) {
|
||||
|
||||
final int fftFrameSize2 = fftFrameSize << 1;
|
||||
@ -139,7 +139,7 @@ public final class FFT {
|
||||
|
||||
}
|
||||
|
||||
private final static void calcF2E(int fftFrameSize, double[] data, int i,
|
||||
private static void calcF2E(int fftFrameSize, double[] data, int i,
|
||||
int nstep, double[] w) {
|
||||
int jmax = nstep;
|
||||
for (int n = 0; n < jmax; n += 2) {
|
||||
@ -163,7 +163,7 @@ public final class FFT {
|
||||
|
||||
// Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
|
||||
// complex operators
|
||||
private final static void calcF4F(int fftFrameSize, double[] data, int i,
|
||||
private static void calcF4F(int fftFrameSize, double[] data, int i,
|
||||
int nstep, double[] w) {
|
||||
final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
|
||||
// Factor-4 Decomposition
|
||||
@ -331,7 +331,7 @@ public final class FFT {
|
||||
|
||||
// Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
|
||||
// complex operators
|
||||
private final static void calcF4I(int fftFrameSize, double[] data, int i,
|
||||
private static void calcF4I(int fftFrameSize, double[] data, int i,
|
||||
int nstep, double[] w) {
|
||||
final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
|
||||
// Factor-4 Decomposition
|
||||
@ -499,7 +499,7 @@ public final class FFT {
|
||||
|
||||
// Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
|
||||
// complex operators
|
||||
private final static void calcF4FE(int fftFrameSize, double[] data, int i,
|
||||
private static void calcF4FE(int fftFrameSize, double[] data, int i,
|
||||
int nstep, double[] w) {
|
||||
final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
|
||||
// Factor-4 Decomposition
|
||||
@ -593,7 +593,7 @@ public final class FFT {
|
||||
|
||||
// Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
|
||||
// complex operators
|
||||
private final static void calcF4IE(int fftFrameSize, double[] data, int i,
|
||||
private static void calcF4IE(int fftFrameSize, double[] data, int i,
|
||||
int nstep, double[] w) {
|
||||
final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
|
||||
// Factor-4 Decomposition
|
||||
@ -685,7 +685,7 @@ public final class FFT {
|
||||
|
||||
}
|
||||
|
||||
private final void bitreversal(double[] data) {
|
||||
private void bitreversal(double[] data) {
|
||||
if (fftFrameSize < 4)
|
||||
return;
|
||||
|
||||
|
||||
@ -147,11 +147,11 @@ public final class RIFFReader extends InputStream {
|
||||
}
|
||||
}
|
||||
|
||||
public final void readFully(byte b[]) throws IOException {
|
||||
public void readFully(byte b[]) throws IOException {
|
||||
readFully(b, 0, b.length);
|
||||
}
|
||||
|
||||
public final void readFully(byte b[], int off, int len) throws IOException {
|
||||
public void readFully(byte b[], int off, int len) throws IOException {
|
||||
if (len < 0)
|
||||
throw new IndexOutOfBoundsException();
|
||||
while (len > 0) {
|
||||
@ -165,7 +165,7 @@ public final class RIFFReader extends InputStream {
|
||||
}
|
||||
}
|
||||
|
||||
public final long skipBytes(long n) throws IOException {
|
||||
public long skipBytes(long n) throws IOException {
|
||||
if (n < 0)
|
||||
return 0;
|
||||
long skipped = 0;
|
||||
|
||||
@ -1811,7 +1811,7 @@ public final class TextLayout implements Cloneable {
|
||||
* should be logical or visual counterparts. They are not
|
||||
* checked for validity.
|
||||
*/
|
||||
private final TextHitInfo getStrongHit(TextHitInfo hit1, TextHitInfo hit2) {
|
||||
private TextHitInfo getStrongHit(TextHitInfo hit1, TextHitInfo hit2) {
|
||||
|
||||
// right now we're using the following rule for strong hits:
|
||||
// A hit on a character with a lower level
|
||||
|
||||
@ -544,7 +544,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public final PropertyChangeListener extract(PropertyChangeListener listener) {
|
||||
public PropertyChangeListener extract(PropertyChangeListener listener) {
|
||||
while (listener instanceof PropertyChangeListenerProxy) {
|
||||
listener = ((PropertyChangeListenerProxy) listener).getListener();
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public final VetoableChangeListener extract(VetoableChangeListener listener) {
|
||||
public VetoableChangeListener extract(VetoableChangeListener listener) {
|
||||
while (listener instanceof VetoableChangeListenerProxy) {
|
||||
listener = ((VetoableChangeListenerProxy) listener).getListener();
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ public final class SwingPropertyChangeSupport extends PropertyChangeSupport {
|
||||
* @see #SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT)
|
||||
* @since 1.6
|
||||
*/
|
||||
public final boolean isNotifyOnEDT() {
|
||||
public boolean isNotifyOnEDT() {
|
||||
return notifyOnEDT;
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S
|
||||
* is held by the mark, so it is adjusted according
|
||||
* to it's relationship to the gap.
|
||||
*/
|
||||
public final int getOffset() {
|
||||
public int getOffset() {
|
||||
int g0 = getGapStart();
|
||||
int g1 = getGapEnd();
|
||||
int offs = (index < g0) ? index : index - (g1 - g0);
|
||||
@ -302,7 +302,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S
|
||||
this.mark = mark;
|
||||
}
|
||||
|
||||
public final int getOffset() {
|
||||
public int getOffset() {
|
||||
return mark.getOffset();
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +354,7 @@ public final class AWTAutoShutdown implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
final void registerPeer(final Object target, final Object peer) {
|
||||
void registerPeer(final Object target, final Object peer) {
|
||||
synchronized (activationLock) {
|
||||
synchronized (mainLock) {
|
||||
peerMap.put(target, peer);
|
||||
@ -363,7 +363,7 @@ public final class AWTAutoShutdown implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
final void unregisterPeer(final Object target, final Object peer) {
|
||||
void unregisterPeer(final Object target, final Object peer) {
|
||||
synchronized (activationLock) {
|
||||
synchronized (mainLock) {
|
||||
if (peerMap.get(target) == peer) {
|
||||
@ -374,7 +374,7 @@ public final class AWTAutoShutdown implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
final Object getPeer(final Object target) {
|
||||
Object getPeer(final Object target) {
|
||||
synchronized (activationLock) {
|
||||
synchronized (mainLock) {
|
||||
return peerMap.get(target);
|
||||
@ -382,7 +382,7 @@ public final class AWTAutoShutdown implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
final void dumpPeers(final PlatformLogger aLog) {
|
||||
void dumpPeers(final PlatformLogger aLog) {
|
||||
if (aLog.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
synchronized (activationLock) {
|
||||
synchronized (mainLock) {
|
||||
|
||||
@ -259,7 +259,7 @@ public final class AppContext {
|
||||
private static final ThreadLocal<AppContext> threadAppContext =
|
||||
new ThreadLocal<AppContext>();
|
||||
|
||||
private final static void initMainAppContext() {
|
||||
private static void initMainAppContext() {
|
||||
// On the main Thread, we get the ThreadGroup, make a corresponding
|
||||
// AppContext, and instantiate the Java EventQueue. This way, legacy
|
||||
// code is unaffected by the move to multiple AppContext ability.
|
||||
@ -291,7 +291,7 @@ public final class AppContext {
|
||||
* @see java.lang.ThreadGroup
|
||||
* @since 1.2
|
||||
*/
|
||||
public final static AppContext getAppContext() {
|
||||
public static AppContext getAppContext() {
|
||||
// we are standalone app, return the main app context
|
||||
if (numAppContexts.get() == 1 && mainAppContext != null) {
|
||||
return mainAppContext;
|
||||
@ -375,11 +375,11 @@ public final class AppContext {
|
||||
* @return true if the specified AppContext is the main AppContext.
|
||||
* @since 1.8
|
||||
*/
|
||||
public final static boolean isMainContext(AppContext ctx) {
|
||||
public static boolean isMainContext(AppContext ctx) {
|
||||
return (ctx != null && ctx == mainAppContext);
|
||||
}
|
||||
|
||||
private final static AppContext getExecutionAppContext() {
|
||||
private static AppContext getExecutionAppContext() {
|
||||
SecurityManager securityManager = System.getSecurityManager();
|
||||
if ((securityManager != null) &&
|
||||
(securityManager instanceof AWTSecurityManager))
|
||||
|
||||
@ -312,7 +312,7 @@ public abstract class Crossings {
|
||||
super(xlo, ylo, xhi, yhi);
|
||||
}
|
||||
|
||||
public final boolean covers(double ystart, double yend) {
|
||||
public boolean covers(double ystart, double yend) {
|
||||
return (limit == 2 && yranges[0] <= ystart && yranges[1] >= yend);
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ public abstract class Crossings {
|
||||
crosscounts = new int[yranges.length / 2];
|
||||
}
|
||||
|
||||
public final boolean covers(double ystart, double yend) {
|
||||
public boolean covers(double ystart, double yend) {
|
||||
int i = 0;
|
||||
while (i < limit) {
|
||||
double ylo = yranges[i++];
|
||||
|
||||
@ -67,11 +67,11 @@ public final class CompositeGlyphMapper extends CharToGlyphMapper {
|
||||
compFont.maxIndices != null;
|
||||
}
|
||||
|
||||
public final int compositeGlyphCode(int slot, int glyphCode) {
|
||||
public int compositeGlyphCode(int slot, int glyphCode) {
|
||||
return (slot << 24 | (glyphCode & GLYPHMASK));
|
||||
}
|
||||
|
||||
private final void initMapper() {
|
||||
private void initMapper() {
|
||||
if (missingGlyph == CharToGlyphMapper.UNINITIALIZED_GLYPH) {
|
||||
if (glyphMaps == null) {
|
||||
glyphMaps = new int[NBLOCKS][];
|
||||
@ -108,7 +108,7 @@ public final class CompositeGlyphMapper extends CharToGlyphMapper {
|
||||
glyphMaps[index0][unicode & 0xff] = glyphCode;
|
||||
}
|
||||
|
||||
private final CharToGlyphMapper getSlotMapper(int slot) {
|
||||
private CharToGlyphMapper getSlotMapper(int slot) {
|
||||
CharToGlyphMapper mapper = slotMappers[slot];
|
||||
if (mapper == null) {
|
||||
mapper = font.getSlotFont(slot).getMapper();
|
||||
@ -117,7 +117,7 @@ public final class CompositeGlyphMapper extends CharToGlyphMapper {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
private final int convertToGlyph(int unicode) {
|
||||
private int convertToGlyph(int unicode) {
|
||||
|
||||
for (int slot = 0; slot < font.numSlots; slot++) {
|
||||
if (!hasExcludes || !font.isExcludedChar(slot, unicode)) {
|
||||
|
||||
@ -66,11 +66,11 @@ public final class CoreMetrics {
|
||||
return ((FontLineMetrics)lm).cm;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
public int hashCode() {
|
||||
return Float.floatToIntBits(ascent + ssOffset);
|
||||
}
|
||||
|
||||
public final boolean equals(Object rhs) {
|
||||
public boolean equals(Object rhs) {
|
||||
try {
|
||||
return equals((CoreMetrics)rhs);
|
||||
}
|
||||
@ -79,7 +79,7 @@ public final class CoreMetrics {
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean equals(CoreMetrics rhs) {
|
||||
public boolean equals(CoreMetrics rhs) {
|
||||
if (rhs != null) {
|
||||
if (this == rhs) {
|
||||
return true;
|
||||
@ -105,7 +105,7 @@ public final class CoreMetrics {
|
||||
// fullOffsets is an array of 5 baseline offsets,
|
||||
// roman, center, hanging, bottom, and top in that order
|
||||
// this does NOT add the ssOffset
|
||||
public final float effectiveBaselineOffset(float[] fullOffsets) {
|
||||
public float effectiveBaselineOffset(float[] fullOffsets) {
|
||||
switch (baselineIndex) {
|
||||
case GraphicAttribute.TOP_ALIGNMENT:
|
||||
return fullOffsets[4] + ascent;
|
||||
|
||||
@ -50,55 +50,55 @@ public final class FontLineMetrics extends LineMetrics implements Cloneable {
|
||||
this.frc = frc;
|
||||
}
|
||||
|
||||
public final int getNumChars() {
|
||||
public int getNumChars() {
|
||||
return numchars;
|
||||
}
|
||||
|
||||
public final float getAscent() {
|
||||
public float getAscent() {
|
||||
return cm.ascent;
|
||||
}
|
||||
|
||||
public final float getDescent() {
|
||||
public float getDescent() {
|
||||
return cm.descent;
|
||||
}
|
||||
|
||||
public final float getLeading() {
|
||||
public float getLeading() {
|
||||
return cm.leading;
|
||||
}
|
||||
|
||||
public final float getHeight() {
|
||||
public float getHeight() {
|
||||
return cm.height;
|
||||
}
|
||||
|
||||
public final int getBaselineIndex() {
|
||||
public int getBaselineIndex() {
|
||||
return cm.baselineIndex;
|
||||
}
|
||||
|
||||
public final float[] getBaselineOffsets() {
|
||||
public float[] getBaselineOffsets() {
|
||||
return cm.baselineOffsets.clone();
|
||||
}
|
||||
|
||||
public final float getStrikethroughOffset() {
|
||||
public float getStrikethroughOffset() {
|
||||
return cm.strikethroughOffset;
|
||||
}
|
||||
|
||||
public final float getStrikethroughThickness() {
|
||||
public float getStrikethroughThickness() {
|
||||
return cm.strikethroughThickness;
|
||||
}
|
||||
|
||||
public final float getUnderlineOffset() {
|
||||
public float getUnderlineOffset() {
|
||||
return cm.underlineOffset;
|
||||
}
|
||||
|
||||
public final float getUnderlineThickness() {
|
||||
public float getUnderlineThickness() {
|
||||
return cm.underlineThickness;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
public int hashCode() {
|
||||
return cm.hashCode();
|
||||
}
|
||||
|
||||
public final boolean equals(Object rhs) {
|
||||
public boolean equals(Object rhs) {
|
||||
try {
|
||||
return cm.equals(((FontLineMetrics)rhs).cm);
|
||||
}
|
||||
@ -107,7 +107,7 @@ public final class FontLineMetrics extends LineMetrics implements Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
public final Object clone() {
|
||||
public Object clone() {
|
||||
// frc, cm do not need deep clone
|
||||
try {
|
||||
return super.clone();
|
||||
|
||||
@ -140,11 +140,11 @@ public final class FontRunIterator {
|
||||
|
||||
static final int DONE = -1;
|
||||
|
||||
final int nextCodePoint() {
|
||||
int nextCodePoint() {
|
||||
return nextCodePoint(limit);
|
||||
}
|
||||
|
||||
final int nextCodePoint(int lim) {
|
||||
int nextCodePoint(int lim) {
|
||||
if (pos >= lim) {
|
||||
return DONE;
|
||||
}
|
||||
@ -159,7 +159,7 @@ public final class FontRunIterator {
|
||||
return ch;
|
||||
}
|
||||
|
||||
final void pushback(int ch) {
|
||||
void pushback(int ch) {
|
||||
if (ch >= 0) {
|
||||
if (ch >= 0x10000) {
|
||||
pos -= 2;
|
||||
|
||||
@ -262,7 +262,7 @@ public final class GlyphList {
|
||||
return mapChars(info, len);
|
||||
}
|
||||
|
||||
private final boolean mapChars(FontInfo info, int len) {
|
||||
private boolean mapChars(FontInfo info, int len) {
|
||||
/* REMIND.Is it worthwhile for the iteration to convert
|
||||
* chars to glyph ids to directly map to images?
|
||||
*/
|
||||
|
||||
@ -121,7 +121,7 @@ public final class ScriptRun
|
||||
*
|
||||
* @return the index of the first character in the current script run.
|
||||
*/
|
||||
public final int getScriptStart() {
|
||||
public int getScriptStart() {
|
||||
return scriptStart;
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ public final class ScriptRun
|
||||
*
|
||||
* @return the index of the first character after the current script run.
|
||||
*/
|
||||
public final int getScriptLimit() {
|
||||
public int getScriptLimit() {
|
||||
return scriptLimit;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public final class ScriptRun
|
||||
* @return the script code for the script of the current script run.
|
||||
* @see #Script
|
||||
*/
|
||||
public final int getScriptCode() {
|
||||
public int getScriptCode() {
|
||||
return scriptCode;
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ public final class ScriptRun
|
||||
*
|
||||
* @return <code>false</code> if there isn't another run, <code>true</code> if there is.
|
||||
*/
|
||||
public final boolean next() {
|
||||
public boolean next() {
|
||||
int startSP = parenSP; // used to find the first new open character
|
||||
|
||||
// if we've fallen off the end of the text, we're done
|
||||
@ -242,7 +242,7 @@ public final class ScriptRun
|
||||
|
||||
static final int DONE = -1;
|
||||
|
||||
private final int nextCodePoint() {
|
||||
private int nextCodePoint() {
|
||||
if (scriptLimit >= textLimit) {
|
||||
return DONE;
|
||||
}
|
||||
@ -257,7 +257,7 @@ public final class ScriptRun
|
||||
return ch;
|
||||
}
|
||||
|
||||
private final void pushback(int ch) {
|
||||
private void pushback(int ch) {
|
||||
if (ch >= 0) {
|
||||
if (ch >= 0x10000) {
|
||||
scriptLimit -= 2;
|
||||
@ -287,7 +287,7 @@ public final class ScriptRun
|
||||
* @param n the word in which to find the highest bit that's set.
|
||||
* @return the bit number (counting from the low order bit) of the highest bit.
|
||||
*/
|
||||
private static final byte highBit(int n)
|
||||
private static byte highBit(int n)
|
||||
{
|
||||
if (n <= 0) {
|
||||
return -32;
|
||||
|
||||
@ -39,7 +39,7 @@ public final class ScriptRunData {
|
||||
private static final int CHAR_LIMIT = 0x110000;
|
||||
|
||||
private static int cache = 0;
|
||||
public static final int getScript(int cp) {
|
||||
public static int getScript(int cp) {
|
||||
// optimize for runs of characters in the same script
|
||||
if (cp >= data[cache] && cp < data[cache+2]) {
|
||||
return data[cache+1];
|
||||
|
||||
@ -202,7 +202,7 @@ public final class StrikeCache {
|
||||
recentStrikeIndex = index;
|
||||
}
|
||||
|
||||
private static final void doDispose(FontStrikeDisposer disposer) {
|
||||
private static void doDispose(FontStrikeDisposer disposer) {
|
||||
if (disposer.intGlyphImages != null) {
|
||||
freeCachedIntMemory(disposer.intGlyphImages,
|
||||
disposer.pScalerContext);
|
||||
|
||||
@ -250,7 +250,7 @@ public final class StateTrackableDelegate implements StateTrackable {
|
||||
* {@code IMMUTABLE} delegate is never modified.
|
||||
* @since 1.7
|
||||
*/
|
||||
public final void markDirty() {
|
||||
public void markDirty() {
|
||||
theTracker = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -917,7 +917,7 @@ public final class SunGraphics2D
|
||||
* Return the SurfaceData object assigned to manage the destination
|
||||
* drawable surface of this Graphics2D.
|
||||
*/
|
||||
public final SurfaceData getSurfaceData() {
|
||||
public SurfaceData getSurfaceData() {
|
||||
return surfaceData;
|
||||
}
|
||||
|
||||
@ -1734,7 +1734,7 @@ public final class SunGraphics2D
|
||||
* compositeState <= COMP_CUSTOM)
|
||||
* though nothing bad will happen if it is run in other states.
|
||||
*/
|
||||
final void validateColor() {
|
||||
void validateColor() {
|
||||
int eargb;
|
||||
if (imageComp == CompositeType.Clear) {
|
||||
eargb = 0;
|
||||
|
||||
@ -43,7 +43,7 @@ final class LCMSProfile extends Profile {
|
||||
tagCache = new TagCache(this);
|
||||
}
|
||||
|
||||
final long getLcmsPtr() {
|
||||
long getLcmsPtr() {
|
||||
return this.getNativePtr();
|
||||
}
|
||||
|
||||
|
||||
@ -242,7 +242,7 @@ public final class CompositeType {
|
||||
this.uniqueID = makeUniqueID(desc);
|
||||
}
|
||||
|
||||
public synchronized static final int makeUniqueID(String desc) {
|
||||
public synchronized static int makeUniqueID(String desc) {
|
||||
Integer i = compositeUIDMap.get(desc);
|
||||
|
||||
if (i == null) {
|
||||
|
||||
@ -401,7 +401,7 @@ public final class SurfaceType {
|
||||
this.pixelConverter = parent.pixelConverter;
|
||||
}
|
||||
|
||||
public synchronized static final int makeUniqueID(String desc) {
|
||||
public static synchronized int makeUniqueID(String desc) {
|
||||
Integer i = surfaceUIDMap.get(desc);
|
||||
|
||||
if (i == null) {
|
||||
|
||||
@ -73,7 +73,7 @@ public final class DialogOwner
|
||||
* @return Printing attribute class (category), an instance of class
|
||||
* {@link java.lang.Class java.lang.Class}.
|
||||
*/
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
public Class<? extends Attribute> getCategory() {
|
||||
return DialogOwner.class;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ public final class DialogOwner
|
||||
*
|
||||
* @return Attribute category name.
|
||||
*/
|
||||
public final String getName() {
|
||||
public String getName() {
|
||||
return "dialog-owner";
|
||||
}
|
||||
|
||||
|
||||
@ -40,23 +40,19 @@ public final class SunMinMaxPage implements PrintRequestAttribute {
|
||||
page_max = max;
|
||||
}
|
||||
|
||||
|
||||
public final Class<? extends PrintRequestAttribute> getCategory() {
|
||||
public Class<? extends PrintRequestAttribute> getCategory() {
|
||||
return SunMinMaxPage.class;
|
||||
}
|
||||
|
||||
|
||||
public final int getMin() {
|
||||
public int getMin() {
|
||||
return page_min;
|
||||
}
|
||||
|
||||
public final int getMax() {
|
||||
public int getMax() {
|
||||
return page_max;
|
||||
}
|
||||
|
||||
|
||||
public final String getName() {
|
||||
public String getName() {
|
||||
return "sun-page-minmax";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -44,11 +44,11 @@ public final class SunPageSelection implements PrintRequestAttribute {
|
||||
pages = value;
|
||||
}
|
||||
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
public Class<? extends Attribute> getCategory() {
|
||||
return SunPageSelection.class;
|
||||
}
|
||||
|
||||
public final String getName() {
|
||||
public String getName() {
|
||||
return "sun-page-selection";
|
||||
}
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ public final class XAtom {
|
||||
}
|
||||
return xatom;
|
||||
}
|
||||
public final String getName() {
|
||||
public String getName() {
|
||||
if (name == null) {
|
||||
XToolkit.awtLock();
|
||||
try {
|
||||
|
||||
@ -86,7 +86,7 @@ final class XDropTargetRegistry {
|
||||
return window;
|
||||
}
|
||||
|
||||
static final long getDnDProxyWindow() {
|
||||
static long getDnDProxyWindow() {
|
||||
return XWindow.getXAWTRootWindow().getWindow();
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
static native void awt_output_flush();
|
||||
|
||||
static final void awtFUnlock() {
|
||||
static void awtFUnlock() {
|
||||
awtUnlock();
|
||||
awt_output_flush();
|
||||
}
|
||||
@ -876,7 +876,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
*/
|
||||
|
||||
// Need this for XMenuItemPeer.
|
||||
protected static final Object targetToPeer(Object target) {
|
||||
protected static Object targetToPeer(Object target) {
|
||||
Object p=null;
|
||||
if (target != null && !GraphicsEnvironment.isHeadless()) {
|
||||
p = specialPeerMap.get(target);
|
||||
@ -887,7 +887,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
}
|
||||
|
||||
// Need this for XMenuItemPeer.
|
||||
protected static final void targetDisposedPeer(Object target, Object peer) {
|
||||
protected static void targetDisposedPeer(Object target, Object peer) {
|
||||
SunToolkit.targetDisposedPeer(target, peer);
|
||||
}
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ final class WInputMethod extends InputMethodAdapter
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void dispose() {
|
||||
public void dispose() {
|
||||
// Due to a memory management problem in Windows 98, we should retain
|
||||
// the native input context until this object is finalized. So do
|
||||
// nothing here.
|
||||
|
||||
@ -1573,7 +1573,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
|
||||
//** BEGIN Functions called by native code for querying/updating attributes
|
||||
|
||||
private final String getPrinterAttrib() {
|
||||
private String getPrinterAttrib() {
|
||||
// getPrintService will get current print service or default if none
|
||||
PrintService service = this.getPrintService();
|
||||
String name = (service != null) ? service.getName() : null;
|
||||
@ -1581,7 +1581,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/* SheetCollate */
|
||||
private final int getCollateAttrib() {
|
||||
private int getCollateAttrib() {
|
||||
// -1 means unset, 0 uncollated, 1 collated.
|
||||
return mAttCollate;
|
||||
}
|
||||
@ -1602,7 +1602,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
|
||||
/* Orientation */
|
||||
|
||||
private final int getOrientAttrib() {
|
||||
private int getOrientAttrib() {
|
||||
int orient = PageFormat.PORTRAIT;
|
||||
OrientationRequested orientReq = (attributes == null) ? null :
|
||||
(OrientationRequested)attributes.get(OrientationRequested.class);
|
||||
@ -1629,7 +1629,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/* Copies and Page Range. */
|
||||
private final int getCopiesAttrib() {
|
||||
private int getCopiesAttrib() {
|
||||
if (defaultCopies) {
|
||||
return 0;
|
||||
} else {
|
||||
@ -1637,9 +1637,8 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
}
|
||||
|
||||
private final void setRangeCopiesAttribute(int from, int to,
|
||||
boolean isRangeSet,
|
||||
int copies) {
|
||||
private void setRangeCopiesAttribute(int from, int to, boolean isRangeSet,
|
||||
int copies) {
|
||||
if (attributes != null) {
|
||||
if (isRangeSet) {
|
||||
attributes.add(new PageRanges(from, to));
|
||||
@ -1658,12 +1657,12 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
|
||||
|
||||
|
||||
private final boolean getDestAttrib() {
|
||||
private boolean getDestAttrib() {
|
||||
return (mDestination != null);
|
||||
}
|
||||
|
||||
/* Quality */
|
||||
private final int getQualityAttrib() {
|
||||
private int getQualityAttrib() {
|
||||
return mAttQuality;
|
||||
}
|
||||
|
||||
@ -1684,7 +1683,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/* Color/Chromaticity */
|
||||
private final int getColorAttrib() {
|
||||
private int getColorAttrib() {
|
||||
return mAttChromaticity;
|
||||
}
|
||||
|
||||
@ -1703,7 +1702,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/* Sides */
|
||||
private final int getSidesAttrib() {
|
||||
private int getSidesAttrib() {
|
||||
return mAttSides;
|
||||
}
|
||||
|
||||
@ -1724,7 +1723,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/** MediaSizeName / dmPaper */
|
||||
private final int[] getWin32MediaAttrib() {
|
||||
private int[] getWin32MediaAttrib() {
|
||||
int wid_ht[] = {0, 0};
|
||||
if (attributes != null) {
|
||||
Media media = (Media)attributes.get(Media.class);
|
||||
@ -1810,7 +1809,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
|
||||
|
||||
|
||||
private final boolean getPrintToFileEnabled() {
|
||||
private boolean getPrintToFileEnabled() {
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
if (security != null) {
|
||||
FilePermission printToFilePermission =
|
||||
@ -1824,7 +1823,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
return true;
|
||||
}
|
||||
|
||||
private final void setNativeAttributes(int flags, int fields, int values) {
|
||||
private void setNativeAttributes(int flags, int fields, int values) {
|
||||
if (attributes == null) {
|
||||
return;
|
||||
}
|
||||
@ -2016,7 +2015,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
* The attribute set here is a temporary one installed whilst this
|
||||
* happens,
|
||||
*/
|
||||
private final void setJobAttributes(PrintRequestAttributeSet attributes,
|
||||
private void setJobAttributes(PrintRequestAttributeSet attributes,
|
||||
int fields, int values,
|
||||
short copies,
|
||||
short dmPaperSize,
|
||||
@ -2152,7 +2151,7 @@ public final class WPrinterJob extends RasterPrinterJob
|
||||
}
|
||||
|
||||
/* Printer Resolution. See also getXRes() and getYRes() */
|
||||
private final void setResolutionDPI(int xres, int yres) {
|
||||
private void setResolutionDPI(int xres, int yres) {
|
||||
if (attributes != null) {
|
||||
PrinterResolution res =
|
||||
new PrinterResolution(xres, yres, PrinterResolution.DPI);
|
||||
|
||||
@ -276,7 +276,7 @@ public final class WToolkit extends SunToolkit implements Runnable {
|
||||
setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled);
|
||||
}
|
||||
|
||||
private final void registerShutdownHook() {
|
||||
private void registerShutdownHook() {
|
||||
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
|
||||
Thread shutdown = new Thread(ThreadGroupUtils.getRootThreadGroup(), this::shutdown);
|
||||
shutdown.setContextClassLoader(null);
|
||||
@ -746,11 +746,11 @@ public final class WToolkit extends SunToolkit implements Runnable {
|
||||
@Override
|
||||
protected native void loadSystemColors(int[] systemColors);
|
||||
|
||||
public static final Object targetToPeer(Object target) {
|
||||
public static Object targetToPeer(Object target) {
|
||||
return SunToolkit.targetToPeer(target);
|
||||
}
|
||||
|
||||
public static final void targetDisposedPeer(Object target, Object peer) {
|
||||
public static void targetDisposedPeer(Object target, Object peer) {
|
||||
SunToolkit.targetDisposedPeer(target, peer);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user