8190228: Remove redundant modifiers in java.desktop module

Reviewed-by: serb, prr
This commit is contained in:
Semyon Sadetsky 2017-11-22 14:04:51 -08:00
parent 48508135fe
commit 70329e0640
28 changed files with 65 additions and 65 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -329,7 +329,7 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
}
}
private final void swap(final Vector<Object> a, final int i, final int j) {
private void swap(final Vector<Object> a, final int i, final int j) {
final Object T = a.elementAt(i);
a.setElementAt(a.elementAt(j), i);
a.setElementAt(T, j);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1448,7 +1448,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
*
* @return true during layout, false otherwise.
*/
private final boolean isLayouting() {
private boolean isLayouting() {
return isLayouting;
}
}

@ -10227,7 +10227,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
applyCompoundShape(getAppliedShape().getDifference(s));
}
private final void applyCurrentShapeBelowMe() {
private void applyCurrentShapeBelowMe() {
checkTreeLock();
Container parent = getContainer();
if (parent != null && parent.isShowing()) {

@ -283,7 +283,7 @@ public class EventQueue {
* @param theEvent an instance of {@code java.awt.AWTEvent},
* or a subclass of it
*/
private final void postEventPrivate(AWTEvent theEvent) {
private void postEventPrivate(AWTEvent theEvent) {
theEvent.isPosted = true;
pushPopLock.lock();
try {

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -410,7 +410,7 @@ public class MenuItem extends MenuComponent implements Accessible {
* Returns true if the item and all its ancestors are
* enabled, false otherwise
*/
private final boolean isItemEnabled() {
private boolean isItemEnabled() {
// Fix For 6185151: Menu shortcuts of all menuitems within a menu
// should be disabled when the menu itself is disabled
if (!isEnabled()) {

@ -1354,7 +1354,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
/* SH | SC => */ APPLY_SHEAR | APPLY_SCALE,
/* SH | SC | TR => */ APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE,
};
private final void rotate90() {
private void rotate90() {
double M0 = m00;
m00 = m01;
m01 = -M0;
@ -1370,7 +1370,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
this.state = state;
type = TYPE_UNKNOWN;
}
private final void rotate180() {
private void rotate180() {
m00 = -m00;
m11 = -m11;
int state = this.state;
@ -1390,7 +1390,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
}
type = TYPE_UNKNOWN;
}
private final void rotate270() {
private void rotate270() {
double M0 = m00;
m00 = -m01;
m01 = M0;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -397,7 +397,7 @@ public class BufferedImageFilter extends ImageFilter implements Cloneable {
consumer.imageComplete(status);
}
private final WritableRaster createDCMraster() {
private WritableRaster createDCMraster() {
WritableRaster wr;
DirectColorModel dcm = (DirectColorModel) model;
boolean hasAlpha = model.hasAlpha();

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -295,7 +295,7 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp {
}
}
private final BufferedImage ICCBIFilter(BufferedImage src,
private BufferedImage ICCBIFilter(BufferedImage src,
ColorSpace srcColorSpace,
BufferedImage dest,
ColorSpace destColorSpace) {
@ -753,7 +753,7 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp {
return hints;
}
private final BufferedImage nonICCBIFilter(BufferedImage src,
private BufferedImage nonICCBIFilter(BufferedImage src,
ColorSpace srcColorSpace,
BufferedImage dst,
ColorSpace dstColorSpace) {
@ -947,7 +947,7 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp {
/* color convert a Raster - handles byte, ushort, int, short, float,
or double transferTypes */
private final WritableRaster nonICCRasterFilter(Raster src,
private WritableRaster nonICCRasterFilter(Raster src,
WritableRaster dst) {
if (CSList.length != 2) {

@ -755,7 +755,7 @@ public class IndexColorModel extends ColorModel {
* value is used to mask off the pixel parameters for methods such
* as getRed(), getGreen(), getBlue(), getAlpha(), and getRGB().
*/
private final void calculatePixelMask() {
private void calculatePixelMask() {
// Note that we adjust the mask so that our masking behavior here
// is consistent with that of our native rendering loops.
int maskbits = pixel_bits;

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -472,7 +472,7 @@ public class LookupOp implements BufferedImageOp, RasterOp {
return hints;
}
private final void byteFilter(ByteLookupTable lookup, Raster src,
private void byteFilter(ByteLookupTable lookup, Raster src,
WritableRaster dst,
int width, int height, int numBands) {
int[] srcPix = null;
@ -519,7 +519,7 @@ public class LookupOp implements BufferedImageOp, RasterOp {
}
}
private final void shortFilter(ShortLookupTable lookup, Raster src,
private void shortFilter(ShortLookupTable lookup, Raster src,
WritableRaster dst,
int width, int height, int numBands) {
int band;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,7 @@ package java.awt.image;
* @see ShortLookupTable
* @see LookupOp
*/
public abstract class LookupTable extends Object{
public abstract class LookupTable {
/**
* Constants

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -3490,7 +3490,7 @@ public class BasicTreeUI extends TreeUI
* the destination it is constructed with. It is assumed all the
* events are currently target at source.
*/
public class MouseInputHandler extends Object implements
public class MouseInputHandler implements
MouseInputListener
{
/** Source that events are coming from. */

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -83,7 +83,7 @@ import javax.swing.event.SwingPropertyChangeSupport;
* @see JTable#getCellEditor(int, int)
*/
@SuppressWarnings("serial") // Same-version serialization only
public class TableColumn extends Object implements Serializable {
public class TableColumn implements Serializable {
/**
* Obsolete as of Java 2 platform v1.3. Please use string literals to identify

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1797,7 +1797,7 @@ public abstract class AbstractDocument implements Document, Serializable {
}
}
private final void indent(PrintWriter out, int n) {
private void indent(PrintWriter out, int n) {
for (int i = 0; i < n; i++) {
out.print(" ");
}
@ -2063,7 +2063,7 @@ public abstract class AbstractDocument implements Document, Serializable {
}
}
private final void checkForIllegalCast() {
private void checkForIllegalCast() {
Thread t = getCurrentWriter();
if ((t == null) || (t != Thread.currentThread())) {
throw new StateInvariantError("Illegal cast to MutableAttributeSet");

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -2422,7 +2422,7 @@ class Parser implements DTDConstants {
private int currentPosition;
private final int readCh() throws IOException {
private int readCh() throws IOException {
if (pos >= len) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -82,7 +82,7 @@ import java.beans.ConstructorProperties;
* @author Philip Milne
*/
@SuppressWarnings("serial") // Same-version serialization only
public class TreePath extends Object implements Serializable {
public class TreePath implements Serializable {
/** Path representing the parent, null if lastPathComponent represents
* the root. */
private TreePath parentPath;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,7 @@ public class PNGImageDecoder extends ImageDecoder
private void property(String key,float value) {
property(key, Float.valueOf(value));
}
private final void pngassert(boolean b) throws IOException {
private void pngassert(boolean b) throws IOException {
if(!b) {
PNGException e = new PNGException("Broken file");
e.printStackTrace();
@ -692,20 +692,20 @@ public class PNGImageDecoder extends ImageDecoder
fill();
return limit-pos>=n;
}
private final int getInt(int pos) {
private int getInt(int pos) {
return ((inbuf[pos ]&0xFF)<<24)
| ((inbuf[pos+1]&0xFF)<<16)
| ((inbuf[pos+2]&0xFF)<< 8)
| ((inbuf[pos+3]&0xFF) );
}
private final int getShort(int pos) {
private int getShort(int pos) {
return (short)(((inbuf[pos ]&0xFF)<<8)
| ((inbuf[pos+1]&0xFF) ));
}
private final int getByte(int pos) {
private int getByte(int pos) {
return inbuf[pos]&0xFF;
}
private final boolean getChunk() throws IOException {
private boolean getChunk() throws IOException {
chunkLength = 0;
if (!need(8)) return false;
chunkLength = getInt(pos);

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -310,7 +310,7 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La
return new Rectangle2D.Float(l, t, r - l, b - t);
}
private final StandardGlyphVector getGV() {
private StandardGlyphVector getGV() {
if (gv == null) {
gv = createGV();
}
@ -543,7 +543,7 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La
}
}
private final float[] getCharinfo() {
private float[] getCharinfo() {
if (charinfo == null) {
charinfo = createCharinfo();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -998,14 +998,14 @@ public class StandardGlyphVector extends GlyphVector {
}
// called by getGlyphsPixelBounds
private final void setDTX(AffineTransform tx) {
private void setDTX(AffineTransform tx) {
if (!equalNonTranslateTX(dtx, tx)) {
resetDTX(getNonTranslateTX(tx));
}
}
// called by most functions
private final void setFRCTX() {
private void setFRCTX() {
if (!equalNonTranslateTX(frctx, dtx)) {
resetDTX(getNonTranslateTX(frctx));
}
@ -1016,7 +1016,7 @@ public class StandardGlyphVector extends GlyphVector {
* must not contain translation.
* Called by setRenderTransform, setDTX, initFontData.
*/
private final void resetDTX(AffineTransform at) {
private void resetDTX(AffineTransform at) {
fsref = null;
dtx = at;
invdtx = null;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -147,7 +147,7 @@ public class TextSourceLabel extends TextLabel {
return createLogicalBounds();
}
private final GlyphVector getGV() {
private GlyphVector getGV() {
if (gv == null) {
gv = createGV();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -106,11 +106,11 @@ public class TrueTypeGlyphMapper extends CharToGlyphMapper {
cmap = CMap.theNullCmap;
}
private final char remapJAChar(char unicode) {
private char remapJAChar(char unicode) {
return (unicode == REVERSE_SOLIDUS) ? JA_YEN : unicode;
}
private final int remapJAIntChar(int unicode) {
private int remapJAIntChar(int unicode) {
return (unicode == REVERSE_SOLIDUS) ? JA_YEN : unicode;
}

@ -227,7 +227,7 @@ public final class DMarlinRenderingEngine extends RenderingEngine
pc2d);
}
private final double userSpaceLineWidth(AffineTransform at, double lw) {
private double userSpaceLineWidth(AffineTransform at, double lw) {
double widthScale;

@ -227,7 +227,7 @@ public final class MarlinRenderingEngine extends RenderingEngine
pc2d);
}
private final float userSpaceLineWidth(AffineTransform at, float lw) {
private float userSpaceLineWidth(AffineTransform at, float lw) {
float widthScale;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -152,7 +152,7 @@ public abstract class AccumulativeRunnable<T> implements Runnable {
*
* @return accumulated arguments
*/
private final synchronized List<T> flush() {
private synchronized List<T> flush() {
List<T> list = arguments;
arguments = null;
return list;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -113,7 +113,7 @@ public class XBaseWindow {
// internal lock for synchronizing state changes and paint calls, initialized in preInit.
// the order with other locks: AWTLock -> stateLock
static class StateLock extends Object { }
static class StateLock { }
protected StateLock state_lock;
/**
@ -315,7 +315,7 @@ public class XBaseWindow {
* Creates window with parameters specified by {@code params}
* @see #init
*/
private final void create(XCreateWindowParams params) {
private void create(XCreateWindowParams params) {
XToolkit.awtLock();
try {
XSetWindowAttributes xattr = new XSetWindowAttributes();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ public class X11Renderer implements
: new X11Renderer());
}
private final long validate(SunGraphics2D sg2d) {
private long validate(SunGraphics2D sg2d) {
// NOTE: getCompClip() will revalidateAll() if the
// surfaceData is invalid. This should ensure that
// the clip and pixel that we are validating against

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -69,7 +69,7 @@ public class XRRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe {
* Common validate method, used by all XRRender functions to validate the
* destination context.
*/
private final void validateSurface(SunGraphics2D sg2d) {
private void validateSurface(SunGraphics2D sg2d) {
XRSurfaceData xrsd;
try {
xrsd = (XRSurfaceData) sg2d.surfaceData;

@ -630,7 +630,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
private native void nativeGrab();
private native void nativeUngrab();
private final boolean hasWarningWindow() {
private boolean hasWarningWindow() {
return ((Window)target).getWarningString() != null;
}
@ -674,7 +674,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
super.setBounds(x, y, width, height, op);
}
private final void initScales() {
private void initScales() {
if (scaleX >= 1 && scaleY >= 1) {
return;