vassalengine-svn Mailing List for VASSAL Engine (Page 2)
Brought to you by:
rodneykinney,
uckelman
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(187) |
Nov
(124) |
Dec
(101) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(51) |
Feb
(91) |
Mar
(139) |
Apr
(84) |
May
(151) |
Jun
(125) |
Jul
(54) |
Aug
(49) |
Sep
(89) |
Oct
(111) |
Nov
(19) |
Dec
(189) |
2008 |
Jan
(150) |
Feb
(231) |
Mar
(218) |
Apr
(111) |
May
(199) |
Jun
(71) |
Jul
(178) |
Aug
(149) |
Sep
(68) |
Oct
(204) |
Nov
(219) |
Dec
(121) |
2009 |
Jan
(288) |
Feb
(192) |
Mar
(255) |
Apr
(99) |
May
(142) |
Jun
(111) |
Jul
(84) |
Aug
(102) |
Sep
(70) |
Oct
(152) |
Nov
(114) |
Dec
(53) |
2010 |
Jan
(71) |
Feb
(134) |
Mar
(50) |
Apr
(168) |
May
(123) |
Jun
(44) |
Jul
(99) |
Aug
(85) |
Sep
(126) |
Oct
(160) |
Nov
(85) |
Dec
(80) |
2011 |
Jan
(41) |
Feb
(14) |
Mar
(22) |
Apr
(5) |
May
(1) |
Jun
(5) |
Jul
(41) |
Aug
(64) |
Sep
(63) |
Oct
(112) |
Nov
(54) |
Dec
(3) |
2012 |
Jan
(33) |
Feb
(32) |
Mar
(25) |
Apr
(31) |
May
(49) |
Jun
(17) |
Jul
(46) |
Aug
(54) |
Sep
(79) |
Oct
(34) |
Nov
(9) |
Dec
(103) |
2013 |
Jan
(6) |
Feb
(22) |
Mar
(50) |
Apr
(62) |
May
(61) |
Jun
(43) |
Jul
(27) |
Aug
(7) |
Sep
(33) |
Oct
(40) |
Nov
(62) |
Dec
(13) |
2014 |
Jan
(33) |
Feb
(23) |
Mar
(13) |
Apr
|
May
|
Jun
(87) |
Jul
(25) |
Aug
(10) |
Sep
(7) |
Oct
|
Nov
|
Dec
(12) |
2015 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(14) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(10) |
Dec
(3) |
2017 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(33) |
Nov
(5) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
(43) |
Apr
(41) |
May
(70) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <uck...@us...> - 2020-05-25 21:48:35
|
Revision: 9429 http://sourceforge.net/p/vassalengine/svn/9429 Author: uckelman Date: 2020-05-25 21:48:32 +0000 (Mon, 25 May 2020) Log Message: ----------- removed final modifier from static methods as the methods can still be accessed via the super class Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Symbol.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java 2020-05-25 21:48:26 UTC (rev 9428) +++ VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java 2020-05-25 21:48:32 UTC (rev 9429) @@ -87,7 +87,7 @@ protected Color myChat; protected Color otherChat; - public static final String getAnonymousUserName() { + public static String getAnonymousUserName() { return Resources.getString("Chat.anonymous"); //$NON-NLS-1$ } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Symbol.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Symbol.java 2020-05-25 21:48:26 UTC (rev 9428) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Symbol.java 2020-05-25 21:48:32 UTC (rev 9429) @@ -142,7 +142,7 @@ protected static final String COMPANY_SYMBOL = "i"; //$NON-NLS-1$ protected static final String BRIGADE_SYMBOL = "x"; //$NON-NLS-1$ - protected static final String[] getSymbolNames() { + protected static String[] getSymbolNames() { return new String[] { NONE, INFANTRY, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:48:29
|
Revision: 9428 http://sourceforge.net/p/vassalengine/svn/9428 Author: uckelman Date: 2020-05-25 21:48:26 +0000 (Mon, 25 May 2020) Log Message: ----------- Removed deprecated classes which we've verified nothing in the module library uses. Removed Paths: ------------- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java VASSAL-src/trunk/src/VASSAL/command/TrackPiece.java VASSAL-src/trunk/src/VASSAL/counters/Transparent.java VASSAL-src/trunk/src/VASSAL/launch/CommandClient.java VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java VASSAL-src/trunk/src/VASSAL/launch/Main.java VASSAL-src/trunk/src/VASSAL/tools/AudioFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/Base64.java VASSAL-src/trunk/src/VASSAL/tools/ConcurrentSoftHashMap.java VASSAL-src/trunk/src/VASSAL/tools/Decoder.java VASSAL-src/trunk/src/VASSAL/tools/Deobfuscator.java VASSAL-src/trunk/src/VASSAL/tools/DirectoryFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/ExtensionFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/FileChooser.java VASSAL-src/trunk/src/VASSAL/tools/FileFilter.java VASSAL-src/trunk/src/VASSAL/tools/ImageFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java VASSAL-src/trunk/src/VASSAL/tools/MemoryUtils.java VASSAL-src/trunk/src/VASSAL/tools/Obfuscator.java VASSAL-src/trunk/src/VASSAL/tools/Pair.java VASSAL-src/trunk/src/VASSAL/tools/ProgressDialog.java VASSAL-src/trunk/src/VASSAL/tools/RotateFilter.java VASSAL-src/trunk/src/VASSAL/tools/StringUtils.java VASSAL-src/trunk/src/VASSAL/tools/TransparentFilter.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/EDT.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/EDTExecutorService.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/EDTRunnableFuture.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/Progressor.java VASSAL-src/trunk/src/VASSAL/tools/image/RenderingClues.java VASSAL-src/trunk/src/VASSAL/tools/io/FileUtils.java VASSAL-src/trunk/src/VASSAL/tools/io/TempFileManager.java VASSAL-src/trunk/src/VASSAL/tools/logging/CommandClientAdapter.java VASSAL-src/trunk/src/VASSAL/tools/logging/LogOutputStreamAdapter.java Deleted: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,404 +0,0 @@ -package VASSAL.build.module.gamepieceimage; - -import java.awt.Color; -import java.awt.image.BufferedImage; -import java.awt.image.DataBuffer; -import java.awt.image.DataBufferByte; -import java.awt.image.IndexColorModel; -import java.awt.image.PixelInterleavedSampleModel; -import java.awt.image.Raster; -import java.awt.image.SampleModel; -import java.awt.image.WritableRaster; - -/** Converts an RGB image to 8-bit index color using Heckbert's median-cut - color quantization algorithm. Based on median.c by Anton Kruger from the - September, 1994 issue of Dr. Dobbs Journal. - @deprecated -*/ -@Deprecated public class MedianCut { - - static final int MAXCOLORS = 256; // maximum # of output colors - static final int HSIZE = 32768; // size of image histogram - private int[] hist; // RGB histogram and reverse color lookup table - private int[] histPtr; // points to colors in "hist" - private Cube[] list; // list of cubes - private int[] pixels32; - private int width, height; - private IndexColorModel cm; - - public MedianCut(BufferedImage image) { - int color16; - - width = image.getWidth(); - height = image.getHeight(); - pixels32 = image.getRGB(0, 0, width, height, null, 0, width); - - //build 32x32x32 RGB histogram - hist = new int[HSIZE]; - for (int i=0; i<width*height; i++) { - color16 = rgb(pixels32[i]); - hist[color16]++; - } - } - - int getColorCount() { - int count = 0; - for (int i=0; i<HSIZE; i++) - if (hist[i]>0) count++; - return count; - } - - - Color getModalColor() { - int max=0; - int c = 0; - for (int i=0; i<HSIZE; i++) - if (hist[i]>max) { - max = hist[i]; - c = i; - } - return new Color(red(c), green(c), blue(c)); - } - - - // Convert from 24-bit to 15-bit color - private int rgb(int c) { - int r = (c&0xf80000)>>19; - int g = (c&0xf800)>>6; - int b = (c&0xf8)<<7; - return b | g | r; - } - - // Get red component of a 15-bit color - private int red(int x) { - return (x&31)<<3; - } - - // Get green component of a 15-bit color - private int green(int x) { - return (x>>2)&0xf8; - } - - // Get blue component of a 15-bit color - private int blue(int x) { - return (x>>7)&0xf8; - } - - - /** Uses Heckbert's median-cut algorithm to divide the color space defined by - "hist" into "maxcubes" cubes. The centroids (average value) of each cube - are are used to create a color table. "hist" is then updated to function - as an inverse color map that is used to generate an 8-bit image. */ - public BufferedImage convert(int maxcubes) { - return convertToByte(maxcubes); - } - - public IndexColorModel buildColorModel(int maxcubes) { - convertToByte(maxcubes); - return cm; - } - - /** This is a version of convert that returns a ByteProcessor. */ - public BufferedImage convertToByte(int maxcubes) { - int lr, lg, lb; - int i, median, color; - int count; - int k, level, ncubes, splitpos; - int longdim=0; //longest dimension of cube - Cube cube, cubeA, cubeB; - - // Create initial cube - list = new Cube[MAXCOLORS]; - histPtr = new int[HSIZE]; - ncubes = 0; - cube = new Cube(); - for (i=0,color=0; i<=HSIZE-1; i++) { - if (hist[i] != 0) { - histPtr[color++] = i; - cube.count = cube.count + hist[i]; - } - } - cube.lower = 0; cube.upper = color-1; - cube.level = 0; - Shrink(cube); - list[ncubes++] = cube; - - //Main loop - while (ncubes < maxcubes) { - - // Search the list of cubes for next cube to split, the lowest level cube - level = 255; splitpos = -1; - for (k=0; k<=ncubes-1; k++) { - if (list[k].lower == list[k].upper) - ; // single color; cannot be split - else if (list[k].level < level) { - level = list[k].level; - splitpos = k; - } - } - if (splitpos == -1) // no more cubes to split - break; - - // Find longest dimension of this cube - cube = list[splitpos]; - lr = cube.rmax - cube.rmin; - lg = cube.gmax - cube.gmin; - lb = cube.bmax - cube.bmin; - if (lr >= lg && lr >= lb) longdim = 0; - if (lg >= lr && lg >= lb) longdim = 1; - if (lb >= lr && lb >= lg) longdim = 2; - - // Sort along "longdim" - reorderColors(histPtr, cube.lower, cube.upper, longdim); - quickSort(histPtr, cube.lower, cube.upper); - restoreColorOrder(histPtr, cube.lower, cube.upper, longdim); - - // Find median - count = 0; - for (i=cube.lower;i<=cube.upper-1;i++) { - if (count >= cube.count/2) break; - color = histPtr[i]; - count = count + hist[color]; - } - median = i; - - // Now split "cube" at the median and add the two new - // cubes to the list of cubes. - cubeA = new Cube(); - cubeA.lower = cube.lower; - cubeA.upper = median-1; - cubeA.count = count; - cubeA.level = cube.level + 1; - Shrink(cubeA); - list[splitpos] = cubeA; // add in old slot - - cubeB = new Cube(); - cubeB.lower = median; - cubeB.upper = cube.upper; - cubeB.count = cube.count - count; - cubeB.level = cube.level + 1; - Shrink(cubeB); - list[ncubes++] = cubeB; // add in new slot */ - } - - // We have enough cubes, or we have split all we can. Now - // compute the color map, the inverse color map, and return - // an 8-bit image. - makeInverseMap(hist, ncubes); - return makeImage(); - } - - void Shrink(Cube cube) { - // Encloses "cube" with a tight-fitting cube by updating the - // (rmin,gmin,bmin) and (rmax,gmax,bmax) members of "cube". - - int r, g, b; - int color; - int rmin, rmax, gmin, gmax, bmin, bmax; - - rmin = 255; rmax = 0; - gmin = 255; gmax = 0; - bmin = 255; bmax = 0; - for (int i=cube.lower; i<=cube.upper; i++) { - color = histPtr[i]; - r = red(color); - g = green(color); - b = blue(color); - if (r > rmax) rmax = r; - if (r < rmin) rmin = r; - if (g > gmax) gmax = g; - if (g < gmin) gmin = g; - if (b > bmax) bmax = b; - if (b < bmin) bmin = b; - } - cube.rmin = rmin; cube.rmax = rmax; - cube.gmin = gmin; cube.gmax = gmax; - cube.bmin = bmin; cube.bmax = bmax; - } - - - void makeInverseMap(int[] hist, int ncubes) { - // For each cube in the list of cubes, computes the centroid - // (average value) of the colors enclosed by that cube, and - // then loads the centroids in the color map. Next loads - // "hist" with indices into the color map - - int r, g, b; - int color; - float rsum, gsum, bsum; - Cube cube; - byte[] rLUT = new byte[256]; - byte[] gLUT = new byte[256]; - byte[] bLUT = new byte[256]; - - for (int k=0; k<=ncubes-1; k++) { - cube = list[k]; - rsum = gsum = bsum = (float)0.0; - for (int i=cube.lower; i<=cube.upper; i++) { - color = histPtr[i]; - r = red(color); - rsum += (float)r* hist[color]; - g = green(color); - gsum += (float)g* hist[color]; - b = blue(color); - bsum += (float)b* hist[color]; - } - - // Update the color map - r = (int)(rsum/ cube.count); - g = (int)(gsum/ cube.count); - b = (int)(bsum/ cube.count); - if (r==248 && g==248 && b==248) - r=g=b=255; // Restore white (255,255,255) - rLUT[k] = (byte)r; - gLUT[k] = (byte)g; - bLUT[k] = (byte)b; - } - cm = new IndexColorModel(8, ncubes, rLUT, gLUT, bLUT); - - // For each color in each cube, load the corre- - // sponding slot in "hist" with the centroid of the cube. - for (int k=0; k<=ncubes-1; k++) { - cube = list[k]; - for (int i=cube.lower; i<=cube.upper; i++) { - color = histPtr[i]; - hist[color] = k; - } - } - } - - - void reorderColors(int[] a, int lo, int hi, int longDim) { - // Change the ordering of the 5-bit colors in each word of int[] - // so we can sort on the 'longDim' color - - int c, r, g, b; - switch (longDim) { - case 0: //red - for (int i=lo; i<=hi; i++) { - c = a[i]; - r = c & 31; - a[i] = (r<<10) | (c>>5); - } - break; - case 1: //green - for (int i=lo; i<=hi; i++) { - c = a[i]; - r = c & 31; - g = (c>>5) & 31; - b = c>>10; - a[i] = (g<<10) | (b<<5) | r; - } - break; - case 2: //blue; already in the needed order - break; - } - } - - - void restoreColorOrder(int[] a, int lo, int hi, int longDim) { - // Restore the 5-bit colors to the original order - - int c, r, g, b; - switch (longDim){ - case 0: //red - for (int i=lo; i<=hi; i++) { - c = a[i]; - r = c >> 10; - a[i] = ((c&1023)<<5) | r; - } - break; - case 1: //green - for (int i=lo; i<=hi; i++) { - c = a[i]; - r = c & 31; - g = c>>10; - b = (c>>5) & 31; - a[i] = (b<<10) | (g<<5) | r; - } - break; - case 2: //blue - break; - } - } - - - void quickSort(int[] a, int lo0, int hi0) { - // Based on the QuickSort method by James Gosling from Sun's SortDemo applet - - int lo = lo0; - int hi = hi0; - int mid, t; - - if ( hi0 > lo0) { - mid = a[ ( lo0 + hi0 ) / 2 ]; - while( lo <= hi ) { - while( ( lo < hi0 ) && ( a[lo] < mid ) ) - ++lo; - while( ( hi > lo0 ) && ( a[hi] > mid ) ) - --hi; - if( lo <= hi ) { - t = a[lo]; - a[lo] = a[hi]; - a[hi] = t; - ++lo; - --hi; - } - } - if( lo0 < hi ) - quickSort( a, lo0, hi ); - if( lo < hi0 ) - quickSort( a, lo, hi0 ); - - } - } - - - BufferedImage makeImage() { - // Generate 8-bit image - - //Image img8; - byte[] pixels8; - int color16; - - pixels8 = new byte[width*height]; - for (int i=0; i<width*height; i++) { - color16 = rgb(pixels32[i]); - pixels8[i] = (byte)hist[color16]; - } - - SampleModel sampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, width, height, 1, width, new int[] {0}); - DataBufferByte Buffer = new DataBufferByte(pixels8, pixels8.length); - WritableRaster raster = Raster.createWritableRaster(sampleModel, Buffer, null); - - return new BufferedImage(cm, raster, false, null); - } - - -} //class MedianCut - - -class Cube { // structure for a cube in color space - int lower; // one corner's index in histogram - int upper; // another corner's index in histogram - int count; // cube's histogram count - int level; // cube's level - int rmin, rmax; - int gmin, gmax; - int bmin, bmax; - - Cube() { - count = 0; - } - - public String toString() { - String s = "lower=" + lower + " upper=" + upper; //$NON-NLS-1$ //$NON-NLS-2$ - s = s + " count=" + count + " level=" + level; //$NON-NLS-1$ //$NON-NLS-2$ - s = s + " rmin=" + rmin + " rmax=" + rmax; //$NON-NLS-1$ //$NON-NLS-2$ - s = s + " gmin=" + gmin + " gmax=" + gmax; //$NON-NLS-1$ //$NON-NLS-2$ - s = s + " bmin=" + bmin + " bmax=" + bmax; //$NON-NLS-1$ //$NON-NLS-2$ - return s; - } - -} - Deleted: VASSAL-src/trunk/src/VASSAL/command/TrackPiece.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/command/TrackPiece.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/command/TrackPiece.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,51 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2000-2003 by Rodney Kinney - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ -package VASSAL.command; - -import VASSAL.counters.Decorator; -import VASSAL.counters.GamePiece; - -/** - * This class makes it more convenient to create a ChangePiece command. - * A TrackPiece is instantiated with a GamePiece and later finalized. - * The old state is the state of the GamePIece at instantiation, while - * the new state is the state of the GamePiece at finalization. - * @deprecated Use {@link ChangeTracker} - */ -@Deprecated public class TrackPiece extends ChangePiece { - private GamePiece piece; - - public TrackPiece(GamePiece p) { - super(p.getId(), Decorator.getOutermost(p).getState(), null); - piece = p; - } - - @Override - public String getNewState() { - if (newState == null) { - throw new RuntimeException("Must invoke finalize() before getting new state"); - } - return super.getNewState(); - } - - @Override - public void finalize() { - newState = Decorator.getOutermost(piece).getState(); - } -} Deleted: VASSAL-src/trunk/src/VASSAL/counters/Transparent.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Transparent.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/counters/Transparent.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,103 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2000-2003 by Rodney Kinney - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ -package VASSAL.counters; - -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Point; -import java.awt.image.FilteredImageSource; - -import VASSAL.build.GameModule; - -/** - * A class that draws a GamePiece with a specifyable level of transparency - * @deprecated No longer used by anything. - */ -@Deprecated -public class Transparent { - private double alpha = 0.2; - private PieceImage opaque; - private Image im; - private GamePiece piece; - private Point offset; - - public Transparent(GamePiece p) { - setPiece(p); - } - - public void setPiece(GamePiece p) { - piece = p; - opaque = new PieceImage(p); - } - - public GamePiece getPiece() { - return piece; - } - - public void setAlpha(double val) { - alpha = val; - } - - public void draw(Graphics g, int x, int y, Component obs, double zoom) { - if (alpha == 1.0) { - piece.draw(g, x, y, obs, zoom); - return; - } - if (opaque.isChanged()) { - - int trans = VASSAL.tools.TransparentFilter.getOffscreenEquivalent(obs.getBackground().getRGB(), obs); - VASSAL.tools.TransparentFilter filter = new VASSAL.tools.TransparentFilter(); - filter.setAlpha(alpha); - filter.setAlpha(0.0, trans); - im = opaque.getImage(obs); - Image im2 = obs.createImage(im.getWidth(obs), im.getHeight(obs)); - Graphics2D gg = (Graphics2D) im2.getGraphics(); - gg.drawImage(im, 0, 0, obs); - gg.dispose(); - im = obs.createImage(new FilteredImageSource - (im2.getSource(), filter)); - offset = new Point(piece.boundingBox().x, - piece.boundingBox().y); - -/* - im = opaque.getImage(obs); - final Image im2 = obs.createImage(im.getWidth(obs), im.getHeight(obs)); - final Graphics2D gg = (Graphics2D) im2.getGraphics(); - gg.setComposite( - AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) alpha)); - gg.drawImage(im, 0, 0, obs); - gg.dispose(); - - offset = new Point(piece.boundingBox().x, - piece.boundingBox().y); -*/ - } - - Image scaled = im; - if (zoom != 1.0) { - scaled = GameModule.getGameModule().getDataArchive().getScaledImage(im,zoom); - } - g.drawImage(scaled, - x + (int) (zoom * offset.x), - y + (int) (zoom * offset.y), - obs); - } -} Deleted: VASSAL-src/trunk/src/VASSAL/launch/CommandClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/CommandClient.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/launch/CommandClient.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,75 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2008 by Joel Uckelman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ - -package VASSAL.launch; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.Socket; - -import VASSAL.tools.ErrorDialog; - -/** - * A socket client for communication between the {@link ModuleManager} - * and its children {@link Player} and {@link Editor} processes. Requests - * are sent from, and replies recieved by this class. - * - * @see CommandServer - * @author Joel Uckelman - * @since 3.1.0 - * @deprecated Use {@link ObjectOutputStream} with {@link SerializableSingal} - * instead. - */ -@Deprecated -public class CommandClient { - private final ObjectInputStream in; - private final ObjectOutputStream out; - - /** - * Create a new <code>CommandClient</code>. - * - * @param clientSocket the socket on which to communicate - * @throws IOException if something goes wrong with the socket - */ - public CommandClient(Socket clientSocket) throws IOException { - out = new ObjectOutputStream(clientSocket.getOutputStream()); - in = new ObjectInputStream(clientSocket.getInputStream()); - } - - /** - * Send a request to the socket listener and recieve a reply. - * This method is synchronized to ensure that only one thread - * sends a requests over the socket at a time. - * - * @param cmd the command to send to the socket listener - * @return the reply object from the socket listener - * @throws IOException if something goes wrong with the socket - */ - public synchronized Object request(Object cmd) throws IOException { - out.writeObject(cmd); - try { - return in.readObject(); - } - catch (ClassNotFoundException e) { - ErrorDialog.bug(e); - return null; - } - } -} Deleted: VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,109 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2008-2009 by Joel Uckelman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ - -package VASSAL.launch; - -import java.io.EOFException; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.net.SocketException; - -import VASSAL.tools.ErrorDialog; -import VASSAL.tools.ThrowableUtils; -import VASSAL.tools.io.IOUtils; - -/** - * The base class for socket servers for communication between the - * {@link ModuleManager} and its children {@link Player} and {@link Editor} - * processes. Concrete extensions will implement {@link #execute(Object)} to - * process incoming requests. - * - * @see CommandClient - * @author Joel Uckelman - * @since 3.1.0 - * @deprecated Use {@link SignalDispatcher} instead. - */ -@Deprecated -public class CommandServer implements Runnable { - private final ServerSocket serverSocket; - - public CommandServer(ServerSocket serverSocket) { - this.serverSocket = serverSocket; - } - - /** - * Initialize the {@link Command}. Subclasses handling commands - * which need access to some local state will override this method. - */ - public void init(Command command) {} - - @Override - public void run() { - Socket clientSocket = null; - ObjectOutputStream out = null; - ObjectInputStream in = null; - try { - clientSocket = serverSocket.accept(); - - out = new ObjectOutputStream(clientSocket.getOutputStream()); - in = new ObjectInputStream(clientSocket.getInputStream()); - - Object obj; - Object result; - try { - while ((obj = in.readObject()) != null) { - // Execute commands as they come and send back the reply - if (obj instanceof Command) { - final Command command = (Command) obj; - init(command); - result = command.execute(); - } - else { - result = "UNRECOGNIZED_COMMAND"; - } - - out.writeObject(result); - } - } - catch (EOFException | SocketException e) { - // Normal. This happens when the socket is closed from the other end. - } - - clientSocket.close(); - serverSocket.close(); - } - catch (ClassNotFoundException e) { - ErrorDialog.bug(e); - } - catch (IOException e) { - ErrorDialog.showDetails( - e, - ThrowableUtils.getStackTrace(e), - "Error.socket_error" - ); - } - finally { - IOUtils.closeQuietly(clientSocket); - IOUtils.closeQuietly(serverSocket); - } - } -} Deleted: VASSAL-src/trunk/src/VASSAL/launch/Main.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/Main.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/launch/Main.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000-2007 by Rodney Kinney - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ -package VASSAL.launch; - -import VASSAL.tools.ErrorDialog; - -/** - * @deprecated Use {@link Editor}, {@link Player}, and {@link ModuleManager} - * as entry points for VASSAL instead. - */ -@Deprecated -public class Main { - public static void main(String[] args) { - System.setProperty("swing.aatext", "true"); //$NON-NLS-1$ //$NON-NLS-2$ - System.setProperty("swing.boldMetal", "false"); //$NON-NLS-1$ //$NON-NLS-2$ - System.setProperty("awt.useSystemAAFontSettings", "on"); //$NON-NLS-1$ //$NON-NLS-2$ - - ErrorDialog.show( - null, null, - "Obsolete Entry Point", - "The Entry Point VASSAL.launch.Main is Obsolete", - "You have attempted to start VASSAL from the VASSAL.launch.Main entry point. This entry point is no longer current. The current entry points are VASSAL.launch.ModuleManager, VASSAL.launch.Player, and VASSAL.launch.Editor.\n\nIf this message makes no sense to you, or you were trying to load a module, please ask for help at the VASSAL Forum." - ); - } -} Deleted: VASSAL-src/trunk/src/VASSAL/tools/AudioFileFilter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/AudioFileFilter.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/tools/AudioFileFilter.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,30 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2006 by Joel Uckelman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ -package VASSAL.tools; - -/** - * A FileFilter for AIFF, AU, and WAV files. Used by file choosers to - * filter out files which aren't audio files. - * - * @author Joel Uckelman - * @deprecated Moved to {@link VASSAL.tools.filechooser.AudioFileFilter}. - */ -@Deprecated -public class AudioFileFilter extends VASSAL.tools.filechooser.AudioFileFilter { -} Deleted: VASSAL-src/trunk/src/VASSAL/tools/Base64.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-25 21:48:13 UTC (rev 9427) +++ VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-25 21:48:26 UTC (rev 9428) @@ -1,1817 +0,0 @@ -package VASSAL.tools; - -import java.io.IOException; - -/** - * <p>Encodes and decodes to and from Base64 notation.</p> - * <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p> - * - * <p>The <tt>options</tt> parameter, which appears in a few places, is used to pass - * several pieces of information to the encoder. In the "higher level" methods such as - * encodeBytes( bytes, options ) the options parameter can be used to indicate such - * things as first gzipping the bytes before encoding them, not inserting linefeeds - * (though that breaks strict Base64 compatibility), and encoding using the URL-safe - * and Ordered dialects.</p> - * - * <p>The constants defined in Base64 can be OR-ed together to combine options, so you - * might make a call like this:</p> - * - * <code>String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DONT_BREAK_LINES );</code> - * - * <p>to compress the data before encoding it and then making the output have no newline characters.</p> - * - * - * <p> - * Change Log: - * </p> - * <ul> - * <li>v2.2.2 - Fixed encodeFileToFile and decodeFileToFile to use the - * Base64.InputStream class to encode and decode on the fly which uses - * less memory than encoding/decoding an entire file into memory before writing.</li> - * <li>v2.2.1 - Fixed bug using URL_SAFE and ORDERED encodings. Fixed bug - * when using very small files (~< 40 bytes).</li> - * <li>v2.2 - Added some helper methods for encoding/decoding directly from - * one file to the next. Also added a main() method to support command line - * encoding/decoding from one file to the next. Also added these Base64 dialects: - * <ol> - * <li>The default is RFC3548 format.</li> - * <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.URLSAFE_FORMAT) generates - * URL and file name friendly format as described in Section 4 of RFC3548. - * http://www.faqs.org/rfcs/rfc3548.html</li> - * <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.ORDERED_FORMAT) generates - * URL and file name friendly format that preserves lexical ordering as described - * in http://www.faqs.org/qa/rfcc-1940.html</li> - * </ol> - * Special thanks to Jim Kellerman at <a href="http://www.powerset.com/">http://www.powerset.com/</a> - * for contributing the new Base64 dialects. - * </li> - * - * <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added - * some convenience methods for reading and writing to and from files.</li> - * <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems - * with other encodings (like EBCDIC).</li> - * <li>v2.0.1 - Fixed an error when decoding a single byte, that is, when the - * encoded data was a single byte.</li> - * <li>v2.0 - I got rid of methods that used booleans to set options. - * Now everything is more consolidated and cleaner. The code now detects - * when data that's being decoded is gzip-compressed and will decompress it - * automatically. Generally things are cleaner. You'll probably have to - * change some method calls that you were making to support the new - * options format (<tt>int</tt>s that you "OR" together).</li> - * <li>v1.5.1 - Fixed bug when decompressing and decoding to a - * byte[] using <tt>decode( String s, boolean gzipCompressed )</tt>. - * Added the ability to "suspend" encoding in the Output Stream so - * you can turn on and off the encoding if you need to embed base64 - * data in an otherwise "normal" stream (like an XML file).</li> - * <li>v1.5 - Output stream pases on flush() command but doesn't do anything itself. - * This helps when using GZIP streams. - * Added the ability to GZip-compress objects before encoding them.</li> - * <li>v1.4 - Added helper methods to read/write files.</li> - * <li>v1.3.6 - Fixed OutputStream.flush() so that 'position' is reset.</li> - * <li>v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream - * where last buffer being read, if not completely full, was not returned.</li> - * <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li> - * <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li> - * </ul> - * - * <p> - * I am placing this code in the Public Domain. Do with it as you will. - * This software comes with no guarantees or warranties but with - * plenty of well-wishing instead! - * Please visit <a href="http://iharder.net/base64">http://iharder.net/base64</a> - * periodically to check for updates or to contribute improvements. - * </p> - * - * @author Robert Harder - * @author ro...@ih... - * @version 2.2.2 - * - * {@deprecated} Use {@link net.iharder.Base64} instead. - */ -@Deprecated -public class Base64 -{ - -/* ******** P U B L I C F I E L D S ******** */ - - - /** No options specified. Value is zero. */ - public final static int NO_OPTIONS = 0; - - /** Specify encoding. */ - public final static int ENCODE = 1; - - - /** Specify decoding. */ - public final static int DECODE = 0; - - - /** Specify that data should be gzip-compressed. */ - public final static int GZIP = 2; - - - /** Don't break lines when encoding (violates strict Base64 specification) */ - public final static int DONT_BREAK_LINES = 8; - - /** - * Encode using Base64-like encoding that is URL- and Filename-safe as described - * in Section 4 of RFC3548: - * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>. - * It is important to note that data encoded this way is <em>not</em> officially valid Base64, - * or at the very least should not be called Base64 without also specifying that is - * was encoded using the URL- and Filename-safe dialect. - */ - public final static int URL_SAFE = 16; - - - /** - * Encode using the special "ordered" dialect of Base64 described here: - * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>. - */ - public final static int ORDERED = 32; - - -/* ******** P R I V A T E F I E L D S ******** */ - - - /** Maximum line length (76) of Base64 output. */ - private final static int MAX_LINE_LENGTH = 76; - - - /** The equals sign (=) as a byte. */ - private final static byte EQUALS_SIGN = (byte)'='; - - - /** The new line character (\n) as a byte. */ - private final static byte NEW_LINE = (byte)'\n'; - - - /** Preferred encoding. */ - private final static String PREFERRED_ENCODING = "UTF-8"; - - - // I think I end up not using the BAD_ENCODING indicator. - //private final static byte BAD_ENCODING = -9; // Indicates error in encoding - private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding - private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding - - -/* ******** S T A N D A R D B A S E 6 4 A L P H A B E T ******** */ - - /** The 64 valid Base64 values. */ - //private final static byte[] ALPHABET; - /* Host platform me be something funny like EBCDIC, so we hardcode these values. */ - private final static byte[] _STANDARD_ALPHABET = - { - (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', - (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N', - (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', - (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', - (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g', - (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', - (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', - (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z', - (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', - (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/' - }; - - - /** - * Translates a Base64 value to either its 6-bit reconstruction value - * or a negative number indicating some other meaning. - **/ - private final static byte[] _STANDARD_DECODABET = - { - -9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 0 - 8 - -5,-5, // Whitespace: Tab and Linefeed - -9,-9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 14 - 26 - -9,-9,-9,-9,-9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 33 - 42 - 62, // Plus sign at decimal 43 - -9,-9,-9, // Decimal 44 - 46 - 63, // Slash at decimal 47 - 52,53,54,55,56,57,58,59,60,61, // Numbers zero through nine - -9,-9,-9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9,-9,-9, // Decimal 62 - 64 - 0,1,2,3,4,5,6,7,8,9,10,11,12,13, // Letters 'A' through 'N' - 14,15,16,17,18,19,20,21,22,23,24,25, // Letters 'O' through 'Z' - -9,-9,-9,-9,-9,-9, // Decimal 91 - 96 - 26,27,28,29,30,31,32,33,34,35,36,37,38, // Letters 'a' through 'm' - 39,40,41,42,43,44,45,46,47,48,49,50,51, // Letters 'n' through 'z' - -9,-9,-9,-9 // Decimal 123 - 126 - /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ - }; - - -/* ******** U R L S A F E B A S E 6 4 A L P H A B E T ******** */ - - /** - * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: - * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>. - * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash." - */ - private final static byte[] _URL_SAFE_ALPHABET = - { - (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', - (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N', - (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', - (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', - (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g', - (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', - (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', - (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z', - (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', - (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'-', (byte)'_' - }; - - /** - * Used in decoding URL- and Filename-safe dialects of Base64. - */ - private final static byte[] _URL_SAFE_DECODABET = - { - -9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 0 - 8 - -5,-5, // Whitespace: Tab and Linefeed - -9,-9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 14 - 26 - -9,-9,-9,-9,-9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 33 - 42 - -9, // Plus sign at decimal 43 - -9, // Decimal 44 - 62, // Minus sign at decimal 45 - -9, // Decimal 46 - -9, // Slash at decimal 47 - 52,53,54,55,56,57,58,59,60,61, // Numbers zero through nine - -9,-9,-9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9,-9,-9, // Decimal 62 - 64 - 0,1,2,3,4,5,6,7,8,9,10,11,12,13, // Letters 'A' through 'N' - 14,15,16,17,18,19,20,21,22,23,24,25, // Letters 'O' through 'Z' - -9,-9,-9,-9, // Decimal 91 - 94 - 63, // Underscore at decimal 95 - -9, // Decimal 96 - 26,27,28,29,30,31,32,33,34,35,36,37,38, // Letters 'a' through 'm' - 39,40,41,42,43,44,45,46,47,48,49,50,51, // Letters 'n' through 'z' - -9,-9,-9,-9 // Decimal 123 - 126 - /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ - }; - - - -/* ******** O R D E R E D B A S E 6 4 A L P H A B E T ******** */ - - /** - * I don't get the point of this technique, but it is described here: - * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>. - */ - private final static byte[] _ORDERED_ALPHABET = - { - (byte)'-', - (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', - (byte)'5', (byte)'6', (byte)'7', (byte)'8', (byte)'9', - (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', - (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N', - (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', - (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', - (byte)'_', - (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g', - (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', - (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', - (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z' - }; - - /** - * Used in decoding the "ordered" dialect of Base64. - */ - private final static byte[] _ORDERED_DECODABET = - { - -9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 0 - 8 - -5,-5, // Whitespace: Tab and Linefeed - -9,-9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 14 - 26 - -9,-9,-9,-9,-9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 33 - 42 - -9, // Plus sign at decimal 43 - -9, // Decimal 44 - 0, // Minus sign at decimal 45 - -9, // Decimal 46 - -9, // Slash at decimal 47 - 1,2,3,4,5,6,7,8,9,10, // Numbers zero through nine - -9,-9,-9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9,-9,-9, // Decimal 62 - 64 - 11,12,13,14,15,16,17,18,19,20,21,22,23, // Letters 'A' through 'M' - 24,25,26,27,28,29,30,31,32,33,34,35,36, // Letters 'N' through 'Z' - -9,-9,-9,-9, // Decimal 91 - 94 - 37, // Underscore at decimal 95 - -9, // Decimal 96 - 38,39,40,41,42,43,44,45,46,47,48,49,50, // Letters 'a' through 'm' - 51,52,53,54,55,56,57,58,59,60,61,62,63, // Letters 'n' through 'z' - -9,-9,-9,-9 // Decimal 123 - 126 - /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 127 - 139 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 - -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ - }; - - -/* ******** D E T E R M I N E W H I C H A L H A B E T ******** */ - - - /** - * Returns one of the _SOMETHING_ALPHABET byte arrays depending on - * the options specified. - * It's possible, though silly, to specify ORDERED and URLSAFE - * in which case one of them will be picked, though there is - * no guarantee as to which one will be picked. - */ - private static byte[] getAlphabet(int options ) - { - if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_ALPHABET; - else if( (options & ORDERED) == ORDERED ) return _ORDERED_ALPHABET; - else return _STANDARD_ALPHABET; - - } // end getAlphabet - - - /** - * Returns one of the _SOMETHING_DECODABET byte arrays depending on - * the options specified. - * It's possible, though silly, to specify ORDERED and URL_SAFE - * in which case one of them will be picked, though there is - * no guarantee as to which one will be picked. - */ - private static byte[] getDecodabet(int options ) - { - if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_DECODABET; - else if( (options & ORDERED) == ORDERED ) return _ORDERED_DECODABET; - else return _STANDARD_DECODABET; - - } // end getAlphabet - - - - /** Defeats instantiation. */ - private Base64(){} - - - /** - * Encodes or decodes two files from the command line; - * <strong>feel free to delete this method (in fact you probably should) - * if you're embedding this code into a larger program.</strong> - */ - public final static void main( String[] args ) - { - if( args.length < 3 ){ - usage("Not enough arguments."); - } // end if: args.length < 3 - else { - String flag = args[0]; - String infile = args[1]; - String outfile = args[2]; - if( flag.equals( "-e" ) ){ - Base64.encodeFileToFile( infile, outfile ); - } // end if: encode - else if( flag.equals( "-d" ) ) { - Base64.decodeFileToFile( infile, outfile ); - } // end else if: decode - else { - usage( "Unknown flag: " + flag ); - } // end else - } // end else - } // end main - - /** - * Prints command line usage. - * - * @param msg A message to include with usage info. - */ - private static void usage(String msg ) - { - System.err.println( msg ); - System.err.println( "Usage: java Base64 -e|-d inputfile outputfile" ); - } // end usage - - -/* ******** E N C O D I N G M E T H O D S ******** */ - - - /** - * Encodes up to the first three bytes of array <var>threeBytes</var> - * and returns a four-byte array in Base64 notation. - * The actual number of significant bytes in your array is - * given by <var>numSigBytes</var>. - * The array <var>threeBytes</var> needs only be as big as - * <var>numSigBytes</var>. - * Code can reuse a byte array by passing a four-byte array as <var>b4</var>. - * - * @param b4 A reusable byte array to reduce array instantiation - * @param threeBytes the array to convert - * @param numSigBytes the number of significant bytes in your array - * @return four byte array in Base64 notation. - * @since 1.5.1 - */ - private static byte[] encode3to4( byte[] b4, byte[] threeBytes, int numSigBytes, int options ) - { - encode3to4( threeBytes, 0, numSigBytes, b4, 0, options ); - return b4; - } // end encode3to4 - - - /** - * <p>Encodes up to three bytes of the array <var>source</var> - * and writes the resulting four Base64 bytes to <var>destination</var>. - * The source and destination arrays can be manipulated - * anywhere along their length by specifying - * <var>srcOffset</var> and <var>destOffset</var>. - * This method does not check to make sure your arrays - * are large enough to accomodate <var>srcOffset</var> + 3 for - * the <var>source</var> array or <var>destOffset</var> + 4 for - * the <var>destination</var> array. - * The actual number of significant bytes in your array is - * given by <var>numSigBytes</var>.</p> - * <p>This is the lowest level of the encoding methods with - * all possible parameters.</p> - * - * @param source the array to convert - * @param srcOffset the index where conversion begins - * @param numSigBytes the number of significant bytes in your array - * @param destination the array to hold the conversion - * @param destOffset the index where output will be put - * @return the <var>destination</var> array - * @since 1.3 - */ - private static byte[] encode3to4( - byte[] source, int srcOffset, int numSigBytes, - byte[] destination, int destOffset, int options ) - { - byte[] ALPHABET = getAlphabet( options ); - - // 1 2 3 - // 01234567890123456789012345678901 Bit position - // --------000000001111111122222222 Array position from threeBytes - // --------| || || || | Six bit groups to index ALPHABET - // >>18 >>12 >> 6 >> 0 Right shift necessary - // 0x3f 0x3f 0x3f Additional AND - - // Create buffer with zero-padding if there are only one or two - // significant bytes passed in the array. - // We have to shift left 24 in order to flush out the 1's that appear - // when Java treats a value as negative that is cast from a byte to an int. - int inBuff = ( numSigBytes > 0 ? ((source[ srcOffset ] << 24) >>> 8) : 0 ) - | ( numSigBytes > 1 ? ((source[ srcOffset + 1 ] << 24) >>> 16) : 0 ) - | ( numSigBytes > 2 ? ((source[ srcOffset + 2 ] << 24) >>> 24) : 0 ); - - switch( numSigBytes ) - { - case 3: - destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; - destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; - destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>> 6) & 0x3f ]; - destination[ destOffset + 3 ] = ALPHABET[ (inBuff ) & 0x3f ]; - return destination; - - case 2: - destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; - destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; - destination[ destOffset + 2 ] = ALPHABET[ (inBuff >>> 6) & 0x3f ]; - destination[ destOffset + 3 ] = EQUALS_SIGN; - return destination; - - case 1: - destination[ destOffset ] = ALPHABET[ (inBuff >>> 18) ]; - destination[ destOffset + 1 ] = ALPHABET[ (inBuff >>> 12) & 0x3f ]; - destination[ destOffset + 2 ] = EQUALS_SIGN; - destination[ destOffset + 3 ] = EQUALS_SIGN; - return destination; - - default: - return destination; - } // end switch - } // end encode3to4 - - - - /** - * Serializes an object and returns the Base64-encoded - * version of that serialized object. If the object - * cannot be serialized or there is another error, - * the method will return <tt>null</tt>. - * The object is not GZip-compressed before being encoded. - * - * @param serializableObject The object to encode - * @return The Base64-encoded object - * @since 1.4 - */ - public static String encodeObject( java.io.Serializable serializableObject ) - { - return encodeObject( serializableObject, NO_OPTIONS ); - } // end encodeObject - - - - /** - * Serializes an object and returns the Base64-encoded - * version of that serialized object. If the object - * cannot be serialized or there is another error, - * the method will return <tt>null</tt>. - * <p> - * Valid options:<pre> - * GZIP: gzip-compresses object before encoding it. - * DONT_BREAK_LINES: don't break lines at 76 characters - * <i>Note: Technically, this makes your encoding non-compliant.</i> - * </pre> - * <p> - * Example: <code>encodeObject( myObj, Base64.GZIP )</code> or - * <p> - * Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DONT_BREAK_LINES )</code> - * - * @param serializableObject The object to encode - * @param options Specified options - * @return The Base64-encoded object - * @see Base64#GZIP - * @see Base64#DONT_BREAK_LINES - * @since 2.0 - */ - public static String encodeObject( java.io.Serializable serializableObject, int options ) - { - // Streams - java.io.ByteArrayOutputStream baos = null; - java.io.OutputStream b64os = null; - java.io.ObjectOutputStream oos = null; - java.util.zip.GZIPOutputStream gzos = null; - - // Isolate options - int gzip = (options & GZIP); - @SuppressWarnings("unused") - int dontBreakLines = (options & DONT_BREAK_LINES); - - try - { - // ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream - baos = new java.io.ByteArrayOutputStream(); - b64os = new Base64.OutputStream( baos, ENCODE | options ); - - // GZip? - if( gzip == GZIP ) - { - gzos = new java.util.zip.GZIPOutputStream( b64os ); - oos = new java.io.ObjectOutputStream( gzos ); - } // end if: gzip - else - oos = new java.io.ObjectOutputStream( b64os ); - - oos.writeObject( serializableObject ); - } // end try - catch( java.io.IOException e ) - { - e.printStackTrace(); - return null; - } // end catch - finally - { - try{ oos.close(); } catch( Exception e ){} - try{ gzos.close(); } catch( Exception e ){} - try{ b64os.close(); } catch( Exception e ){} - try{ baos.close(); } catch( Exception e ){} - } // end finally - - // Return value according to relevant encoding. - try - { - return new String( baos.toByteArray(), PREFERRED_ENCODING ); - } // end try - catch (java.io.UnsupportedEncodingException uue) - { - return new String( baos.toByteArray() ); - } // end catch - - } // end encode - - - - /** - * Encodes a byte array into Base64 notation. - * Does not GZip-compress data. - * - * @param source The data to convert - * @since 1.4 - */ - public static String encodeBytes( byte[] source ) - { - return encodeBytes( source, 0, source.length, NO_OPTIONS ); - } // end encodeBytes - - - - /** - * Encodes a byte array into Base64 notation. - * <p> - * Valid options:<pre> - * GZIP: gzip-compresses object before encoding it. - * DONT_BREAK_LINES: don't break lines at 76 characters - * <i>Note: Technically, this makes your encoding non-compliant.</i> - * </pre> - * <p> - * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or - * <p> - * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code> - * - * - * @param source The data to convert - * @param options Specified options - * @see Base64#GZIP - * @see Base64#DONT_BREAK_LINES - ... [truncated message content] |
From: <uck...@us...> - 2020-05-25 21:48:16
|
Revision: 9427 http://sourceforge.net/p/vassalengine/svn/9427 Author: uckelman Date: 2020-05-25 21:48:13 +0000 (Mon, 25 May 2020) Log Message: ----------- removed unnecessary calls to toString() Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/Builder.java VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java VASSAL-src/trunk/src/VASSAL/command/Command.java VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java VASSAL-src/trunk/src/VASSAL/script/expression/FormattedStringExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/IntBuilder.java VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java VASSAL-src/trunk/src/VASSAL/tools/version/VersionUtils.java Modified: VASSAL-src/trunk/src/VASSAL/build/Builder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -218,7 +218,7 @@ buffer.append(((org.w3c.dom.Text) sub.item(i)).getData()); } else if (sub.item(i).getNodeType() == Node.ENTITY_REFERENCE_NODE) { - buffer.append(sub.item(i).getFirstChild().toString()); + buffer.append(sub.item(i).getFirstChild()); } } return buffer.toString().trim(); Modified: VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -1234,7 +1234,7 @@ name.append(separator()); if (counter != null) - name.append(counter.toString()); + name.append(counter); else name.append(getEntry()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -749,7 +749,7 @@ } final String rangeMsg = Resources.getString("LOS_Thread.range"); - int wid = fm.stringWidth(" " + rangeMsg + " " + buffer.toString()); + int wid = fm.stringWidth(" " + rangeMsg + " " + buffer); int hgt = fm.getAscent() + 2; final int w = mapArrow.x - mapAnchor.x; Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -1360,7 +1360,7 @@ setIcon(e.getIcon(LEAF_ICON_SIZE)); if (e.isCurrent()) { setFont(highlightFont); - setText(e.toString() + Resources.getString("ServerAddressBook.current")); //$NON-NLS-1$ + setText(e + Resources.getString("ServerAddressBook.current")); //$NON-NLS-1$ } else { setFont(standardFont); Modified: VASSAL-src/trunk/src/VASSAL/command/Command.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/command/Command.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/command/Command.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -146,7 +146,7 @@ final String details = getDetails(); if (details != null) sb.append("[").append(details).append("]"); - for (Command c : seq) sb.append("+").append(c.toString()); + for (Command c : seq) sb.append("+").append(c); return sb.toString(); } Modified: VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -294,7 +294,7 @@ } } } - return ID + buffer.toString(); + return ID + buffer; } @Override Modified: VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -115,7 +115,7 @@ public String[] toArgs() { final ArrayList<String> args = new ArrayList<>(); - args.add("--" + mode.toString()); + args.add("--" + mode); if (builtInModule) args.add("--auto"); Modified: VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -166,7 +166,7 @@ // Read the Expression initialisation script into the top level namespace URL ini = getClass().getResource(INIT_SCRIPT); - logger.info("Attempting to load "+INIT_SCRIPT+" URI generated="+ini.toString()); + logger.info("Attempting to load "+INIT_SCRIPT+" URI generated="+ ini); BufferedReader in = null; try { in = new BufferedReader( @@ -177,12 +177,12 @@ eval(in); } catch (EvalError e) { - logger.error("Error trying to read init script: "+ini.toString()); + logger.error("Error trying to read init script: "+ ini); WarningDialog.show(e, ""); } } catch (IOException e) { - logger.error("Error trying to read init script: "+ini.toString()); + logger.error("Error trying to read init script: "+ ini); WarningDialog.show(e, ""); } finally { Modified: VASSAL-src/trunk/src/VASSAL/script/expression/FormattedStringExpression.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/script/expression/FormattedStringExpression.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/script/expression/FormattedStringExpression.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -65,7 +65,7 @@ final Object value = localized ? ps.getLocalizedProperty(token) : ps.getProperty(token); if (value != null) { - buffer.append(value.toString()); + buffer.append(value); } else if (!localized) { buffer.append(token); Modified: VASSAL-src/trunk/src/VASSAL/script/expression/IntBuilder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/script/expression/IntBuilder.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/script/expression/IntBuilder.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -57,7 +57,7 @@ } } - value = (negative ? "-" : "") + result.toString(); + value = (negative ? "-" : "") + result; if (value.length() == 0 || value.equals("-")) { value = "0"; } Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -298,7 +298,7 @@ findJarIcons(); } else { - throw new IllegalBuildException ("Unknown Vassal Image source type: "+imageUrl.toString()); //$NON-NLS-1$ + throw new IllegalBuildException ("Unknown Vassal Image source type: "+ imageUrl); //$NON-NLS-1$ } } catch (IOException e) { Modified: VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -2503,7 +2503,7 @@ if (sb.length() > 0) sb.append(' '); viewer.setAttribute(CounterDetailViewer.MINIMUM_DISPLAYABLE, "1"); - viewer.setAttribute(CounterDetailViewer.SUMMARY_REPORT_FORMAT, sb.toString() + "($LocationName$)"); + viewer.setAttribute(CounterDetailViewer.SUMMARY_REPORT_FORMAT, sb + "($LocationName$)"); if (usePieceNames) { viewer.setAttribute(CounterDetailViewer.COUNTER_REPORT_FORMAT, PC_NAME); } Modified: VASSAL-src/trunk/src/VASSAL/tools/version/VersionUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/version/VersionUtils.java 2020-05-25 21:48:03 UTC (rev 9426) +++ VASSAL-src/trunk/src/VASSAL/tools/version/VersionUtils.java 2020-05-25 21:48:13 UTC (rev 9427) @@ -102,6 +102,6 @@ public static void main(String[] args) throws IOException { final VassalVersion v = new VassalVersion(Info.getVersion()); - System.out.println(v.toString() + " is current? " + isCurrent(v)); + System.out.println(v + " is current? " + isCurrent(v)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:48:05
|
Revision: 9426 http://sourceforge.net/p/vassalengine/svn/9426 Author: uckelman Date: 2020-05-25 21:48:03 +0000 (Mon, 25 May 2020) Log Message: ----------- removed unnecessary conversion to String Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/Info.java VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/EchoClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/TextClient.java VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java Modified: VASSAL-src/trunk/src/VASSAL/Info.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/Info.java 2020-05-25 21:47:55 UTC (rev 9425) +++ VASSAL-src/trunk/src/VASSAL/Info.java 2020-05-25 21:48:03 UTC (rev 9426) @@ -111,8 +111,7 @@ public static String getMinorVersion() { final VersionTokenizer tok = new VassalVersionTokenizer(VERSION); try { - return Integer.toString(tok.next()) + "." + - Integer.toString(tok.next()); + return tok.next() + "." + tok.next(); } catch (VersionFormatException e) { return null; Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java 2020-05-25 21:47:55 UTC (rev 9425) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java 2020-05-25 21:48:03 UTC (rev 9426) @@ -958,7 +958,7 @@ final List<Double> levels = state.getLevels(); for (int i = 0; i < levels.size(); ++i) { - final String zs = Long.toString(Math.round(levels.get(i)*100)) + "%"; //$NON-NLS-1$ + final String zs = Math.round(levels.get(i) * 100) + "%"; //$NON-NLS-1$ final JMenuItem item = new JRadioButtonMenuItem(zs); item.setActionCommand(Integer.toString(i)); item.addActionListener(this); Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/EchoClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/EchoClient.java 2020-05-25 21:47:55 UTC (rev 9425) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/EchoClient.java 2020-05-25 21:48:03 UTC (rev 9426) @@ -40,7 +40,7 @@ client.addPropertyChangeListener(ChatServerConnection.STATUS, new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { - System.err.println(String.valueOf(evt.getNewValue())); //$NON-NLS-1$ + System.err.println(evt.getNewValue()); //$NON-NLS-1$ } }); client.setConnected(true); Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/TextClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/TextClient.java 2020-05-25 21:47:55 UTC (rev 9425) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/TextClient.java 2020-05-25 21:48:03 UTC (rev 9426) @@ -50,7 +50,7 @@ } private void statusReceived(PropertyChangeEvent evt) { - System.out.println(String.valueOf(evt.getNewValue())); //$NON-NLS-1$ + System.out.println(evt.getNewValue()); //$NON-NLS-1$ } private void incomingMessageReceived(PropertyChangeEvent evt) { Modified: VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java 2020-05-25 21:47:55 UTC (rev 9425) +++ VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java 2020-05-25 21:48:03 UTC (rev 9426) @@ -189,7 +189,7 @@ c.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { - System.err.println(String.valueOf(evt.getNewValue())); + System.err.println(evt.getNewValue()); } }); f.getContentPane().add(c.getControls()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:47:58
|
Revision: 9425 http://sourceforge.net/p/vassalengine/svn/9425 Author: uckelman Date: 2020-05-25 21:47:55 +0000 (Mon, 25 May 2020) Log Message: ----------- use StandardCharset object instead of String literal Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/GameModule.java VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java VASSAL-src/trunk/src/VASSAL/build/module/GameState.java VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java VASSAL-src/trunk/src/VASSAL/chat/HttpRequestWrapper.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/node/BufferedSocketHandler.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java VASSAL-src/trunk/src/VASSAL/tools/Deobfuscator.java VASSAL-src/trunk/src/VASSAL/tools/Obfuscator.java VASSAL-src/trunk/src/VASSAL/tools/PropertiesEncoder.java VASSAL-src/trunk/src/VASSAL/tools/ZipUpdater.java VASSAL-src/trunk/src/VASSAL/tools/io/DeobfuscatingInputStream.java VASSAL-src/trunk/src/VASSAL/tools/io/ObfuscatingOutputStream.java Modified: VASSAL-src/trunk/src/VASSAL/build/GameModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -27,6 +27,7 @@ import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; @@ -1019,7 +1020,7 @@ try { final String save = buildString(); writer.addFile(BUILDFILE, - new ByteArrayInputStream(save.getBytes("UTF-8"))); //$NON-NLS-1$ + new ByteArrayInputStream(save.getBytes(StandardCharsets.UTF_8))); //$NON-NLS-1$ if (saveAs) writer.saveAs(true); else writer.save(true); Modified: VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -28,6 +28,7 @@ import java.io.IOException; import java.io.OutputStream; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -316,7 +317,7 @@ OutputStream out = null; try { out = new ObfuscatingOutputStream(ba); - out.write(s.getBytes("UTF-8")); + out.write(s.getBytes(StandardCharsets.UTF_8)); out.close(); } finally { Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -28,6 +28,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -748,7 +749,7 @@ OutputStream out = null; try { out = new ObfuscatingOutputStream(ba); - out.write(save.getBytes("UTF-8")); + out.write(save.getBytes(StandardCharsets.UTF_8)); out.close(); } finally { @@ -932,7 +933,7 @@ din = new DeobfuscatingInputStream(zipInput); // FIXME: toString() is very inefficient, make decode() use the stream directly final Command c = GameModule.getGameModule().decode( - IOUtils.toString(din, "UTF-8")); + IOUtils.toString(din, StandardCharsets.UTF_8)); din.close(); return c; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -25,6 +25,7 @@ import java.io.File; import java.io.IOException; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.UUID; import javax.swing.AbstractAction; @@ -412,7 +413,7 @@ final String save = buildString(); w.addFile(GameModule.BUILDFILE, - new ByteArrayInputStream(save.getBytes("UTF-8"))); //$NON-NLS-1$ + new ByteArrayInputStream(save.getBytes(StandardCharsets.UTF_8))); //$NON-NLS-1$ if (saveAs) w.saveAs(true); else w.save(true); Modified: VASSAL-src/trunk/src/VASSAL/chat/HttpRequestWrapper.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/HttpRequestWrapper.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/chat/HttpRequestWrapper.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -26,6 +26,7 @@ import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; @@ -50,7 +51,7 @@ private List<String> readLines(InputStream is) throws IOException { BufferedReader in = null; try { - in = new BufferedReader(new InputStreamReader(is, "UTF-8")); //$NON-NLS-1$ + in = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); //$NON-NLS-1$ final ArrayList<String> l = new ArrayList<>(); String line; Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -25,6 +25,7 @@ import java.beans.PropertyChangeSupport; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -661,7 +662,7 @@ try { out = new ObfuscatingOutputStream(ba); - out.write(clearText.getBytes("UTF-8")); //$NON-NLS-1$ + out.write(clearText.getBytes(StandardCharsets.UTF_8)); //$NON-NLS-1$ } catch (IOException e) { e.printStackTrace(); @@ -687,7 +688,7 @@ try { in = new DeobfuscatingInputStream(ba); - clearText = IOUtils.toString(in, "UTF-8"); //$NON-NLS-1$ + clearText = IOUtils.toString(in, StandardCharsets.UTF_8); //$NON-NLS-1$ } catch (IOException e) { e.printStackTrace(); Modified: VASSAL-src/trunk/src/VASSAL/chat/node/BufferedSocketHandler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/BufferedSocketHandler.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/chat/node/BufferedSocketHandler.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -23,7 +23,7 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Copyright (c) 2003 by Rodney Kinney. All rights reserved. @@ -35,8 +35,8 @@ public BufferedSocketHandler(Socket sock, SocketWatcher handler) throws IOException { super(sock, handler); - reader = new BufferedReader(new InputStreamReader(sock.getInputStream(),Charset.forName("UTF-8"))); //$NON-NLS-1$ - writer = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream(),Charset.forName("UTF-8"))); //$NON-NLS-1$ + reader = new BufferedReader(new InputStreamReader(sock.getInputStream(), StandardCharsets.UTF_8)); //$NON-NLS-1$ + writer = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream(), StandardCharsets.UTF_8)); //$NON-NLS-1$ } @Override Modified: VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -21,6 +21,7 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Properties; import org.apache.commons.codec.binary.Base64; @@ -241,7 +242,7 @@ if (msg.length() > compressionLimit) { try { msg = ZIP_HEADER + Base64.encodeBase64String( - Compressor.compress(msg.getBytes("UTF-8")) + Compressor.compress(msg.getBytes(StandardCharsets.UTF_8)) ); } // FIXME: review error message @@ -491,7 +492,7 @@ msg.substring(ZIP_HEADER.length()) ) ), - "UTF-8" + StandardCharsets.UTF_8 ); } // FIXME: review error message Modified: VASSAL-src/trunk/src/VASSAL/tools/Deobfuscator.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Deobfuscator.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/Deobfuscator.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; import VASSAL.tools.io.DeobfuscatingInputStream; import VASSAL.tools.io.IOUtils; @@ -39,7 +40,7 @@ public Deobfuscator(InputStream in) throws IOException { String s = null; try { - s = IOUtils.toString(in, "UTF-8"); + s = IOUtils.toString(in, StandardCharsets.UTF_8); in.close(); } catch (UnsupportedEncodingException e) { @@ -60,7 +61,7 @@ bytes[i] = (byte) (Integer.parseInt(s.substring(offset++, ++offset), 16) ^ key); } - plain = new String(bytes,"UTF-8"); + plain = new String(bytes, StandardCharsets.UTF_8); } else { plain = s; Modified: VASSAL-src/trunk/src/VASSAL/tools/Obfuscator.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Obfuscator.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/Obfuscator.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.util.Random; import VASSAL.tools.io.IOUtils; @@ -58,7 +59,7 @@ } public void write(OutputStream out) throws IOException { - out.write(encrypted.getBytes("UTF-8")); + out.write(encrypted.getBytes(StandardCharsets.UTF_8)); } // Convert a plain text file to an obfuscated file Modified: VASSAL-src/trunk/src/VASSAL/tools/PropertiesEncoder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/PropertiesEncoder.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/PropertiesEncoder.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Properties; import java.util.StringTokenizer; @@ -46,7 +47,7 @@ try { final ByteArrayOutputStream out = new ByteArrayOutputStream(); p.store(out, null); - s = new String(out.toByteArray(), "UTF-8"); + s = new String(out.toByteArray(), StandardCharsets.UTF_8); } catch (IOException e) { ErrorDialog.bug(e); @@ -75,7 +76,7 @@ buffer.append('\n'); } } - p.load(new ByteArrayInputStream(buffer.toString().getBytes("UTF-8"))); + p.load(new ByteArrayInputStream(buffer.toString().getBytes(StandardCharsets.UTF_8))); return p; } Modified: VASSAL-src/trunk/src/VASSAL/tools/ZipUpdater.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ZipUpdater.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/ZipUpdater.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -30,6 +30,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.Enumeration; import java.util.Properties; import java.util.jar.JarOutputStream; @@ -277,7 +278,7 @@ buffer.append("Manifest-Version: 1.0\n") .append("Main-Class: VASSAL.tools.ZipUpdater\n"); writeEntry( - new ByteArrayInputStream(buffer.toString().getBytes("UTF-8")), + new ByteArrayInputStream(buffer.toString().getBytes(StandardCharsets.UTF_8)), out, manifestEntry); @@ -284,7 +285,7 @@ final ZipEntry nameEntry = new ZipEntry(TARGET_ARCHIVE); nameEntry.setMethod(ZipEntry.DEFLATED); writeEntry( - new ByteArrayInputStream(inputArchiveName.getBytes("UTF-8")), + new ByteArrayInputStream(inputArchiveName.getBytes(StandardCharsets.UTF_8)), out, nameEntry); @@ -291,7 +292,7 @@ final ZipEntry updatedEntry = new ZipEntry(UPDATED_ARCHIVE_NAME); updatedEntry.setMethod(ZipEntry.DEFLATED); writeEntry( - new ByteArrayInputStream(newFile.getName().getBytes("UTF-8")), + new ByteArrayInputStream(newFile.getName().getBytes(StandardCharsets.UTF_8)), out, updatedEntry); Modified: VASSAL-src/trunk/src/VASSAL/tools/io/DeobfuscatingInputStream.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/DeobfuscatingInputStream.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/io/DeobfuscatingInputStream.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.PushbackInputStream; +import java.nio.charset.StandardCharsets; /** * A {@link FilterInputStream} which converts a file created with @@ -43,7 +44,7 @@ final byte[] header = new byte[ObfuscatingOutputStream.HEADER.length()]; readFully(in, header, 0, header.length); - if (new String(header, "UTF-8").equals(ObfuscatingOutputStream.HEADER)) { + if (new String(header, StandardCharsets.UTF_8).equals(ObfuscatingOutputStream.HEADER)) { this.in = new DeobfuscatingInputStreamImpl(in); } else { Modified: VASSAL-src/trunk/src/VASSAL/tools/io/ObfuscatingOutputStream.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/ObfuscatingOutputStream.java 2020-05-25 21:47:28 UTC (rev 9424) +++ VASSAL-src/trunk/src/VASSAL/tools/io/ObfuscatingOutputStream.java 2020-05-25 21:47:55 UTC (rev 9425) @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.util.Random; /** @@ -58,7 +59,7 @@ super(out); this.key = key; - out.write(HEADER.getBytes("UTF-8")); + out.write(HEADER.getBytes(StandardCharsets.UTF_8)); pair[0] = hex[(key & 0xF0) >>> 4]; pair[1] = hex[key & 0x0F]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:47:30
|
Revision: 9424 http://sourceforge.net/p/vassalengine/svn/9424 Author: uckelman Date: 2020-05-25 21:47:28 +0000 (Mon, 25 May 2020) Log Message: ----------- removed redundant final modifier from methods in final class Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/tools/HashCode.java Modified: VASSAL-src/trunk/src/VASSAL/tools/HashCode.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/HashCode.java 2020-05-25 21:47:23 UTC (rev 9423) +++ VASSAL-src/trunk/src/VASSAL/tools/HashCode.java 2020-05-25 21:47:28 UTC (rev 9424) @@ -33,76 +33,76 @@ public final class HashCode { private HashCode() {} - public static final int hash(final boolean value) { + public static int hash(final boolean value) { return value ? 1 : 0; } - public static final int hash(final byte value) { + public static int hash(final byte value) { return value; } - public static final int hash(final char value) { + public static int hash(final char value) { return value; } - public static final int hash(final short value) { + public static int hash(final short value) { return value; } - public static final int hash(final int value) { + public static int hash(final int value) { return value; } - public static final int hash(final long value) { + public static int hash(final long value) { return (int)(value ^ (value >>> 32)); } - public static final int hash(final float value) { + public static int hash(final float value) { return Float.floatToIntBits(value); } - public static final int hash(final double value) { + public static int hash(final double value) { final long bits = Double.doubleToLongBits(value); return (int)(bits ^ (bits >>> 32)); } - public static final int hash(final Object value) { + public static int hash(final Object value) { return value == null ? 0 : value.hashCode(); } - public static final int hash(final boolean[] a) { + public static int hash(final boolean[] a) { return Arrays.hashCode(a); } - public static final int hash(final byte[] a) { + public static int hash(final byte[] a) { return Arrays.hashCode(a); } - public static final int hash(final char[] a) { + public static int hash(final char[] a) { return Arrays.hashCode(a); } - public static final int hash(final short[] a) { + public static int hash(final short[] a) { return Arrays.hashCode(a); } - public static final int hash(final int[] a) { + public static int hash(final int[] a) { return Arrays.hashCode(a); } - public static final int hash(final long[] a) { + public static int hash(final long[] a) { return Arrays.hashCode(a); } - public static final int hash(final float[] a) { + public static int hash(final float[] a) { return Arrays.hashCode(a); } - public static final int hash(final double[] a) { + public static int hash(final double[] a) { return Arrays.hashCode(a); } - public static final <T> int hash(final T[] a) { + public static <T> int hash(final T[] a) { return Arrays.hashCode(a); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:47:26
|
Revision: 9423 http://sourceforge.net/p/vassalengine/svn/9423 Author: uckelman Date: 2020-05-25 21:47:23 +0000 (Mon, 25 May 2020) Log Message: ----------- removed redundant final modifier from private methods Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java VASSAL-src/trunk/src/VASSAL/tools/Base64.java VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-25 21:47:04 UTC (rev 9422) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-25 21:47:23 UTC (rev 9423) @@ -62,7 +62,7 @@ // Convert from 24-bit to 15-bit color - private final int rgb(int c) { + private int rgb(int c) { int r = (c&0xf80000)>>19; int g = (c&0xf800)>>6; int b = (c&0xf8)<<7; @@ -70,17 +70,17 @@ } // Get red component of a 15-bit color - private final int red(int x) { + private int red(int x) { return (x&31)<<3; } // Get green component of a 15-bit color - private final int green(int x) { + private int green(int x) { return (x>>2)&0xf8; } // Get blue component of a 15-bit color - private final int blue(int x) { + private int blue(int x) { return (x>>7)&0xf8; } Modified: VASSAL-src/trunk/src/VASSAL/tools/Base64.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-25 21:47:04 UTC (rev 9422) +++ VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-25 21:47:23 UTC (rev 9423) @@ -356,7 +356,7 @@ * in which case one of them will be picked, though there is * no guarantee as to which one will be picked. */ - private final static byte[] getAlphabet( int options ) + private static byte[] getAlphabet(int options ) { if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_ALPHABET; else if( (options & ORDERED) == ORDERED ) return _ORDERED_ALPHABET; @@ -372,7 +372,7 @@ * in which case one of them will be picked, though there is * no guarantee as to which one will be picked. */ - private final static byte[] getDecodabet( int options ) + private static byte[] getDecodabet(int options ) { if( (options & URL_SAFE) == URL_SAFE ) return _URL_SAFE_DECODABET; else if( (options & ORDERED) == ORDERED ) return _ORDERED_DECODABET; @@ -417,7 +417,7 @@ * * @param msg A message to include with usage info. */ - private final static void usage( String msg ) + private static void usage(String msg ) { System.err.println( msg ); System.err.println( "Usage: java Base64 -e|-d inputfile outputfile" ); Modified: VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java 2020-05-25 21:47:04 UTC (rev 9422) +++ VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java 2020-05-25 21:47:23 UTC (rev 9423) @@ -191,7 +191,7 @@ // Initializes mt[N] with a simple integer seed. This method is // required as part of the Mersenne Twister algorithm but need // not be made public. - private final void setSeed(int seed) { + private void setSeed(int seed) { // Annoying runtime check for initialisation of internal data // caused by java.util.Random invoking setSeed() during init. Modified: VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java 2020-05-25 21:47:04 UTC (rev 9422) +++ VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java 2020-05-25 21:47:23 UTC (rev 9423) @@ -92,7 +92,7 @@ * * @return the range being flushed */ - private final synchronized Pair<T,T> flush() { + private synchronized Pair<T,T> flush() { final Pair<T,T> flushed = range; range = new Pair<>(flushed.second, null); submitted = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-25 21:47:13
|
Revision: 9422 http://sourceforge.net/p/vassalengine/svn/9422 Author: uckelman Date: 2020-05-25 21:47:04 +0000 (Mon, 25 May 2020) Log Message: ----------- added missing Override annotation Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java VASSAL-src/trunk/src/VASSAL/build/AutoConfigurable.java VASSAL-src/trunk/src/VASSAL/build/GameModule.java VASSAL-src/trunk/src/VASSAL/build/Widget.java VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java VASSAL-src/trunk/src/VASSAL/build/module/ChartWindow.java VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java VASSAL-src/trunk/src/VASSAL/build/module/ConnectionWindow.java VASSAL-src/trunk/src/VASSAL/build/module/DiceButton.java VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java VASSAL-src/trunk/src/VASSAL/build/module/Documentation.java VASSAL-src/trunk/src/VASSAL/build/module/EventLog.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionElement.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsManager.java VASSAL-src/trunk/src/VASSAL/build/module/GameRefresher.java VASSAL-src/trunk/src/VASSAL/build/module/GameState.java VASSAL-src/trunk/src/VASSAL/build/module/GlobalKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java VASSAL-src/trunk/src/VASSAL/build/module/InternetDiceButton.java VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java VASSAL-src/trunk/src/VASSAL/build/module/Map.java VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java VASSAL-src/trunk/src/VASSAL/build/module/ModulePlugin.java VASSAL-src/trunk/src/VASSAL/build/module/MultiActionButton.java VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java VASSAL-src/trunk/src/VASSAL/build/module/NewGameIndicator.java VASSAL-src/trunk/src/VASSAL/build/module/NotesWindow.java VASSAL-src/trunk/src/VASSAL/build/module/ObscurableOptions.java VASSAL-src/trunk/src/VASSAL/build/module/PieceWindow.java VASSAL-src/trunk/src/VASSAL/build/module/PlayerHand.java VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java VASSAL-src/trunk/src/VASSAL/build/module/Plugin.java VASSAL-src/trunk/src/VASSAL/build/module/PluginsLoader.java VASSAL-src/trunk/src/VASSAL/build/module/PredefinedSetup.java VASSAL-src/trunk/src/VASSAL/build/module/PrivateMap.java VASSAL-src/trunk/src/VASSAL/build/module/PrototypeDefinition.java VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDie.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDieFace.java VASSAL-src/trunk/src/VASSAL/build/module/StartupGlobalKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java VASSAL-src/trunk/src/VASSAL/build/module/dice/ShadowDiceDieServer.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/AboutScreen.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/BrowserHelpFile.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/DialogHelpWindow.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/HelpFile.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/HelpWindow.java VASSAL-src/trunk/src/VASSAL/build/module/documentation/Tutorial.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorSwatch.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorSwatchConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontStyle.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontStyleConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImage.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImageDefinitions.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayout.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ImageItem.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ImageItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/InstanceConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Item.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/LayoutConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/NewColorConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ShapeItem.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ShapeItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SizeConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/StringEnumConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SwatchComboBox.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolItem.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/TextBoxItem.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/TextBoxItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/TextItem.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/TextItemInstance.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/Visualizer.java VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/CounterDetailViewer.java VASSAL-src/trunk/src/VASSAL/build/module/map/DeckGlobalKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/map/DefaultPieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java VASSAL-src/trunk/src/VASSAL/build/module/map/ForwardToChatter.java VASSAL-src/trunk/src/VASSAL/build/module/map/ForwardToKeyBuffer.java VASSAL-src/trunk/src/VASSAL/build/module/map/GlobalMap.java VASSAL-src/trunk/src/VASSAL/build/module/map/HandMetrics.java VASSAL-src/trunk/src/VASSAL/build/module/map/HidePiecesButton.java VASSAL-src/trunk/src/VASSAL/build/module/map/HighlightLastMoved.java VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java VASSAL-src/trunk/src/VASSAL/build/module/map/KeyBufferer.java VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java VASSAL-src/trunk/src/VASSAL/build/module/map/LayerControl.java VASSAL-src/trunk/src/VASSAL/build/module/map/LayeredPieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/MapCenterer.java VASSAL-src/trunk/src/VASSAL/build/module/map/MapShader.java VASSAL-src/trunk/src/VASSAL/build/module/map/MassKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/map/MenuDisplayer.java VASSAL-src/trunk/src/VASSAL/build/module/map/MovementReporter.java VASSAL-src/trunk/src/VASSAL/build/module/map/PieceMover.java VASSAL-src/trunk/src/VASSAL/build/module/map/PieceRecenterer.java VASSAL-src/trunk/src/VASSAL/build/module/map/Scroller.java VASSAL-src/trunk/src/VASSAL/build/module/map/SelectionHighlighter.java VASSAL-src/trunk/src/VASSAL/build/module/map/SelectionHighlighters.java VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/SmallList.java VASSAL-src/trunk/src/VASSAL/build/module/map/StackExpander.java VASSAL-src/trunk/src/VASSAL/build/module/map/StackMetrics.java VASSAL-src/trunk/src/VASSAL/build/module/map/TextSaver.java VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/BoardSlot.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/GridEditor.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/Region.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/RegionGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/ZonedGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/HexGridNumbering.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/PolygonEditor.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/RegularGridNumbering.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/SquareGridNumbering.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/ZoneHighlight.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/ZonedGridHighlighter.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/ExtensionMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/ImportMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/ModuleMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/SaveMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/AddSecretNoteCommand.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/PrivateNotesController.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/SecretNotesController.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/SetPrivateTextCommand.java VASSAL-src/trunk/src/VASSAL/build/module/properties/ChangePropertyButton.java VASSAL-src/trunk/src/VASSAL/build/module/properties/ChangePropertyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/properties/ChangePropertyCommandEncoder.java VASSAL-src/trunk/src/VASSAL/build/module/properties/EnumeratedPropertyPrompt.java VASSAL-src/trunk/src/VASSAL/build/module/properties/GlobalProperties.java VASSAL-src/trunk/src/VASSAL/build/module/properties/GlobalProperty.java VASSAL-src/trunk/src/VASSAL/build/module/properties/IncrementProperty.java VASSAL-src/trunk/src/VASSAL/build/module/properties/MutablePropertiesContainer.java VASSAL-src/trunk/src/VASSAL/build/module/properties/MutableProperty.java VASSAL-src/trunk/src/VASSAL/build/module/properties/NumericPropertyPrompt.java VASSAL-src/trunk/src/VASSAL/build/module/properties/PropertyChangerConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/properties/PropertyPrompt.java VASSAL-src/trunk/src/VASSAL/build/module/properties/PropertySetter.java VASSAL-src/trunk/src/VASSAL/build/module/properties/SumProperties.java VASSAL-src/trunk/src/VASSAL/build/module/properties/ZoneProperty.java VASSAL-src/trunk/src/VASSAL/build/module/turn/CounterTurnLevel.java VASSAL-src/trunk/src/VASSAL/build/module/turn/ListTurnLevel.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnComponent.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnGlobalHotkey.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnLevel.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnTracker.java VASSAL-src/trunk/src/VASSAL/build/widget/BoxWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/CardSlot.java VASSAL-src/trunk/src/VASSAL/build/widget/Chart.java VASSAL-src/trunk/src/VASSAL/build/widget/HtmlChart.java VASSAL-src/trunk/src/VASSAL/build/widget/ListWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/MapWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/PanelWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/PieceSlot.java VASSAL-src/trunk/src/VASSAL/build/widget/TabWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/WidgetMap.java VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/CommandDecoder.java VASSAL-src/trunk/src/VASSAL/chat/Compressor.java VASSAL-src/trunk/src/VASSAL/chat/DummyClient.java VASSAL-src/trunk/src/VASSAL/chat/DynamicClient.java VASSAL-src/trunk/src/VASSAL/chat/DynamicClientFactory.java VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java VASSAL-src/trunk/src/VASSAL/chat/HybridClient.java VASSAL-src/trunk/src/VASSAL/chat/InviteCommand.java VASSAL-src/trunk/src/VASSAL/chat/InviteEncoder.java VASSAL-src/trunk/src/VASSAL/chat/MainRoomFilter.java VASSAL-src/trunk/src/VASSAL/chat/PrivMsgCommand.java VASSAL-src/trunk/src/VASSAL/chat/PrivateChatEncoder.java VASSAL-src/trunk/src/VASSAL/chat/PrivateChatManager.java VASSAL-src/trunk/src/VASSAL/chat/PrivateChatter.java VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/SimplePlayer.java VASSAL-src/trunk/src/VASSAL/chat/SimpleRoom.java VASSAL-src/trunk/src/VASSAL/chat/SoundEncoder.java VASSAL-src/trunk/src/VASSAL/chat/SynchCommand.java VASSAL-src/trunk/src/VASSAL/chat/SynchEncoder.java VASSAL-src/trunk/src/VASSAL/chat/jabber/Interceptor.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClientFactory.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberRoom.java VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/jabber/ModuleAccountInfo.java VASSAL-src/trunk/src/VASSAL/chat/jabber/PacketProcessor.java VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageBoardControls.java VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageViewer.java VASSAL-src/trunk/src/VASSAL/chat/node/AsynchronousServerNode.java VASSAL-src/trunk/src/VASSAL/chat/node/BufferedSocketHandler.java VASSAL-src/trunk/src/VASSAL/chat/node/LockWatcher.java VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/node/Node.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeClientFactory.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeHybridClient.java VASSAL-src/trunk/src/VASSAL/chat/node/NodePlayer.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeRoom.java VASSAL-src/trunk/src/VASSAL/chat/node/PlayerNode.java VASSAL-src/trunk/src/VASSAL/chat/node/Server.java VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java VASSAL-src/trunk/src/VASSAL/chat/node/SocketHandler.java VASSAL-src/trunk/src/VASSAL/chat/node/SocketNodeClient.java VASSAL-src/trunk/src/VASSAL/chat/node/StatusReporter.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/ClientTest.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/DirectPeerPool.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/EchoClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/IpWatch.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClientFactory.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PPlayer.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/TextClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/UnitTest.java VASSAL-src/trunk/src/VASSAL/chat/ui/BasicChatControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/ChatServerControls.java VASSAL-src/trunk/src/VASSAL/chat/ui/InviteAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/JoinRoomAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/KickAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/LockableRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/ui/LockableRoomTreeRenderer.java VASSAL-src/trunk/src/VASSAL/chat/ui/MessageBoardControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/PrivateMessageAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/RoomInteractionControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/RoomTree.java VASSAL-src/trunk/src/VASSAL/chat/ui/RoomTreeRenderer.java VASSAL-src/trunk/src/VASSAL/chat/ui/SendSoundAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java VASSAL-src/trunk/src/VASSAL/chat/ui/ShowProfileAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/ShowServerStatusAction.java VASSAL-src/trunk/src/VASSAL/chat/ui/SimpleStatusControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/SynchAction.java VASSAL-src/trunk/src/VASSAL/command/AddPiece.java VASSAL-src/trunk/src/VASSAL/command/AlertCommand.java VASSAL-src/trunk/src/VASSAL/command/ChangePiece.java VASSAL-src/trunk/src/VASSAL/command/ConditionalCommand.java VASSAL-src/trunk/src/VASSAL/command/MovePiece.java VASSAL-src/trunk/src/VASSAL/command/NullCommand.java VASSAL-src/trunk/src/VASSAL/command/PlayAudioClipCommand.java VASSAL-src/trunk/src/VASSAL/command/RemovePiece.java VASSAL-src/trunk/src/VASSAL/command/TrackPiece.java VASSAL-src/trunk/src/VASSAL/configure/AudioClipConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/AutoConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/BeanShellExpressionConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/BooleanConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ChooseComponentDialog.java VASSAL-src/trunk/src/VASSAL/configure/ChooseComponentPathDialog.java VASSAL-src/trunk/src/VASSAL/configure/ColorConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/CompoundValidityChecker.java VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java VASSAL-src/trunk/src/VASSAL/configure/ConfigurerWindow.java VASSAL-src/trunk/src/VASSAL/configure/DirectoryConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/DoubleConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/EditContainedPiecesAction.java VASSAL-src/trunk/src/VASSAL/configure/EditPropertiesAction.java VASSAL-src/trunk/src/VASSAL/configure/ExtensionTree.java VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/FontConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/FormattedExpressionConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/FormattedStringArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/FormattedStringConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/HotKeyConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/IconConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ImageConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/IntConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/KeyModifiersConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ListConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/LongConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/MandatoryComponent.java VASSAL-src/trunk/src/VASSAL/configure/ModuleUpdaterDialog.java VASSAL-src/trunk/src/VASSAL/configure/NamedHotKeyConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/PieceAccessConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/PropertiesWindow.java VASSAL-src/trunk/src/VASSAL/configure/PropertyExpression.java VASSAL-src/trunk/src/VASSAL/configure/PropertyExpressionConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/PropertyNameExpressionConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/SavedGameUpdaterDialog.java VASSAL-src/trunk/src/VASSAL/configure/ShowHelpAction.java VASSAL-src/trunk/src/VASSAL/configure/SimpleConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/SingleChildInstance.java VASSAL-src/trunk/src/VASSAL/configure/SoundConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringEnumConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/TableConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/TextConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ValidationReportDialog.java VASSAL-src/trunk/src/VASSAL/counters/ActionButton.java VASSAL-src/trunk/src/VASSAL/counters/AreaOfEffect.java VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java VASSAL-src/trunk/src/VASSAL/counters/BooleanAndPieceFilter.java VASSAL-src/trunk/src/VASSAL/counters/BooleanOrPieceFilter.java VASSAL-src/trunk/src/VASSAL/counters/CalculatedProperty.java VASSAL-src/trunk/src/VASSAL/counters/Clone.java VASSAL-src/trunk/src/VASSAL/counters/ColoredBorder.java VASSAL-src/trunk/src/VASSAL/counters/CounterGlobalKeyCommand.java VASSAL-src/trunk/src/VASSAL/counters/Deck.java VASSAL-src/trunk/src/VASSAL/counters/DeckVisitorDispatcher.java VASSAL-src/trunk/src/VASSAL/counters/Decorator.java VASSAL-src/trunk/src/VASSAL/counters/Delete.java VASSAL-src/trunk/src/VASSAL/counters/DragBuffer.java VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java VASSAL-src/trunk/src/VASSAL/counters/Footprint.java VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java VASSAL-src/trunk/src/VASSAL/counters/GamePiece.java VASSAL-src/trunk/src/VASSAL/counters/GlobalCommand.java VASSAL-src/trunk/src/VASSAL/counters/GlobalHotKey.java VASSAL-src/trunk/src/VASSAL/counters/Hideable.java VASSAL-src/trunk/src/VASSAL/counters/ImagePicker.java VASSAL-src/trunk/src/VASSAL/counters/Immobilized.java VASSAL-src/trunk/src/VASSAL/counters/KeyCommand.java VASSAL-src/trunk/src/VASSAL/counters/KeyCommandSubMenu.java VASSAL-src/trunk/src/VASSAL/counters/KeySpecifier.java VASSAL-src/trunk/src/VASSAL/counters/Labeler.java VASSAL-src/trunk/src/VASSAL/counters/Marker.java VASSAL-src/trunk/src/VASSAL/counters/MassPieceDefiner.java VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java VASSAL-src/trunk/src/VASSAL/counters/MovementMarkable.java VASSAL-src/trunk/src/VASSAL/counters/MultiImagePicker.java VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java VASSAL-src/trunk/src/VASSAL/counters/PieceDefiner.java VASSAL-src/trunk/src/VASSAL/counters/PieceFinder.java VASSAL-src/trunk/src/VASSAL/counters/PieceIterator.java VASSAL-src/trunk/src/VASSAL/counters/PieceSorter.java VASSAL-src/trunk/src/VASSAL/counters/Pivot.java VASSAL-src/trunk/src/VASSAL/counters/PlaceMarker.java VASSAL-src/trunk/src/VASSAL/counters/PlaySound.java VASSAL-src/trunk/src/VASSAL/counters/PlayerAccess.java VASSAL-src/trunk/src/VASSAL/counters/PropertiesPieceFilter.java VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java VASSAL-src/trunk/src/VASSAL/counters/RangeFilter.java VASSAL-src/trunk/src/VASSAL/counters/Replace.java VASSAL-src/trunk/src/VASSAL/counters/ReportState.java VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java VASSAL-src/trunk/src/VASSAL/counters/Restricted.java VASSAL-src/trunk/src/VASSAL/counters/ReturnToDeck.java VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java VASSAL-src/trunk/src/VASSAL/counters/SideAccess.java VASSAL-src/trunk/src/VASSAL/counters/SimplePieceEditor.java VASSAL-src/trunk/src/VASSAL/counters/SpecifiedSideAccess.java VASSAL-src/trunk/src/VASSAL/counters/Stack.java VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java VASSAL-src/trunk/src/VASSAL/counters/TableInfo.java VASSAL-src/trunk/src/VASSAL/counters/Translate.java VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java VASSAL-src/trunk/src/VASSAL/counters/UsePrototype.java VASSAL-src/trunk/src/VASSAL/i18n/Language.java VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java VASSAL-src/trunk/src/VASSAL/i18n/Resources.java VASSAL-src/trunk/src/VASSAL/i18n/TranslatableMarker.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateAction.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateWindow.java VASSAL-src/trunk/src/VASSAL/i18n/Translation.java VASSAL-src/trunk/src/VASSAL/i18n/VassalResourceBundle.java VASSAL-src/trunk/src/VASSAL/i18n/VassalTranslation.java VASSAL-src/trunk/src/VASSAL/launch/AboutVASSALAction.java VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java VASSAL-src/trunk/src/VASSAL/launch/CreateModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/EditExtensionAction.java VASSAL-src/trunk/src/VASSAL/launch/EditModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/Editor.java VASSAL-src/trunk/src/VASSAL/launch/EditorWindow.java VASSAL-src/trunk/src/VASSAL/launch/ExceptionHandler.java VASSAL-src/trunk/src/VASSAL/launch/ExtensionEditorWindow.java VASSAL-src/trunk/src/VASSAL/launch/FirstTimeDialog.java VASSAL-src/trunk/src/VASSAL/launch/GameModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/Launcher.java VASSAL-src/trunk/src/VASSAL/launch/LoadModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/ModuleEditorWindow.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java VASSAL-src/trunk/src/VASSAL/launch/NewExtensionAction.java VASSAL-src/trunk/src/VASSAL/launch/Player.java VASSAL-src/trunk/src/VASSAL/launch/SaveModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/SaveModuleAsAction.java VASSAL-src/trunk/src/VASSAL/launch/ShutDownAction.java VASSAL-src/trunk/src/VASSAL/launch/StartUp.java VASSAL-src/trunk/src/VASSAL/launch/TileProgressPump.java VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java VASSAL-src/trunk/src/VASSAL/preferences/BasicPreference.java VASSAL-src/trunk/src/VASSAL/preferences/BooleanPreference.java VASSAL-src/trunk/src/VASSAL/preferences/DoublePreference.java VASSAL-src/trunk/src/VASSAL/preferences/EnumPreference.java VASSAL-src/trunk/src/VASSAL/preferences/IntegerPreference.java VASSAL-src/trunk/src/VASSAL/preferences/PositionOption.java VASSAL-src/trunk/src/VASSAL/preferences/Prefs.java VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java VASSAL-src/trunk/src/VASSAL/preferences/StringPreference.java VASSAL-src/trunk/src/VASSAL/preferences/TextPreference.java VASSAL-src/trunk/src/VASSAL/preferences/VisibilityOption.java VASSAL-src/trunk/src/VASSAL/property/AbstractPropertyContainer.java VASSAL-src/trunk/src/VASSAL/property/ConcurrentPropertySupport.java VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java VASSAL-src/trunk/src/VASSAL/script/AbstractScript.java VASSAL-src/trunk/src/VASSAL/script/ActionScript.java VASSAL-src/trunk/src/VASSAL/script/BshCommandEncoder.java VASSAL-src/trunk/src/VASSAL/script/BshPlugin.java VASSAL-src/trunk/src/VASSAL/script/GeneralScript.java VASSAL-src/trunk/src/VASSAL/script/JavaNameConfigurer.java VASSAL-src/trunk/src/VASSAL/script/ScriptContainer.java VASSAL-src/trunk/src/VASSAL/script/expression/BeanShellExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/Expression.java VASSAL-src/trunk/src/VASSAL/script/expression/ExpressionBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/FormattedStringExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/FunctionBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/IntBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/IntExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/NullExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/PropertyExpressionBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/PropertyMatchExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/PropertyNameExpressionBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/SinglePropertyExpression.java VASSAL-src/trunk/src/VASSAL/script/expression/StrBuilder.java VASSAL-src/trunk/src/VASSAL/script/expression/StringExpression.java VASSAL-src/trunk/src/VASSAL/script/proxy/Stack.java VASSAL-src/trunk/src/VASSAL/tools/AdjustableSpeedScrollPane.java VASSAL-src/trunk/src/VASSAL/tools/ArrayIterator.java VASSAL-src/trunk/src/VASSAL/tools/AudioSystemClip.java VASSAL-src/trunk/src/VASSAL/tools/BackgroundTask.java VASSAL-src/trunk/src/VASSAL/tools/Base64.java VASSAL-src/trunk/src/VASSAL/tools/BrowserSupport.java VASSAL-src/trunk/src/VASSAL/tools/BugDialog.java VASSAL-src/trunk/src/VASSAL/tools/ColorButton.java VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java VASSAL-src/trunk/src/VASSAL/tools/EnumeratedIterator.java VASSAL-src/trunk/src/VASSAL/tools/ErrorDialog.java VASSAL-src/trunk/src/VASSAL/tools/FileFilter.java VASSAL-src/trunk/src/VASSAL/tools/HotkeySpecifier.java VASSAL-src/trunk/src/VASSAL/tools/ImprovedAveragingScaleFilter.java VASSAL-src/trunk/src/VASSAL/tools/IterableEnumeration.java VASSAL-src/trunk/src/VASSAL/tools/IterableIterator.java VASSAL-src/trunk/src/VASSAL/tools/LaunchButton.java VASSAL-src/trunk/src/VASSAL/tools/MTRandom.java VASSAL-src/trunk/src/VASSAL/tools/Mp3AudioClip.java VASSAL-src/trunk/src/VASSAL/tools/NamedKeyStrokeListener.java VASSAL-src/trunk/src/VASSAL/tools/ProblemDialog.java VASSAL-src/trunk/src/VASSAL/tools/RotateFilter.java VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java VASSAL-src/trunk/src/VASSAL/tools/ScrollPane.java VASSAL-src/trunk/src/VASSAL/tools/SequenceEncoder.java VASSAL-src/trunk/src/VASSAL/tools/Sort.java VASSAL-src/trunk/src/VASSAL/tools/SplashScreen.java VASSAL-src/trunk/src/VASSAL/tools/TemporaryToolBar.java VASSAL-src/trunk/src/VASSAL/tools/TransparentFilter.java VASSAL-src/trunk/src/VASSAL/tools/UniqueIdManager.java VASSAL-src/trunk/src/VASSAL/tools/UsernameAndPasswordDialog.java VASSAL-src/trunk/src/VASSAL/tools/ZipUpdater.java VASSAL-src/trunk/src/VASSAL/tools/bug/Bug2694Handler.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/ConcurrentSoftHashMap.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/CountingReadWriteLock.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/DaemonThreadFactory.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/QueueJoiner.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/RunnableFuture.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/SimpleFuture.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DefaultEventListenerSupport.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DefaultMultiEventListenerSupport.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DotPrinter.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DummyEventListener.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/EventAccumulator.java VASSAL-src/trunk/src/VASSAL/tools/filechooser/DirectoryFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/filechooser/ExtensionFileFilter.java VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileChooser.java VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileFilter.java VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java VASSAL-src/trunk/src/VASSAL/tools/icon/IconFamily.java VASSAL-src/trunk/src/VASSAL/tools/image/FallbackImageTypeConverter.java VASSAL-src/trunk/src/VASSAL/tools/image/FileImageTypeConverter.java VASSAL-src/trunk/src/VASSAL/tools/image/GeneralFilter.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/MemoryImageTypeConverter.java VASSAL-src/trunk/src/VASSAL/tools/image/RenderingClues.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ImageTileDiskCache.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ImageToTiles.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileTask.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TilesToImage.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractTileOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractTiledOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/CropOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/GamePieceOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/ImageOp.java VASSAL-src/trunk/src/VASSAL/tools/imageop/ImageSourceOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/OpMultiResolutionImage.java VASSAL-src/trunk/src/VASSAL/tools/imageop/OrthoRotateOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/Repainter.java VASSAL-src/trunk/src/VASSAL/tools/imageop/RotateScaleOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/RotateScaleOpSVGImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SVGOp.java VASSAL-src/trunk/src/VASSAL/tools/imageop/ScaleOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/ScaleOpTiledBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SourceOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SourceOpDiskCacheBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SourceOpSVGImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SourceTileOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/SourceTileOpSVGImpl.java VASSAL-src/trunk/src/VASSAL/tools/imports/ImportAction.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java VASSAL-src/trunk/src/VASSAL/tools/io/FileArchive.java VASSAL-src/trunk/src/VASSAL/tools/io/FileStore.java VASSAL-src/trunk/src/VASSAL/tools/io/InputOutputStreamPump.java VASSAL-src/trunk/src/VASSAL/tools/io/ProcessCallable.java VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java VASSAL-src/trunk/src/VASSAL/tools/io/TempFileManager.java VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageDispatcher.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageReceiver.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java VASSAL-src/trunk/src/VASSAL/tools/ipc/SimpleIPCMessage.java VASSAL-src/trunk/src/VASSAL/tools/logging/CommandClientAdapter.java VASSAL-src/trunk/src/VASSAL/tools/logging/LogOutputStreamAdapter.java VASSAL-src/trunk/src/VASSAL/tools/logging/LogPane.java VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/CheckBoxMenuItemProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuItemProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuMarker.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuScroller.java VASSAL-src/trunk/src/VASSAL/tools/opcache/AbstractOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java VASSAL-src/trunk/src/VASSAL/tools/swing/AboutWindow.java VASSAL-src/trunk/src/VASSAL/tools/swing/DetailsButton.java VASSAL-src/trunk/src/VASSAL/tools/swing/DetailsDialog.java VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java VASSAL-src/trunk/src/VASSAL/tools/swing/EDTRunnableFuture.java VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java VASSAL-src/trunk/src/VASSAL/tools/swing/Progressor.java VASSAL-src/trunk/src/VASSAL/tools/version/SimpleVersionTokenizer.java VASSAL-src/trunk/src/VASSAL/tools/version/UpdateCheckAction.java VASSAL-src/trunk/src/VASSAL/tools/version/VassalVersionTokenizer.java VASSAL-src/trunk/src/VASSAL/tools/version/Version.java Modified: VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -49,6 +49,7 @@ * Build this component by getting all XML attributes of the XML element and * calling {@link #setAttribute} with the String value of the attribute */ + @Override public void build(Element e) { if (e != null) { final NamedNodeMap n = e.getAttributes(); @@ -164,6 +165,7 @@ } } + @Override public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc) { Element el = doc.createElement(getClass().getName()); String[] names = getAttributeNames(); @@ -183,6 +185,7 @@ /** * Add a Buildable object to this object */ + @Override public void add(Buildable b) { buildComponents.add(b); } @@ -210,6 +213,7 @@ return Collections.unmodifiableList(buildComponents); } + @Override public void validate(Buildable target, ValidationReport report) { if (validator != null) { validator.validate(target, report); @@ -224,6 +228,7 @@ /** * Default implementation of PropertyNameSource - No properties exposed */ + @Override public List<String> getPropertyNames() { return new ArrayList<>(); } Modified: VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -42,10 +42,12 @@ /** * Remove a Buildable object from this object */ + @Override public void remove(Buildable b) { buildComponents.remove(b); } + @Override public String getConfigureName() { return name; } @@ -79,6 +81,7 @@ * Properties window for this object. The order of descriptions should be the same as the order of names in * {@link AbstractBuildable#getAttributeNames} */ + @Override public abstract String[] getAttributeDescriptions(); /** @@ -87,6 +90,7 @@ * * The order of classes should be the same as the order of names in {@link AbstractBuildable#getAttributeNames} */ + @Override public abstract Class<?>[] getAttributeTypes(); /** @@ -95,6 +99,7 @@ * @param name * @return */ + @Override public VisibilityCondition getAttributeVisibility(String name) { return null; } @@ -102,6 +107,7 @@ /** * Return the i18n data for this component */ + @Override public ComponentI18nData getI18nData() { if (myI18nData == null) { myI18nData = new ComponentI18nData(this, getI18nPrefix()); @@ -135,6 +141,7 @@ /** * Set the owning translatable of this component */ + @Override public void add(Buildable b) { super.add(b); if (b instanceof Translatable) { @@ -142,6 +149,7 @@ } } + @Override public void addPropertyChangeListener(PropertyChangeListener l) { if (changeSupport == null) { changeSupport = new PropertyChangeSupport(this); @@ -155,6 +163,7 @@ } } + @Override public Configurable[] getConfigureComponents() { final ArrayList<Configurable> l = new ArrayList<>(); for (Buildable b : getBuildables()) { @@ -168,6 +177,7 @@ /** * The default {@link Configurer} of an {@link AbstractConfigurable} class is an instance of {@link AutoConfigurer} */ + @Override public Configurer getConfigurer() { if (config == null) { config = new AutoConfigurer(this); Modified: VASSAL-src/trunk/src/VASSAL/build/AutoConfigurable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AutoConfigurable.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/AutoConfigurable.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -42,6 +42,7 @@ * String value read by the XML attribute. * Can also be called with Object value to set the attribute. */ + @Override public void setAttribute(String key, Object value); /** @@ -48,6 +49,7 @@ * Called by the {@link #getBuildElement} method to write the * attributes into an XML element */ + @Override public String getAttributeValueString(String key); /** Modified: VASSAL-src/trunk/src/VASSAL/build/GameModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -143,6 +143,7 @@ protected MutablePropertiesContainer propsContainer = new Impl(); protected PropertyChangeListener repaintOnPropertyChange = new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { for (Map map : Map.getMapList()) { map.repaint(); @@ -208,6 +209,7 @@ frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { quit(); } @@ -230,6 +232,7 @@ */ protected abstract void build() throws IOException; + @Override public void setAttribute(String name, Object value) { if (MODULE_NAME.equals(name)) { if (Localization.getInstance().isTranslationInProgress()) { @@ -264,6 +267,7 @@ } } + @Override public String getAttributeValueString(String name) { if (MODULE_NAME.equals(name)) { return gameName; @@ -301,6 +305,7 @@ return Info.compareVersions(v1, v2); } + @Override public void addTo(Buildable b) { } @@ -308,13 +313,16 @@ return Resources.getString("Editor.GameModule.component_type"); //$NON-NLS-1$ } + @Override public void removeFrom(Buildable parent) { } + @Override public HelpFile getHelpFile() { return HelpFile.getReferenceManualPage("GameModule.htm"); //$NON-NLS-1$ } + @Override public String[] getAttributeNames() { return new String[]{ MODULE_NAME, @@ -325,6 +333,7 @@ }; } + @Override public String[] getAttributeDescriptions() { return new String[]{ Resources.getString("Editor.GameModule.name_label"), //$NON-NLS-1$ @@ -333,6 +342,7 @@ }; } + @Override public Class<?>[] getAttributeTypes() { return new Class<?>[]{ String.class, @@ -341,6 +351,7 @@ }; } + @Override public Class<?>[] getAllowableConfigureComponents() { return new Class<?>[]{ Map.class, @@ -574,6 +585,7 @@ * Uses the registered {@link CommandEncoder}s * to decode a String into a {@link Command}. */ + @Override public Command decode(String command) { if (command == null) { return null; @@ -593,6 +605,7 @@ /** * Uses the registered {@link CommandEncoder}s to encode a {@link Command} into a String object */ + @Override public String encode(Command c) { if (c == null) { return null; @@ -646,6 +659,7 @@ /** * @return the JToolBar of the command window */ + @Override public JToolBar getToolBar() { return frame.getToolBar(); } @@ -891,14 +905,17 @@ lastSavedConfiguration = buildString(); } + @Override public String generateGpId() { return String.valueOf(nextGpId++); } + @Override public int getNextGpId() { return nextGpId; } + @Override public void setNextGpId(int id) { nextGpId = id; } @@ -1023,6 +1040,7 @@ /** * Return values of Global properties */ + @Override public Object getProperty(Object key) { if (GlobalOptions.PLAYER_SIDE.equals(key) || GlobalOptions.PLAYER_SIDE_ALT.equals(key)) { String mySide = PlayerRoster.getMySide(); @@ -1038,15 +1056,18 @@ return p == null ? null : p.getPropertyValue(); } + @Override public MutableProperty getMutableProperty(String name) { return propsContainer.getMutableProperty(name); } + @Override public void addMutableProperty(String key, MutableProperty p) { propsContainer.addMutableProperty(key, p); p.addMutablePropertyChangeListener(repaintOnPropertyChange); } + @Override public MutableProperty removeMutableProperty(String key) { MutableProperty p = propsContainer.removeMutableProperty(key); if (p != null) { @@ -1055,10 +1076,12 @@ return p; } + @Override public String getMutablePropertiesContainerId() { return "Module"; } + @Override public Object getLocalizedProperty(Object key) { if (GlobalOptions.PLAYER_SIDE.equals(key) || GlobalOptions.PLAYER_SIDE_ALT.equals(key)) { String mySide = PlayerRoster.getMyLocalizedSide(); @@ -1097,6 +1120,7 @@ } } + @Override public ComponentI18nData getI18nData() { ComponentI18nData myI18nData = super.getI18nData(); myI18nData.setAttributeTranslatable(MODULE_VERSION, false); Modified: VASSAL-src/trunk/src/VASSAL/build/Widget.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/Widget.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/Widget.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -50,6 +50,7 @@ * The Widget is built from the stored element by invoking {@link #rebuild}. * Subclasses should invoke {@link #rebuild} before invoking {@link #getComponent} */ + @Override public void build(Element el) { buildElement = el; if (el != null) { @@ -73,6 +74,7 @@ } } + @Override public Element getBuildElement(Document doc) { rebuild(); return super.getBuildElement(doc); @@ -82,14 +84,17 @@ * The allowable Configurable components of a Widget are the same * as its parent */ + @Override public Class<?>[] getAllowableConfigureComponents() { return parent.getAllowableConfigureComponents(); } + @Override public void addTo(Buildable b) { parent = (Widget) b; } + @Override public void removeFrom(Buildable b) { } @@ -97,6 +102,7 @@ return parent; } + @Override public Configurable[] getConfigureComponents() { rebuild(); return super.getConfigureComponents(); @@ -109,6 +115,7 @@ */ public abstract java.awt.Component getComponent(); + @Override public HelpFile getHelpFile() { return null; } @@ -116,6 +123,7 @@ public static class MyCellRenderer extends javax.swing.DefaultListCellRenderer { private static final long serialVersionUID = 1L; + @Override public java.awt.Component getListCellRendererComponent (javax.swing.JList list, Object value, Modified: VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -98,26 +98,31 @@ public BasicCommandEncoder() { basicFactories.put(Stack.TYPE, new BasicPieceFactory() { + @Override public GamePiece createBasicPiece(String type) { return new Stack(); } }); basicFactories.put(BasicPiece.ID, new BasicPieceFactory() { + @Override public GamePiece createBasicPiece(String type) { return new BasicPiece(type); } }); basicFactories.put(Deck.ID, new BasicPieceFactory() { + @Override public GamePiece createBasicPiece(String type) { return new Deck(type); } }); decoratorFactories.put(Immobilized.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Immobilized(inner, type); } }); decoratorFactories.put(Embellishment.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { final Embellishment e = new Embellishment(type, inner); if (e.getVersion() == Embellishment.BASE_VERSION) { @@ -127,166 +132,199 @@ } }); decoratorFactories.put(Embellishment.OLD_ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Embellishment(type, inner); } }); decoratorFactories.put(Hideable.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Hideable(type, inner); } }); decoratorFactories.put(Obscurable.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Obscurable(type, inner); } }); decoratorFactories.put(Labeler.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Labeler(type, inner); } }); decoratorFactories.put(TableInfo.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new TableInfo(type, inner); } }); decoratorFactories.put(PropertySheet.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new PropertySheet(type, inner); } }); decoratorFactories.put(FreeRotator.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new FreeRotator(type, inner); } }); decoratorFactories.put(Pivot.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Pivot(type, inner); } }); decoratorFactories.put(NonRectangular.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new NonRectangular(type, inner); } }); decoratorFactories.put(Marker.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Marker(type, inner); } }); decoratorFactories.put(Restricted.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Restricted(type, inner); } }); decoratorFactories.put(PlaceMarker.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new PlaceMarker(type, inner); } }); decoratorFactories.put(Replace.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Replace(type, inner); } }); decoratorFactories.put(ReportState.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new ReportState(type, inner); } }); decoratorFactories.put(MovementMarkable.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new MovementMarkable(type, inner); } }); decoratorFactories.put(Footprint.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Footprint(type, inner); } }); decoratorFactories.put(ReturnToDeck.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new ReturnToDeck(type, inner); } }); decoratorFactories.put(SendToLocation.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new SendToLocation(type, inner); } }); decoratorFactories.put(UsePrototype.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new UsePrototype(type, inner); } }); decoratorFactories.put(Clone.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Clone(type, inner); } }); decoratorFactories.put(Delete.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Delete(type, inner); } }); decoratorFactories.put(SubMenu.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new SubMenu(type, inner); } }); decoratorFactories.put(Translate.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new Translate(type, inner); } }); decoratorFactories.put(AreaOfEffect.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new AreaOfEffect(type, inner); } }); decoratorFactories.put(CounterGlobalKeyCommand.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new CounterGlobalKeyCommand(type, inner); } }); decoratorFactories.put(TriggerAction.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new TriggerAction(type, inner); } }); decoratorFactories.put(DynamicProperty.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new DynamicProperty(type, inner); } }); decoratorFactories.put(CalculatedProperty.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new CalculatedProperty(type, inner); } }); decoratorFactories.put(SetGlobalProperty.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new SetGlobalProperty(type, inner); } }); decoratorFactories.put(RestrictCommands.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new RestrictCommands(type, inner); } }); decoratorFactories.put(PlaySound.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new PlaySound(type, inner); } }); decoratorFactories.put(ActionButton.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new ActionButton(type, inner); } }); decoratorFactories.put(GlobalHotKey.ID, new DecoratorFactory() { + @Override public Decorator createDecorator(String type, GamePiece inner) { return new GlobalHotKey(type, inner); } @@ -369,17 +407,21 @@ } } + @Override public void build(org.w3c.dom.Element e) { Builder.build(e, this); } + @Override public void addTo(Buildable parent) { ((GameModule) parent).addCommandEncoder(this); } + @Override public void add(Buildable b) { } + @Override public org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc) { return doc.createElement(getClass().getName()); } @@ -390,6 +432,7 @@ public static final String CHANGE = "D" + PARAM_SEPARATOR; //$NON-NLS-1$ public static final String MOVE = "M" + PARAM_SEPARATOR; //$NON-NLS-1$ + @Override public Command decode(String command) { if (command.length() == 0) { return new NullCommand(); @@ -456,6 +499,7 @@ return "null".equals(s) ? null : s; //$NON-NLS-1$ } + @Override public String encode(Command c) { SequenceEncoder se = new SequenceEncoder(PARAM_SEPARATOR); if (c instanceof AddPiece) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-25 21:44:33 UTC (rev 9421) +++ VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-25 21:47:04 UTC (rev 9422) @@ -98,6 +98,7 @@ logOutput = new ArrayList<>(); } + @Override public void build(Element e) { } /** @@ -106,6 +107,7 @@ * window toolbar. Registers {@link KeyStrokeListener}s for hotkey * equivalents of each button. */ + @Override public void addTo(Buildable b) { final GameModule mod = GameModule.getGameModule(); @@ -140,6 +142,7 @@ stepIconConfig.setValue(STEP_ICON); GlobalOptions.getInstance().addOption(stepIconConfig); stepIconConfig.addPropertyChangeListener(new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { stepAction.putValue(Action.SMALL_ICON, stepIconConfig.getIconValue()); } @@ -150,6 +153,7 @@ undoIconConfig.setValue(UNDO_ICON); GlobalOptions.getInstance().addOption(undoIconConfig); undoIconConfig.addPropertyChangeListener(new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { undoAction.putValue(Action.SMALL_ICON, undoIconConfig.getIconValue()); } @@ -159,6 +163,7 @@ final NamedHotKeyConfigurer stepKeyConfig = new NamedHotKeyConfigurer("stepHotKey", Resources.getString("BasicLogger.step_forward_hotkey"), stepKeyListener.getNamedKeyStroke()); //$NON-NLS-1$ //$NON-NLS-2$ GlobalOptions.getInstance().addOption(stepKeyConfig); stepKeyConfig.addPropertyChangeListener(new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { stepKeyListener.setKeyStroke(stepKeyConfig.getValueNamedKeyStroke()); stepAction.putValue(Action.SHORT_DESCRIPTION, Resources.getString("BasicLogger.step_forward_tooltip2", NamedHotKeyConfigurer.getString(stepKeyListener.getKeyStro... [truncated message content] |
From: <uck...@us...> - 2020-05-25 21:44:35
|
Revision: 9421 http://sourceforge.net/p/vassalengine/svn/9421 Author: uckelman Date: 2020-05-25 21:44:33 +0000 (Mon, 25 May 2020) Log Message: ----------- restored test method to fix compile error Modified Paths: -------------- VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java Modified: VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java =================================================================== --- VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java 2020-05-24 15:34:26 UTC (rev 9420) +++ VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java 2020-05-25 21:44:33 UTC (rev 9421) @@ -106,6 +106,19 @@ } } + protected Dimension size(ImageLoader loader, String file) throws IOException { + FileInputStream in = null; + try { + in = new FileInputStream(file); + final Dimension d = loader.size(file, in); + in.close(); + return d; + } + finally { + IOUtils.closeQuietly(in); + } + } + @Test public void testSizeOk() throws IOException { final ImageTypeConverter mconv = new MemoryImageTypeConverter(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:34:29
|
Revision: 9420 http://sourceforge.net/p/vassalengine/svn/9420 Author: uckelman Date: 2020-05-24 15:34:26 +0000 (Sun, 24 May 2020) Log Message: ----------- pass empty array to Collection.toArray() Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java VASSAL-src/trunk/src/VASSAL/build/module/GlobalKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java VASSAL-src/trunk/src/VASSAL/build/module/map/MassKeyCommand.java VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java VASSAL-src/trunk/src/VASSAL/chat/ServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/node/Node.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeRoom.java VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomManager.java VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java VASSAL-src/trunk/src/VASSAL/command/Command.java VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java VASSAL-src/trunk/src/VASSAL/counters/Deck.java VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java VASSAL-src/trunk/src/VASSAL/counters/Marker.java VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java VASSAL-src/trunk/src/VASSAL/i18n/Resources.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java VASSAL-src/trunk/src/VASSAL/tools/ComponentPathBuilder.java VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java Modified: VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -162,7 +162,7 @@ l.add((Configurable) b); } } - return l.toArray(new Configurable[l.size()]); + return l.toArray(new Configurable[0]); } /** Modified: VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -161,7 +161,7 @@ return null; } else { - return servers.keySet().toArray(new String[servers.size()]); + return servers.keySet().toArray(new String[0]); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/GlobalKeyCommand.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GlobalKeyCommand.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/GlobalKeyCommand.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -33,7 +33,7 @@ public void apply() { final List<Map> l = Map.getMapList(); GameModule.getGameModule().sendAndLog( - globalCommand.apply(l.toArray(new Map[l.size()]), getFilter())); + globalCommand.apply(l.toArray(new Map[0]), getFilter())); } // Hide 'This Map only' option Modified: VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -234,7 +234,7 @@ attributes.add(key); } - return attributes.toArray(new String[attributes.size()]); + return attributes.toArray(new String[0]); } public Class<?>[] getAttributeTypes() { Modified: VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -1027,7 +1027,7 @@ } public String[] getPath() { - return groups.toArray(new String[groups.size()]); + return groups.toArray(new String[0]); } public int getValue() { Modified: VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -152,7 +152,7 @@ l.add(rolls[i]); } } - DieRoll[] rolls = l.toArray(new DieRoll[l.size()]); + DieRoll[] rolls = l.toArray(new DieRoll[0]); return new RollSet(getDescription(), rolls); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -309,7 +309,7 @@ } public PlayerInfo[] getPlayers() { - return players.toArray(new PlayerInfo[players.size()]); + return players.toArray(new PlayerInfo[0]); } public void add(String playerId, String playerName, String side) { @@ -398,7 +398,7 @@ availableSides.add(0, translatedObserver); sideConfig = new StringEnumConfigurer(null, Resources.getString("PlayerRoster.join_game_as"), //$NON-NLS-1$ - availableSides.toArray(new String[availableSides.size()])); + availableSides.toArray(new String[0])); sideConfig.setValue(translatedObserver); return sideConfig.getControls(); } @@ -466,7 +466,7 @@ Resources.getString("PlayerRoster.choose_side"), //$NON-NLS-1$ JOptionPane.QUESTION_MESSAGE, null, - availableSides.toArray(new String[availableSides.size()]), + availableSides.toArray(new String[0]), translatedObserver ); @@ -549,7 +549,7 @@ super(null, null); controls = new JPanel(); controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); - sidesConfig = new StringArrayConfigurer(null, Resources.getString("Editor.PlayerRoster.sides_available"), sides.toArray(new String[sides.size()])); //$NON-NLS-1$ + sidesConfig = new StringArrayConfigurer(null, Resources.getString("Editor.PlayerRoster.sides_available"), sides.toArray(new String[0])); //$NON-NLS-1$ sidesConfig.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { sides.clear(); @@ -633,7 +633,7 @@ */ public void setAttribute(String key, Object value) { if (SIDES.equals(key)) { - untranslatedSides = sides.toArray(new String[sides.size()]); + untranslatedSides = sides.toArray(new String[0]); String[] s = StringArrayConfigurer.stringToArray((String) value); sides = new ArrayList<>(s.length); for (String item : s) { @@ -646,7 +646,7 @@ } protected String getSidesAsString() { - String[] s = sides.toArray(new String[sides.size()]); + String[] s = sides.toArray(new String[0]); return StringArrayConfigurer.arrayToString(s); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -190,7 +190,7 @@ l.remove(N_SIDES); l.add(FACES); l.add(NUMERIC); - return l.toArray(new String[l.size()]); + return l.toArray(new String[0]); } public String[] getAttributeDescriptions() { @@ -201,7 +201,7 @@ l.remove(names.indexOf(N_SIDES)); l.add(Resources.getString("Editor.RandomTextButton.faces")); //$NON-NLS-1$ l.add(Resources.getString("Editor.RandomTextButton.faces_numeric")); //$NON-NLS-1$ - return l.toArray(new String[l.size()]); + return l.toArray(new String[0]); } public Class<?>[] getAttributeTypes() { Modified: VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -130,7 +130,7 @@ public String getAttributeValueString(String key) { if (MENU_ITEMS.equals(key)) { return StringArrayConfigurer.arrayToString( - menuItems.toArray(new String[menuItems.size()])); + menuItems.toArray(new String[0])); } else if(DESCRIPTION.equals(key)) { return getConfigureName(); Modified: VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -764,7 +764,7 @@ pages.add(page); } if (!pages.isEmpty()) { - WizardPage[] wizardPages = pages.toArray(new WizardPage[pages.size()]); + WizardPage[] wizardPages = pages.toArray(new WizardPage[0]); String[] steps = new String[setupSteps.size()]; String[] desc = new String[setupSteps.size()]; for (int i = 0, n = setupSteps.size(); i < n; i++) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -240,6 +240,6 @@ } names.addAll(Arrays.asList(standardColorNames)); - return names.toArray(new String[names.size()]); + return names.toArray(new String[0]); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -155,7 +155,7 @@ for (FontStyle fs : fontStyles.values()) { names.add(fs.getConfigureName()); } - return names.toArray(new String[names.size()]); + return names.toArray(new String[0]); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -327,7 +327,7 @@ } public Configurable[] getConfigureComponents() { - return possibleBoards.toArray(new Configurable[possibleBoards.size()]); + return possibleBoards.toArray(new Configurable[0]); } public Class<?>[] getAllowableConfigureComponents() { @@ -417,7 +417,7 @@ for (Board b : possibleBoards) { s.add(b.getName()); } - return s.toArray(new String[s.size()]); + return s.toArray(new String[0]); } public String[] getAllowableLocalizedBoardNames() { @@ -425,7 +425,7 @@ for (Board b : possibleBoards) { s.add(b.getLocalizedName()); } - return s.toArray(new String[s.size()]); + return s.toArray(new String[0]); } /** Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -95,7 +95,7 @@ layer = 0; } } - return l.toArray(new GamePiece[l.size()]); + return l.toArray(new GamePiece[0]); } public GamePiece[] getAllPieces() { Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -230,7 +230,7 @@ } } } - return l.toArray(new String[l.size()]); + return l.toArray(new String[0]); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/MassKeyCommand.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/MassKeyCommand.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/MassKeyCommand.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -139,7 +139,7 @@ else { final List<Map> l = Map.getMapList(); GameModule.getGameModule().sendAndLog( - globalCommand.apply(l.toArray(new Map[l.size()]), getFilter())); + globalCommand.apply(l.toArray(new Map[0]), getFilter())); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -472,7 +472,7 @@ Arrays.asList(m2.getBoardPicker().getAllowableBoardNames())); } } - values = l.toArray(new String[l.size()]); + values = l.toArray(new String[0]); } else { values = new String[]{ANY}; Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -50,7 +50,7 @@ } public GamePiece[] getPieces() { - return pieces.toArray(new GamePiece[pieces.size()]); + return pieces.toArray(new GamePiece[0]); } public GamePiece[] getAllPieces() { Modified: VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -215,7 +215,7 @@ Map<String,ServerStatus.ModuleSummary> entries) { final ServerStatus.ModuleSummary[] e = entries.values().toArray( - new ServerStatus.ModuleSummary[entries.size()]); + new ModuleSummary[0]); Arrays.sort(e, new Comparator<>() { public int compare(ServerStatus.ModuleSummary a, ServerStatus.ModuleSummary b) { Modified: VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -112,7 +112,7 @@ catch (IOException ex) { System.err.println("IOException retrieving messages from "+getMessagesURL); //$NON-NLS-1$ } - return msgList.toArray(new Message[msgList.size()]); + return msgList.toArray(new Message[0]); } private Properties prepareInfo() { Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerStatus.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerStatus.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerStatus.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -71,7 +71,7 @@ } public Room[] getRooms() { - return rooms.values().toArray(new Room[rooms.size()]); + return rooms.values().toArray(new Room[0]); } public int numPlayers(){ Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -789,9 +789,9 @@ Set<JabberRoom> rooms = occupants.keySet(); for (JabberRoom room : rooms) { List<JabberPlayer> l = occupants.get(room); - room.setPlayers(l.toArray(new JabberPlayer[l.size()])); + room.setPlayers(l.toArray(new JabberPlayer[0])); } - Room[] roomArray = rooms.toArray(new Room[rooms.size()]); + Room[] roomArray = rooms.toArray(new Room[0]); Arrays.sort(roomArray, roomSortOrder); return roomArray; } @@ -1075,7 +1075,7 @@ catch (XMPPException e) { e.printStackTrace(); } - return entries.toArray(new ModuleSummary[entries.size()]); + return entries.toArray(new ModuleSummary[0]); } public String[] getSupportedTimeRanges() { Modified: VASSAL-src/trunk/src/VASSAL/chat/node/Node.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/Node.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/node/Node.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -156,7 +156,7 @@ public Node[] getLeafDescendants() { ArrayList<Node> l = new ArrayList<>(); addLeaves(this, l); - return l.toArray(new Node[l.size()]); + return l.toArray(new Node[0]); } private void addLeaves(Node base, List<Node> l) { @@ -176,7 +176,7 @@ public Node[] getChildren() { synchronized (children) { - return children.toArray(new Node[children.size()]); + return children.toArray(new Node[0]); } } Modified: VASSAL-src/trunk/src/VASSAL/chat/node/NodeRoom.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/NodeRoom.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/node/NodeRoom.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -79,7 +79,7 @@ */ public void setMembersToCurrentPlayers() { List<Player> l = getPlayerList(); - NodePlayer[] p = l.toArray(new NodePlayer[l.size()]); + NodePlayer[] p = l.toArray(new NodePlayer[0]); members = new String[p.length]; for (int i = 0; i < p.length; i++) { members[i] = p[i].getId(); Modified: VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -57,7 +57,7 @@ for (Node node : target) { l.addAll(Arrays.asList(node.getChildren())); } - target = l.toArray(new Node[l.size()]); + target = l.toArray(new Node[0]); } else if (childId.startsWith("~")) { //$NON-NLS-1$ childId = childId.substring(1); @@ -69,7 +69,7 @@ } } } - target = l.toArray(new Node[l.size()]); + target = l.toArray(new Node[0]); } else { int i = 0; Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClient.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/P2PClient.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -126,8 +126,7 @@ public void sendToOthers(String msg) { if (isConnected()) { final Room myRoom = getRoom(); - final Player[] pl = myRoom.getPlayerList().toArray( - new Player[myRoom.getPlayerList().size()]); + final Player[] pl = myRoom.getPlayerList().toArray(new Player[0]); for (Player p : pl) { if (!p.equals(me)) { final ActivePeer peer = Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomManager.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomManager.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -84,7 +84,7 @@ } public Room[] getRooms() { - return rooms.toArray(new Room[rooms.size()]); + return rooms.toArray(new Room[0]); /* // System.err.println("--------"); Room[] r = new Room[rooms.size()]; Modified: VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -293,7 +293,7 @@ // append the number of players to each room name r.setName(r.getName() + " (" + l.size() + ")"); - children = l.toArray(new Player[l.size()]); + children = l.toArray(new Player[0]); } final DefaultMutableTreeNode node = new DefaultMutableTreeNode(o); Modified: VASSAL-src/trunk/src/VASSAL/command/Command.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/command/Command.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/command/Command.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -42,7 +42,7 @@ public Command() {} public Command[] getSubCommands() { - return seq.toArray(new Command[seq.size()]); + return seq.toArray(new Command[0]); } /** Modified: VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -138,7 +138,7 @@ l.add(value); } } - return l.toArray(new KeyStroke[l.size()]); + return l.toArray(new KeyStroke[0]); } public static KeyStroke[] decode(String s) { @@ -150,7 +150,7 @@ while (st.hasMoreTokens()) { l.add(HotKeyConfigurer.decode(st.nextToken())); } - return l.toArray(new KeyStroke[l.size()]); + return l.toArray(new KeyStroke[0]); } public static String encode(KeyStroke[] keys) { Modified: VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -138,7 +138,7 @@ l.add(value); } } - return l.toArray(new NamedKeyStroke[l.size()]); + return l.toArray(new NamedKeyStroke[0]); } public static NamedKeyStroke[] decode(String s) { @@ -153,7 +153,7 @@ l.add(NamedHotKeyConfigurer.decode(token)); } } - return l.toArray(new NamedKeyStroke[l.size()]); + return l.toArray(new NamedKeyStroke[0]); } public static String encode(NamedKeyStroke[] keys) { Modified: VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -216,7 +216,7 @@ while (st.hasMoreTokens()) { l.add(st.nextToken()); } - return l.toArray(new String[l.size()]); + return l.toArray(new String[0]); } protected void updateModel() { Modified: VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -352,7 +352,7 @@ if (deleteKey > 0) { l.add(new KeyCommand("Delete", KeyStroke.getKeyStroke(deleteKey, InputEvent.CTRL_MASK), target)); } - commands = l.toArray(new KeyCommand[l.size()]); + commands = l.toArray(new KeyCommand[0]); } final GamePiece outer = Decorator.getOutermost(this); boolean canAdjustPosition = outer.getMap() != null && outer.getParent() != null && outer.getParent().topPiece() != getParent().bottomPiece(); Modified: VASSAL-src/trunk/src/VASSAL/counters/Deck.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Deck.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/Deck.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -1122,7 +1122,7 @@ l.add(cmd.getKeyCommand(this)); } - commands = l.toArray(new KeyCommand[l.size()]); + commands = l.toArray(new KeyCommand[0]); } for (KeyCommand command : commands) { Modified: VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -97,8 +97,7 @@ key = sd.nextToken("name"); decodeConstraints(sd.nextToken("")); keyCommandListConfig.setValue(sd.nextToken("")); - keyCommands = keyCommandListConfig.getListValue().toArray( - new DynamicKeyCommand[keyCommandListConfig.getListValue().size()]); + keyCommands = keyCommandListConfig.getListValue().toArray(new DynamicKeyCommand[0]); final ArrayList<DynamicKeyCommand> l = new ArrayList<>(); for (DynamicKeyCommand dkc : keyCommands) { @@ -107,7 +106,7 @@ } } - menuCommands = l.toArray(new KeyCommand[l.size()]); + menuCommands = l.toArray(new KeyCommand[0]); } protected void decodeConstraints(String s) { Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -598,7 +598,7 @@ // end random layers } - commands = l.toArray(new KeyCommand[l.size()]); + commands = l.toArray(new KeyCommand[0]); } if (up != null) { @@ -1338,8 +1338,8 @@ .append(drawUnderneath.isSelected()) .append(xOffInput.getText()) .append(yOffInput.getText()) - .append(imageNames.toArray(new String[imageNames.size()])) - .append(commonNames.toArray(new String[commonNames.size()])) + .append(imageNames.toArray(new String[0])) + .append(commonNames.toArray(new String[0])) .append(loop.isSelected()) .append(nameConfig.getValueString()) .append(rndKeyConfig.getValueString()) Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -476,7 +476,7 @@ l.add(new KeyCommand(rndText, rndKey, outer, this)); } // end random layers - commands = l.toArray(new KeyCommand[l.size()]); + commands = l.toArray(new KeyCommand[0]); } if (up != null) { up.setEnabled(loopLevels || Math.abs(value) < imageName.length); @@ -1120,8 +1120,8 @@ .append(drawUnderneath.isSelected()) .append(xOffInput.getText()) .append(yOffInput.getText()) - .append(imageNames.toArray(new String[imageNames.size()])) - .append(commonNames.toArray(new String[commonNames.size()])) + .append(imageNames.toArray(new String[0])) + .append(commonNames.toArray(new String[0])) .append(loop.isSelected()) .append(name.getText()) .append((KeyStroke) rndKeyConfig.getValue()) Modified: VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -437,7 +437,7 @@ l.add(rotateRNDCommand); } // end for random rotate - commands = l.toArray(new KeyCommand[l.size()]); + commands = l.toArray(new KeyCommand[0]); } setAngleCommand.setEnabled(getMap() != null && validAngles.length == 1 && Modified: VASSAL-src/trunk/src/VASSAL/counters/Marker.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Marker.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/Marker.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -67,7 +67,7 @@ while (st.hasMoreTokens()) { l.add(st.nextToken()); } - keys = l.toArray(new String[l.size()]); + keys = l.toArray(new String[0]); values = new String[keys.length]; Arrays.fill(values, ""); } Modified: VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -454,7 +454,7 @@ l.add(peek); } - commandsWithPeek = l.toArray(new KeyCommand[l.size()]); + commandsWithPeek = l.toArray(new KeyCommand[0]); return obscuredToOthers() && isMaskable() && Modified: VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -141,7 +141,7 @@ newCommands.add(command); } } - commands = newCommands.toArray(new KeyCommand[newCommands.size()]); + commands = newCommands.toArray(new KeyCommand[0]); } return commands; } Modified: VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -182,7 +182,7 @@ if (backCommandName.length() > 0 && backKey != null && !backKey.isNull()) { l.add(backCommand); } - command = l.toArray(new KeyCommand[l.size()]); + command = l.toArray(new KeyCommand[0]); } for (KeyCommand c : command ) { Modified: VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -92,7 +92,7 @@ decodeConstraints(sd.nextToken("")); keyCommandListConfig.setValue(sd.nextToken("")); keyCommands = keyCommandListConfig.getListValue().toArray( - new DynamicKeyCommand[keyCommandListConfig.getListValue().size()]); + new DynamicKeyCommand[0]); ArrayList<DynamicKeyCommand> l = new ArrayList<>(); for (DynamicKeyCommand dkc : keyCommands) { if (dkc.getName() != null && dkc.getName().length() > 0) { @@ -99,7 +99,7 @@ l.add(dkc); } } - menuCommands = l.toArray(new DynamicKeyCommand[l.size()]); + menuCommands = l.toArray(new DynamicKeyCommand[0]); description = sd.nextToken(""); propertyLevel = sd.nextToken(CURRENT_ZONE); searchName = sd.nextToken(""); Modified: VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -102,7 +102,7 @@ for (Iterator<String> i = keyCommandSubMenu.getCommands(); i.hasNext(); ) { l.add(i.next()); } - return l.toArray(new String[l.size()]); + return l.toArray(new String[0]); } public String getMenuName() { Modified: VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -146,7 +146,7 @@ sortedLangs.add(lang); } Collections.sort(sortedLangs, Collator.getInstance(Locale.getDefault())); - languageList = sortedLangs.toArray(new String[sortedLangs.size()]); + languageList = sortedLangs.toArray(new String[0]); } return languageList; } @@ -165,7 +165,7 @@ Collator.getInstance(Locale.getDefault())); countries.put(ANY_COUNTRY, ""); sortedCountries.add(0, ANY_COUNTRY); - countryList = sortedCountries.toArray(new String[sortedCountries.size()]); + countryList = sortedCountries.toArray(new String[0]); } return countryList; } Modified: VASSAL-src/trunk/src/VASSAL/i18n/Resources.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/i18n/Resources.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/i18n/Resources.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -116,7 +116,10 @@ } setInstanceLocale(myLocale); - final StringEnumConfigurer localeConfig = new StringEnumConfigurer(Resources.LOCALE_PREF_KEY, getInstanceString("Prefs.language"), languages.toArray(new String[languages.size()])) { + final StringEnumConfigurer localeConfig = new StringEnumConfigurer( + Resources.LOCALE_PREF_KEY, + getInstanceString("Prefs.language"), + languages.toArray(new String[0])) { public Component getControls() { if (box == null) { final Component c = super.getControls(); @@ -172,7 +175,7 @@ ArrayList<String> valid = new ArrayList<>(Arrays .asList(config.getValidValues())); valid.add(0, l.getLanguage()); - config.setValidValues(valid.toArray(new String[valid.size()])); + config.setValidValues(valid.toArray(new String[0])); } } } Modified: VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -176,7 +176,7 @@ ((VassalTranslation) target).clearProperties(); ArrayList<String> keyList = new ArrayList<>(Resources.getVassalKeys()); Collections.sort(keyList); - keys = keyList.toArray(new String[keyList.size()]); + keys = keyList.toArray(new String[0]); copyButtons = new CopyButton[keys.length]; ((MyTableModel) keyTable.getModel()).update(); } Modified: VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -472,7 +472,7 @@ al.addAll(Arrays.asList(lr.toArgs())); - final String[] args = al.toArray(new String[al.size()]); + final String[] args = al.toArray(new String[0]); // try to start a child process with the given heap sizes args[1] = "-Xms" + initialHeap + "M"; Modified: VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -145,7 +145,7 @@ args.add(importFile.getPath()); } - return args.toArray(new String[args.size()]); + return args.toArray(new String[0]); } // FIXME: translate this somehow? Modified: VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -804,7 +804,7 @@ (ModuleInfo) (rootNode.getChild(i)).getNodeInfo(); l.add(module.encode()); } - recentModuleConfig.setValue(l.toArray(new String[l.size()])); + recentModuleConfig.setValue(l.toArray(new String[0])); modulePanelLayout.show( moduleView, getModuleCount() == 0 ? "quickStart" : "modules"); } Modified: VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -207,7 +207,7 @@ null, outP, errP, - args.toArray(new String[args.size()]) + args.toArray(new String[0]) ); // write the image paths to child's stdin, one per line Modified: VASSAL-src/trunk/src/VASSAL/tools/ComponentPathBuilder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ComponentPathBuilder.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/tools/ComponentPathBuilder.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -73,7 +73,7 @@ SequenceEncoder.Decoder st = new SequenceEncoder.Decoder(id, '/'); addToPath(GameModule.getGameModule(), st, list); } - return list.toArray(new Configurable[list.size()]); + return list.toArray(new Configurable[0]); } private void addToPath(Configurable parent, Modified: VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -338,7 +338,7 @@ public String[] getImageNames() { final SortedSet<String> s = getImageNameSet(); - return s.toArray(new String[s.size()]); + return s.toArray(new String[0]); } public SortedSet<String> getImageNameSet() { Modified: VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -122,7 +122,7 @@ p.setProperty(clone.getType(), ComponentPathBuilder.getInstance().getId( - l.toArray(new Configurable[l.size()]))); + l.toArray(new Configurable[0]))); } else { final Configurable[] children = last.getConfigureComponents(); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -99,7 +99,7 @@ IOUtils.closeQuietly(stdin); } - final String[] ipaths = pl.toArray(new String[pl.size()]); + final String[] ipaths = pl.toArray(new String[0]); // TODO: Determine what the optimal number of threads is. final Runtime runtime = Runtime.getRuntime(); Modified: VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java 2020-05-24 15:34:05 UTC (rev 9419) +++ VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java 2020-05-24 15:34:26 UTC (rev 9420) @@ -87,7 +87,7 @@ } public ChildProxy<?>[] getChildren() { - return children.toArray(new ChildProxy<?>[children.size()]); + return children.toArray(new ChildProxy<?>[0]); } public ChildProxy<?> getChild(int pos) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:34:08
|
Revision: 9419 http://sourceforge.net/p/vassalengine/svn/9419 Author: uckelman Date: 2020-05-24 15:34:05 +0000 (Sun, 24 May 2020) Log Message: ----------- Remove workarounds for broken things in Java 5, which we no longer support. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileChooser.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java Removed Paths: ------------- VASSAL-src/trunk/src/VASSAL/tools/image/PNGChunkSkipInputStream.java VASSAL-src/trunk/test/VASSAL/tools/image/PNGChunkSkipInputStreamTest.java VASSAL-src/trunk/test/VASSAL/tools/image/iTXt.png VASSAL-src/trunk/test/VASSAL/tools/image/no-iTXt.png Modified: VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileChooser.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileChooser.java 2020-05-24 15:33:57 UTC (rev 9418) +++ VASSAL-src/trunk/src/VASSAL/tools/filechooser/FileChooser.java 2020-05-24 15:34:05 UTC (rev 9419) @@ -300,31 +300,11 @@ this.title = title; } - // - // On Java 1.5, we cannot create parentless Dialogs. Instead, we make - // a single global hidden Frame to be the parent of all such orphans. - // This can be removed when we stop supporting Java 1.5. - // - protected static final boolean isJava15; - protected static final Frame dummy; - - static { - final String jvmver = System.getProperty("java.version"); - isJava15 = jvmver == null || jvmver.startsWith("1.5"); - dummy = isJava15 ? new Frame() : null; - } - protected FileDialog awt_file_dialog_init(Component parent) { final FileDialog fd; if (parent == null) { - if (isJava15) { - // Parentless Dialogs throw IllegalArgumentException with Java 1.5. - fd = new FileDialog(dummy, title); - } - else { - fd = new FileDialog((Frame) null, title); - } + fd = new FileDialog((Frame) null, title); } else if (parent instanceof Dialog) { fd = new FileDialog((Dialog) parent, title); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:33:57 UTC (rev 9418) +++ VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:34:05 UTC (rev 9419) @@ -26,9 +26,7 @@ import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; -import java.util.Collections; import java.util.Iterator; -import java.util.Set; import javax.imageio.ImageIO; import javax.imageio.ImageReader; @@ -65,18 +63,6 @@ this.tconv = tconv; } - // Used to indicate whether this version of Java has the PNG iTXt bug. - // This can be removed once we no longer support Java 1.5. - protected static final boolean iTXtBug; - - static { - final String jvmver = System.getProperty("java.version"); - iTXtBug = jvmver == null || jvmver.startsWith("1.5"); - } - - protected static final Set<Integer> skip_iTXt = - Collections.singleton(PNGDecoder.iTXt); - // Used to indicate whether this version of Java has the JPEG color // correction bug. protected static final boolean YCbCrBug; @@ -170,7 +156,6 @@ // ImageIO fails on the following types of images: // // Sun Bug 6788458: 8-bit/channel color type 2 (RGB) PNGs with tRNS chunks - // Sun Bug 6541476: PNGs with iTXt chunks on Java 1.5 // Sun Bug 6444360: JPEGs with corrupt color profiles // Sun Bug 6404011: JPEGs with corrupt color profiles on Java 1.5 // Sun Bug 4712797: YCbCr JPEGs with no JFIF marker @@ -258,14 +243,6 @@ (ch.data[5] & 0xff); } } - - if (iTXtBug) { - // Filter out iTXt chunks on JVMs with the iTXt bug. - rin.reset(); - rin = new RereadableInputStream( - new PNGChunkSkipInputStream(skip_iTXt, rin)); - rin.mark(1); - } } } else if (YCbCrBug) { Deleted: VASSAL-src/trunk/src/VASSAL/tools/image/PNGChunkSkipInputStream.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/PNGChunkSkipInputStream.java 2020-05-24 15:33:57 UTC (rev 9418) +++ VASSAL-src/trunk/src/VASSAL/tools/image/PNGChunkSkipInputStream.java 2020-05-24 15:34:05 UTC (rev 9419) @@ -1,139 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2009 by Joel Uckelman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License (LGPL) as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, copies are available - * at http://www.opensource.org. - */ - -package VASSAL.tools.image; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Set; - -class PNGChunkSkipInputStream extends InputStream { - - public PNGChunkSkipInputStream(Set<Integer> skip, InputStream in) - throws IOException { - this.skip = skip; - this.in = new DataInputStream(in); - - if (!PNGDecoder.decodeSignature(this.in)) throw new IOException(); - - bout = new ByteArrayOutputStream(); - out = new DataOutputStream(bout); - - out.writeLong(PNGDecoder.sig); - flipBuffer(); - } - - protected final Set<Integer> skip; - - protected final DataInputStream in; - - protected ByteArrayInputStream bin; - protected final ByteArrayOutputStream bout; - protected final DataOutputStream out; - - protected boolean seenIEND = false; - - public int available() throws IOException { - return bin.available(); - } - - public void close() throws IOException { - in.close(); - } - - public void mark(int readlimit) {} - - public boolean markSupported() { - return false; - } - - public int read() throws IOException { - final byte[] b = new byte[1]; - return read(b) == -1 ? -1 : b[0]; - } - - public int read(byte[] b) throws IOException { - return read(b, 0, b.length); - } - - public int read(byte[] b, int off, int len) throws IOException { - int ret = bin.read(b, off, len); - - if (ret == -1 && !seenIEND) { - PNGDecoder.Chunk ch; - - do { - ch = PNGDecoder.decodeChunk(in); - if (ch.type == PNGDecoder.IEND) seenIEND = true; - } while (skip.contains(ch.type)); - - encodeChunk(ch); - flipBuffer(); - - ret = bin.read(b, off, len); - } - - return ret; - } - - protected void encodeChunk(PNGDecoder.Chunk ch) throws IOException { - // write chunk data length - out.writeInt(ch.data.length); - - // write chunk type - out.writeInt(ch.type); - - // write data - out.write(ch.data); - - // write checksum - out.writeInt((int) ch.crc); - } - - protected void flipBuffer() throws IOException { - out.flush(); - bin = new ByteArrayInputStream(bout.toByteArray()); - bout.reset(); - } - - public void reset() throws IOException { - throw new IOException(); - } - - public long skip(long n) throws IOException { - throw new IOException(); - } - -/* - public static void main(String[] args) throws Exception { - - final InputStream fin = new PNGChunkSkipInputStream( - java.util.Collections.singleton(PNGDecoder.iTXt), - new java.io.FileInputStream("iTXt.png") - ); - - VASSAL.tools.io.IOUtils.copy(fin, System.out); - fin.close(); - } -*/ -} Modified: VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java =================================================================== --- VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java 2020-05-24 15:33:57 UTC (rev 9418) +++ VASSAL-src/trunk/test/VASSAL/tools/image/ImageIOImageLoaderTest.java 2020-05-24 15:34:05 UTC (rev 9419) @@ -107,34 +107,6 @@ } @Test - public void testLoad_iTXTBug() throws IOException { - final String efile = "test/VASSAL/tools/image/no-iTXt.png"; - final String afile = "test/VASSAL/tools/image/iTXt.png"; - - final ImageTypeConverter mconv = new MemoryImageTypeConverter(); - final ImageIOImageLoader loader = new ImageIOImageLoader(mconv); - - final BufferedImage expected = read(loader, efile); - final BufferedImage actual = read(loader, afile); - - assertEquals(BufferedImage.TYPE_INT_ARGB, actual.getType()); - assertImageContentEquals(expected, actual); - } - - protected Dimension size(ImageLoader loader, String file) throws IOException { - FileInputStream in = null; - try { - in = new FileInputStream(file); - final Dimension d = loader.size(file, in); - in.close(); - return d; - } - finally { - IOUtils.closeQuietly(in); - } - } - - @Test public void testSizeOk() throws IOException { final ImageTypeConverter mconv = new MemoryImageTypeConverter(); final ImageIOImageLoader loader = new ImageIOImageLoader(mconv); Deleted: VASSAL-src/trunk/test/VASSAL/tools/image/PNGChunkSkipInputStreamTest.java =================================================================== --- VASSAL-src/trunk/test/VASSAL/tools/image/PNGChunkSkipInputStreamTest.java 2020-05-24 15:33:57 UTC (rev 9418) +++ VASSAL-src/trunk/test/VASSAL/tools/image/PNGChunkSkipInputStreamTest.java 2020-05-24 15:34:05 UTC (rev 9419) @@ -1,42 +0,0 @@ -package VASSAL.tools.image; - -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Collections; - -import VASSAL.tools.io.IOUtils; - -import org.junit.*; -import static org.junit.Assert.*; - -/** - * @author Joel Uckelman - * @since 3.2.0 - */ -public class PNGChunkSkipInputStreamTest { - private static String iTXt = "test/VASSAL/tools/image/iTXt.png"; - private static String no_iTXt = "test/VASSAL/tools/image/no-iTXt.png"; - - /** - * Tests whether iTXt chunks are successfully skipped without losing - * any other image data. - */ - @Test - public void testSkipiTXt() throws IOException { - - final InputStream ein = new FileInputStream(no_iTXt); - final byte[] expected = IOUtils.toByteArray(ein); - ein.close(); - - final InputStream rin = - new PNGChunkSkipInputStream(Collections.singleton(PNGDecoder.iTXt), - new BufferedInputStream(new FileInputStream(iTXt)) - ); - final byte[] result = IOUtils.toByteArray(rin); - rin.close(); - - assertArrayEquals(expected, result); - } -} Deleted: VASSAL-src/trunk/test/VASSAL/tools/image/iTXt.png =================================================================== (Binary files differ) Deleted: VASSAL-src/trunk/test/VASSAL/tools/image/no-iTXt.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:34:00
|
Revision: 9418 http://sourceforge.net/p/vassalengine/svn/9418 Author: uckelman Date: 2020-05-24 15:33:57 +0000 (Sun, 24 May 2020) Log Message: ----------- Cleanup. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java Modified: VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:33:51 UTC (rev 9417) +++ VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:33:57 UTC (rev 9418) @@ -191,7 +191,8 @@ refresh(model, get()); fireSelectionChanged(); } - } catch (InterruptedException ex) { + } + catch (InterruptedException ex) { ErrorDialog.bug(ex); } // FIXME: review error message This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:33:54
|
Revision: 9417 http://sourceforge.net/p/vassalengine/svn/9417 Author: uckelman Date: 2020-05-24 15:33:51 +0000 (Sun, 24 May 2020) Log Message: ----------- removed unused imports Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/node/PlayerNode.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/DirectPeerPool.java VASSAL-src/trunk/src/VASSAL/configure/IconConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java VASSAL-src/trunk/src/VASSAL/launch/EditorWindow.java VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java VASSAL-src/trunk/src/VASSAL/tools/Mp3AudioClip.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/FileArchiveImageTiler.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java VASSAL-src/trunk/src/VASSAL/tools/menu/MacOSXMenuManager.java VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -52,7 +52,6 @@ import VASSAL.Info; import VASSAL.build.GameModule; -import VASSAL.build.module.map.PieceCollection; import VASSAL.build.module.metadata.AbstractMetaData; import VASSAL.build.module.metadata.MetaDataFactory; import VASSAL.build.module.metadata.SaveMetaData; Modified: VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -22,7 +22,6 @@ import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; -import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.HierarchyEvent; Modified: VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.Properties; import javax.swing.JComponent; Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -26,7 +26,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.Properties; import javax.swing.ButtonGroup; Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -25,7 +25,6 @@ import java.beans.PropertyChangeSupport; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -27,7 +27,6 @@ import javax.swing.JTree; import VASSAL.build.GameModule; -import VASSAL.chat.ChatServerConnection; import VASSAL.chat.HybridClient; import VASSAL.chat.Room; import VASSAL.chat.ui.ChatServerControls; Modified: VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -23,7 +23,6 @@ import javax.swing.AbstractAction; import javax.swing.JPopupMenu; -import VASSAL.chat.ChatServerConnection; import VASSAL.chat.HybridClient; import VASSAL.chat.Room; import VASSAL.chat.ui.LockableRoomControls; Modified: VASSAL-src/trunk/src/VASSAL/chat/node/PlayerNode.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/PlayerNode.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/node/PlayerNode.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -23,7 +23,6 @@ import java.io.IOException; import java.net.Socket; -import java.util.Iterator; import java.util.Properties; import VASSAL.tools.SequenceEncoder; Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/DirectPeerPool.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/DirectPeerPool.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/DirectPeerPool.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -18,7 +18,6 @@ */ package VASSAL.chat.peer2peer; -import java.awt.Color; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; Modified: VASSAL-src/trunk/src/VASSAL/configure/IconConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/IconConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/configure/IconConfigurer.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -22,7 +22,6 @@ import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; -import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; Modified: VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -28,7 +28,6 @@ import java.util.ArrayList; import javax.swing.Box; -import javax.swing.BoxLayout; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JFrame; Modified: VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -42,7 +42,6 @@ import VASSAL.configure.BooleanConfigurer; import VASSAL.configure.FormattedExpressionConfigurer; import VASSAL.configure.FormattedStringConfigurer; -import VASSAL.configure.IntConfigurer; import VASSAL.configure.NamedHotKeyConfigurer; import VASSAL.configure.NamedKeyStrokeArrayConfigurer; import VASSAL.configure.PropertyExpression; Modified: VASSAL-src/trunk/src/VASSAL/launch/EditorWindow.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/EditorWindow.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/launch/EditorWindow.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -54,7 +54,6 @@ import VASSAL.i18n.Resources; import VASSAL.tools.ApplicationIcons; import VASSAL.tools.ErrorDialog; -import VASSAL.tools.URLUtils; import VASSAL.tools.menu.ChildProxy; import VASSAL.tools.menu.MenuBarProxy; import VASSAL.tools.menu.MenuManager; Modified: VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -48,10 +48,8 @@ import net.miginfocom.swing.MigLayout; import VASSAL.configure.Configurer; import VASSAL.i18n.Resources; -import VASSAL.tools.ArchiveWriter; import VASSAL.tools.SplashScreen; import VASSAL.tools.WriteErrorDialog; -import VASSAL.tools.io.ZipArchive; public class PrefsEditor { private JDialog dialog; Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -20,10 +20,8 @@ package VASSAL.tools; import java.awt.Graphics2D; -import java.awt.Window; import java.awt.image.BufferedImage; import java.util.Arrays; -import java.util.Collections; import java.util.List; import javax.swing.JDialog; Modified: VASSAL-src/trunk/src/VASSAL/tools/Mp3AudioClip.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Mp3AudioClip.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/Mp3AudioClip.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -18,7 +18,6 @@ */ package VASSAL.tools; -import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; Modified: VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -26,9 +26,6 @@ import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.Collections; import java.util.Iterator; import java.util.Set; Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/FileArchiveImageTiler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/FileArchiveImageTiler.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/FileArchiveImageTiler.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -20,7 +20,6 @@ package VASSAL.tools.image.tilecache; import java.awt.image.BufferedImage; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.ExecutorService; Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -40,7 +40,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import VASSAL.tools.ArrayUtils; import VASSAL.tools.concurrent.DaemonThreadFactory; import VASSAL.tools.image.FallbackImageTypeConverter; import VASSAL.tools.image.ImageIOImageLoader; Modified: VASSAL-src/trunk/src/VASSAL/tools/menu/MacOSXMenuManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/menu/MacOSXMenuManager.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/menu/MacOSXMenuManager.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -27,8 +27,6 @@ import java.awt.desktop.QuitHandler; import java.awt.desktop.QuitEvent; import java.awt.desktop.QuitResponse; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import javax.swing.Action; import javax.swing.JFrame; Modified: VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java 2020-05-24 15:33:39 UTC (rev 9416) +++ VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java 2020-05-24 15:33:51 UTC (rev 9417) @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Iterator; import java.util.List; import java.util.concurrent.AbstractExecutorService; import java.util.concurrent.Callable; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:33:41
|
Revision: 9416 http://sourceforge.net/p/vassalengine/svn/9416 Author: uckelman Date: 2020-05-24 15:33:39 +0000 (Sun, 24 May 2020) Log Message: ----------- removed redundant type casts Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/Builder.java VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java VASSAL-src/trunk/src/VASSAL/build/module/PredefinedSetup.java VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SizeConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java VASSAL-src/trunk/src/VASSAL/build/module/map/LayerControl.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java VASSAL-src/trunk/src/VASSAL/chat/SimplePlayer.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java VASSAL-src/trunk/src/VASSAL/counters/PieceDefiner.java VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java VASSAL-src/trunk/src/VASSAL/i18n/ComponentI18nData.java VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java VASSAL-src/trunk/src/VASSAL/launch/LaunchRequestException.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java VASSAL-src/trunk/src/VASSAL/script/ScriptInterpreter.java VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java VASSAL-src/trunk/src/VASSAL/tools/ReadErrorDialog.java VASSAL-src/trunk/src/VASSAL/tools/WrapLayout.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java Modified: VASSAL-src/trunk/src/VASSAL/build/Builder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -162,7 +162,7 @@ return null; } catch (SAXException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } finally { IOUtils.closeQuietly(in); @@ -203,7 +203,7 @@ xformer.transform(source, result); } catch (TransformerException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } } Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -310,7 +310,7 @@ GamePiece p = newPiece; while (p != null) { if (p instanceof BasicPiece) { - ((BasicPiece) p).setState(((BasicPiece) Decorator.getInnermost(oldPiece)).getState()); + p.setState(Decorator.getInnermost(oldPiece).getState()); p = null; } else { Modified: VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/ModuleExtension.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -306,7 +306,8 @@ public void setAttribute(String key, Object value) { if (BASE_MODULE_NAME.equals(key)) { if (!universal && !GameModule.getGameModule().getGameName().equals(value)) { - throw new ExtensionsLoader.LoadExtensionException(Resources.getString("ModuleExtension.extension_built", getName(), (String) value)); //$NON-NLS-1$ + throw new ExtensionsLoader.LoadExtensionException( + Resources.getString("ModuleExtension.extension_built", getName(), value)); //$NON-NLS-1$ } } else if (BASE_MODULE_VERSION.equals(key)) { @@ -323,7 +324,7 @@ String runningVersion = Info.getVersion(); if (Info.compareVersions(vassalVersionCreated, runningVersion) > 0) { GameModule.getGameModule().warn(Resources.getString("ModuleExtension.wrong_vassal_version", //$NON-NLS-1$ - getName(), (String) value, runningVersion )); + getName(), value, runningVersion )); } } else if (VERSION.equals(key)) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/PredefinedSetup.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PredefinedSetup.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/PredefinedSetup.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -135,7 +135,7 @@ public void setAttribute(String key, Object value) { if (NAME.equals(key)) { setConfigureName((String) value); - menuItem.getAction().putValue(Action.NAME, (String) value); + menuItem.getAction().putValue(Action.NAME, value); menu.setText((String) value); } else if (USE_FILE.equals(key)) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -87,7 +87,7 @@ def.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (Configurable.NAME_PROPERTY.equals(evt.getPropertyName())) { - definitions.remove((String) evt.getOldValue()); + definitions.remove(evt.getOldValue()); definitions.put((String) evt.getNewValue(), (PrototypeDefinition) evt.getSource()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -193,7 +193,7 @@ def.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (Configurable.NAME_PROPERTY.equals(evt.getPropertyName())) { - userColors.remove((String) evt.getOldValue()); + userColors.remove(evt.getOldValue()); userColors.put((String) evt.getNewValue(), (ColorSwatch) evt.getSource()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -127,7 +127,7 @@ def.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (Configurable.NAME_PROPERTY.equals(evt.getPropertyName())) { - fontStyles.remove((String) evt.getOldValue()); + fontStyles.remove(evt.getOldValue()); fontStyles.put((String) evt.getNewValue(), (FontStyle) evt.getSource()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -87,7 +87,7 @@ def.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (Configurable.NAME_PROPERTY.equals(evt.getPropertyName())) { - definitions.remove((String) evt.getOldValue()); + definitions.remove(evt.getOldValue()); definitions.put((String) evt.getNewValue(), (GamePieceLayout) evt.getSource()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SizeConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SizeConfigurer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SizeConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -41,7 +41,7 @@ } public JComboBox getComboBox() { - return (JComboBox) new SizeComboBox(); + return new SizeComboBox(); } public class SizeComboBox extends JComboBox { Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolConfigurer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/SymbolConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -42,7 +42,7 @@ } public JComboBox getComboBox() { - return (JComboBox) new SymbolComboBox(); + return new SymbolComboBox(); } public class SymbolComboBox extends JComboBox { Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -250,7 +250,7 @@ dialog.setProgress((Integer) e.getNewValue()); } else if ("state".equals(e.getPropertyName())) { - if ((SwingWorker.StateValue) e.getNewValue() == + if (e.getNewValue() == SwingWorker.StateValue.DONE) { // close the dialog on cancellation or completion dialog.setVisible(false); Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/LayerControl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/LayerControl.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/LayerControl.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -169,7 +169,7 @@ if (NAME.equals(key)) { setConfigureName((String)value); if (launch.getAttributeValueString(TOOLTIP) == null) { - launch.setAttribute(TOOLTIP,(String)value); + launch.setAttribute(TOOLTIP, value); } } else if (COMMAND.equals(key)) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -891,7 +891,7 @@ } public void editGrid() { - gridEditor = new HexGridEditor((GridEditor.EditableGrid) this); + gridEditor = new HexGridEditor(this); gridEditor.setVisible(true); // Local variables may have been updated by GridEditor so refresh // configurers. Setting the Dy configurer will auto-recalculate dx Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -565,7 +565,7 @@ } public void editGrid() { - gridEditor = new SquareGridEditor((GridEditor.EditableGrid) this); + gridEditor = new SquareGridEditor(this); gridEditor.setVisible(true); // Local variables may have been updated by GridEditor so refresh // configurers. Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -183,7 +183,7 @@ } catch (ParserConfigurationException ex) { ErrorDialog.bug(ex); - throw (IOException) new IOException(ex); + throw new IOException(ex); } try { @@ -196,10 +196,10 @@ } catch (TransformerConfigurationException | TransformerFactoryConfigurationError ex) { ErrorDialog.bug(ex); - throw (IOException) new IOException(ex); + throw new IOException(ex); } catch (TransformerException ex) { - throw (IOException) new IOException(ex); + throw new IOException(ex); } } @@ -291,7 +291,7 @@ * Build Attribute class based on atrribute value and translations * available in the current module * - * @param c Target configurable + * @param target Target configurable * @param name Attribute name */ public Attribute(Configurable target, String name) { Modified: VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -74,7 +74,7 @@ public void propertyChange(PropertyChangeEvent e) { if (ServerAddressBook.CURRENT_SERVER.equals(e.getPropertyName())) { addressBook.setFrozen(true); - setValue((Properties) e.getNewValue()); + setValue(e.getNewValue()); addressBook.setFrozen(false); } }}); Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -184,10 +184,10 @@ InetAddress candidateAddress = null; // Iterate all NICs (network interface cards)... for (Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements();) { - NetworkInterface iface = (NetworkInterface) ifaces.nextElement(); + NetworkInterface iface = ifaces.nextElement(); // Iterate all IP addresses assigned to each card... for (Enumeration<InetAddress> inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements();) { - InetAddress inetAddr = (InetAddress) inetAddrs.nextElement(); + InetAddress inetAddr = inetAddrs.nextElement(); if (!inetAddr.isLoopbackAddress()) { if (inetAddr.isSiteLocalAddress()) { Modified: VASSAL-src/trunk/src/VASSAL/chat/SimplePlayer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/SimplePlayer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/SimplePlayer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -39,7 +39,7 @@ } public SimplePlayer() { - this((String) null); + this(null); } public String toString() { Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -1036,7 +1036,7 @@ return true; } if (serverMessageFilter.accept(packet)) { - return ((Message) packet).getFrom().equals(JabberClient.this.getConnection().getHost()); + return packet.getFrom().equals(JabberClient.this.getConnection().getHost()); } return false; } Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/LockableJabberRoomControls.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -64,7 +64,7 @@ } public LockableJabberRoomControls(JabberClient client) { - super((ChatServerConnection) client); + super(client); } protected void addLockRoomAction(JPopupMenu popup, Room target) { Modified: VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/node/LockableNodeRoomControls.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -32,7 +32,7 @@ public class LockableNodeRoomControls extends LockableRoomControls { public LockableNodeRoomControls(NodeClient client) { - super((ChatServerConnection) client); + super(client); } protected void addLockRoomAction(JPopupMenu popup, Room target) { Modified: VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/node/NodeClient.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -257,7 +257,7 @@ public void sendTo(Player recipient, Command c) { String path = new SequenceEncoder(moduleName, '/') - .append("*").append(((NodePlayer) recipient).getId()).getValue(); //$NON-NLS-1$ + .append("*").append(recipient.getId()).getValue(); //$NON-NLS-1$ forward(path, encoder.encode(c)); } Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -26,7 +26,7 @@ // FIXME: review error message catch (Exception ex) { if (i == MAX_ATTEMPTS -1) { - throw (IOException) new IOException(ex); + throw new IOException(ex); } } } Modified: VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/configure/FileConfigurer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -166,7 +166,7 @@ setValue((Object) null); } else { - setValue(fc.getSelectedFile().exists() ? fc.getSelectedFile() : (Object) null); + setValue(fc.getSelectedFile().exists() ? fc.getSelectedFile() : null); } } Modified: VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -388,7 +388,7 @@ .getLastPathComponent(); c.setEnabled(!node.isSkip()); if (node instanceof PieceNode) { - final String image = ((PieceNode) node).getImageName(); + final String image = node.getImageName(); final String i = "<html><img src=\"file:/"+loadDirectory.getAbsolutePath()+"/"+image+"\"></html>"; c.setToolTipText(i); } @@ -1142,7 +1142,7 @@ final int size = imageListElements.size(); final ArrayList<String> names = new ArrayList<>(size); for (int i = 0; i < size; ++i) { - names.add((((Entry) multiPanel.getComponent(i)).toString())); + names.add((multiPanel.getComponent(i).toString())); } return names; } Modified: VASSAL-src/trunk/src/VASSAL/counters/PieceDefiner.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/PieceDefiner.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/counters/PieceDefiner.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -521,7 +521,7 @@ if (o == null) return; if (o instanceof GamePiece) { - availableModel.addElement((GamePiece) o); + availableModel.addElement(o); } else { ErrorDialog.show("Error.not_a_gamepiece", className); Modified: VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -940,7 +940,7 @@ for (int iType = 0; iType < TYPE_VALUES.length; ++iType) { if (typeString.matches(TYPE_VALUES[iType]) && !DEFAULT_ROW[0].equals(propertyTable.getValueAt(iRow, 0))) { - defEncoder.append(iType + (String) propertyTable.getValueAt(iRow, 0)); + defEncoder.append("" + iType + propertyTable.getValueAt(iRow, 0)); break; } } Modified: VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -275,7 +275,7 @@ controls = Box.createVerticalBox(); descConfig = new StringConfigurer(null, "Description: ", m.description); controls.add(descConfig.getControls()); - nameConfig = new PropertyNameExpressionConfigurer(null, "Global Property Name: ", m.getKey(), (EditablePiece) m); + nameConfig = new PropertyNameExpressionConfigurer(null, "Global Property Name: ", m.getKey(), m); controls.add(nameConfig.getControls()); levelConfig = new StringEnumConfigurer(null, "", new String[]{CURRENT_ZONE, NAMED_ZONE, NAMED_MAP}); levelConfig.setValue(m.propertyLevel); Modified: VASSAL-src/trunk/src/VASSAL/i18n/ComponentI18nData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/i18n/ComponentI18nData.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/i18n/ComponentI18nData.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -139,7 +139,7 @@ } public ComponentI18nData(Configurable c, String prefix) { - this(c, prefix, (Translatable) null); + this(c, prefix, null); } /** Modified: VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -102,7 +102,7 @@ // FIXME: this should be more specific, to separate the case where // we have failed I/O from when we read ok but have no module catch (IOException e) { - throw (IOException) new IOException( + throw new IOException( Resources.getString("BasicModule.not_a_module"), //$NON-NLS-1$ e); } Modified: VASSAL-src/trunk/src/VASSAL/launch/LaunchRequestException.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/LaunchRequestException.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/launch/LaunchRequestException.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -39,6 +39,6 @@ * @param vals {@link Resources} arguments */ public LaunchRequestException(String key, String... vals) { - super(Resources.getString(key, (Object[]) vals)); + super(Resources.getString(key, vals)); } } Modified: VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -148,7 +148,7 @@ klock = kraf.getChannel().lock(); } catch (OverlappingFileLockException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } // determine whether we are the server or a client @@ -161,7 +161,7 @@ lock = lout.getChannel().tryLock(); } catch (OverlappingFileLockException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } if (lock != null) { Modified: VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -983,7 +983,7 @@ else if (info instanceof ModuleInfo) { return this; } - else if ((MyTreeNode) getParent() == null) { + else if (getParent() == null) { return null; } else { Modified: VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -117,7 +117,7 @@ public <T> void removePropertyListener(Property<T> prop, PropertyListener<? super T> l) { if (!this.prop.equals(prop)) throw new IllegalArgumentException(); - plisteners.remove((PropertyListener<? super V>) l); + plisteners.remove(l); } /** {@inheritDoc} */ Modified: VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -159,7 +159,7 @@ * methods available to expressions. */ protected void initialiseStatic() { - topLevelNameSpace = new NameSpace((NameSpace) null, getClassManager(), "topLevel"); + topLevelNameSpace = new NameSpace(null, getClassManager(), "topLevel"); setNameSpace(topLevelNameSpace); getNameSpace().importClass("VASSAL.build.module.properties.PropertySource"); getNameSpace().importClass("VASSAL.script.ExpressionInterpreter"); Modified: VASSAL-src/trunk/src/VASSAL/script/ScriptInterpreter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/script/ScriptInterpreter.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/script/ScriptInterpreter.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -43,7 +43,7 @@ } public Object evaluate(String statement) throws EvalError { - setVar(SOURCE, (PropertySource) GameModule.getGameModule()); + setVar(SOURCE, GameModule.getGameModule()); return super.eval(statement); } Modified: VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -48,7 +48,7 @@ } } catch (NumberFormatException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } in.close(); Modified: VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -190,7 +190,7 @@ this.resizeOnVisibilityChange = resizeOnVisibilityChange; this.hideablePosition = hideablePosition; if (hideableComponent instanceof JComponent) { - ((JComponent) hideableComponent).setMinimumSize(new Dimension(0, 0)); + hideableComponent.setMinimumSize(new Dimension(0, 0)); } switch (hideablePosition) { case HIDE_LEFT: Modified: VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -436,7 +436,7 @@ } private static final CodeSource cs = - new CodeSource((URL) null, (Certificate[]) null); + new CodeSource(null, (Certificate[]) null); @Override protected Class<?> findClass(String name) throws ClassNotFoundException { Modified: VASSAL-src/trunk/src/VASSAL/tools/ReadErrorDialog.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ReadErrorDialog.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/ReadErrorDialog.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -86,7 +86,7 @@ ErrorDialog.showDisableable( null, e, - (Object) (e.getClass().getName() + "@" + filename), + e.getClass().getName() + "@" + filename, "Unable to Read File", "Unable to Read File", "VASSAL was unable to read the file '" + filename + "'." Modified: VASSAL-src/trunk/src/VASSAL/tools/WrapLayout.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/WrapLayout.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/WrapLayout.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -225,7 +225,7 @@ target.invalidate(); if (target instanceof JComponent) { - ((JComponent)target).revalidate(); + target.revalidate(); } recursing = false; Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -147,7 +147,7 @@ } } catch (DOMException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } final NodeList usenodes = doc.getElementsByTagName("use"); @@ -198,7 +198,7 @@ DOMUtilities.writeDocument(doc, sw); } catch (DOMException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } sw.flush(); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -102,7 +102,7 @@ in.close(); } catch (DOMException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } finally { IOUtils.closeQuietly(in); @@ -200,7 +200,7 @@ return doc; } catch (DOMException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } finally { IOUtils.closeQuietly(in); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -109,7 +109,7 @@ throw new IllegalStateException(e); } catch (ExecutionException e) { - throw (IOException) new IOException(e); + throw new IOException(e); } finally { // cancel everything if anything fails Modified: VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java 2020-05-24 15:33:09 UTC (rev 9415) +++ VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java 2020-05-24 15:33:39 UTC (rev 9416) @@ -507,7 +507,7 @@ } err += " Data written to " + tmpFile.getAbsolutePath() + " instead."; - throw (IOException) new IOException(err, e); + throw new IOException(err, e); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:33:12
|
Revision: 9415 http://sourceforge.net/p/vassalengine/svn/9415 Author: uckelman Date: 2020-05-24 15:33:09 +0000 (Sun, 24 May 2020) Log Message: ----------- removed unnecessary numeric casts Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java VASSAL-src/trunk/src/VASSAL/tools/Base64.java VASSAL-src/trunk/src/VASSAL/tools/HashCode.java VASSAL-src/trunk/src/VASSAL/tools/Sort.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/MapBoard.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/MedianCut.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -237,17 +237,17 @@ for (int i=cube.lower; i<=cube.upper; i++) { color = histPtr[i]; r = red(color); - rsum += (float)r*(float)hist[color]; + rsum += (float)r* hist[color]; g = green(color); - gsum += (float)g*(float)hist[color]; + gsum += (float)g* hist[color]; b = blue(color); - bsum += (float)b*(float)hist[color]; + bsum += (float)b* hist[color]; } // Update the color map - r = (int)(rsum/(float)cube.count); - g = (int)(gsum/(float)cube.count); - b = (int)(bsum/(float)cube.count); + r = (int)(rsum/ cube.count); + g = (int)(gsum/ cube.count); + b = (int)(bsum/ cube.count); if (r==248 && g==248 && b==248) r=g=b=255; // Restore white (255,255,255) rLUT[k] = (byte)r; Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -394,7 +394,7 @@ // ensure that the size of the image data array (4 bytes per pixel) // does not exceed the maximum array size, 2^31-1 elements; // otherwise we'll overflow an int and have a negavive array size - while ((long)tw * (long)th > Integer.MAX_VALUE/4) { + while ((long)tw * th > Integer.MAX_VALUE/4) { if (tw > th) { tw = (int) Math.ceil(tw/2.0); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -604,8 +604,8 @@ protected Area getSingleHexShape(int centerX, int centerY, boolean reversed) { Polygon poly = new Polygon(); - float x = (float) (sideways ? centerY : centerX); - float y = (float) (sideways ? centerX : centerY); + float x = (sideways ? centerY : centerX); + float y = (sideways ? centerX : centerY); float x1,y1, x2,y2, x3,y3, x4, y4, x5, y5, x6, y6; @@ -672,11 +672,11 @@ rotateIfSideways(p2); int x = p2.x - p1.x; int y = p2.y - p1.y; - double theta = atan2((double) (-x), (double) (-y)) + PI; + double theta = atan2((-x), (-y)) + PI; while (theta > PI / 3.) theta -= PI / 3.; theta = PI / 6. - theta; - double r = sqrt((double) (x * x + y * y)); + double r = sqrt((x * x + y * y)); r *= cos(theta); return (int) (r / (dy * sqrt3_2) + 0.5); } Modified: VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -615,7 +615,7 @@ myAngle = p.x < origin.x ? -Math.PI/2.0 : Math.PI/2.0; } else { - myAngle = Math.atan((double)(p.x - origin.x) / (double)(origin.y - p.y)); + myAngle = Math.atan((double)(p.x - origin.x) / (origin.y - p.y)); if (origin.y < p.y) { myAngle += Math.PI; } Modified: VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -75,7 +75,7 @@ private static final Logger log = LoggerFactory.getLogger(BasicModule.class); - private static char COMMAND_SEPARATOR = (char) KeyEvent.VK_ESCAPE; + private static char COMMAND_SEPARATOR = KeyEvent.VK_ESCAPE; protected ChatServerControls serverControls; protected GameRefresher gameRefresher; Modified: VASSAL-src/trunk/src/VASSAL/tools/Base64.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -1000,7 +1000,7 @@ if( bytes != null && bytes.length >= 4 ) { - int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00); + int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00); if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head ) { java.io.ByteArrayInputStream bais = null; Modified: VASSAL-src/trunk/src/VASSAL/tools/HashCode.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/HashCode.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/HashCode.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -38,15 +38,15 @@ } public static final int hash(final byte value) { - return (int) value; + return value; } public static final int hash(final char value) { - return (int) value; + return value; } public static final int hash(final short value) { - return (int) value; + return value; } public static final int hash(final int value) { Modified: VASSAL-src/trunk/src/VASSAL/tools/Sort.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Sort.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/Sort.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -145,7 +145,7 @@ int len = Math.min(s1.length(), s2.length()); int result = 0; for (int i = 0; i < len; ++i) { - result = (int) s1.charAt(i) - (int) s2.charAt(i); + result = s1.charAt(i) - s2.charAt(i); if (result != 0) { return result; } Modified: VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -2759,7 +2759,7 @@ c.anchor = GridBagConstraints.CENTER; panel.setLayout(new GridBagLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); - final int nColumns = (int) Math.sqrt((double) nForcePools); + final int nColumns = (int) Math.sqrt(nForcePools); Iterator<Pool> iter = forcePools.iterator(ForcePool.class); for (int i = 0; i < nForcePools; ++i) { ForcePool fp = (ForcePool) iter.next(); Modified: VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/MapBoard.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/MapBoard.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/MapBoard.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -1085,13 +1085,13 @@ } void addLine(int x1, int y1, float x2, float y2) { - addLine(new Point2D.Float((float) x1, (float) y1), + addLine(new Point2D.Float(x1, y1), new Point2D.Float(x2, y2)); } void addLine(int x1, int y1, int x2, int y2) { - addLine(new Point2D.Float((float) x1, (float) y1), - new Point2D.Float((float) x2, (float) y2)); + addLine(new Point2D.Float(x1, y1), + new Point2D.Float(x2, y2)); } /** Modified: VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java 2020-05-24 15:33:00 UTC (rev 9414) +++ VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java 2020-05-24 15:33:09 UTC (rev 9415) @@ -458,7 +458,7 @@ * @return Map board symbol size corresponding to the specified zoom level */ double getZoomFactor(int zoomLevel) { - return (double) mapBoardSymbolSize[zoomLevel] / (double) mapBoardSymbolSize[SymbolSet.zoomLevel]; + return (double) mapBoardSymbolSize[zoomLevel] / mapBoardSymbolSize[SymbolSet.zoomLevel]; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:33:03
|
Revision: 9414 http://sourceforge.net/p/vassalengine/svn/9414 Author: uckelman Date: 2020-05-24 15:33:00 +0000 (Sun, 24 May 2020) Log Message: ----------- removed unnecessary calls to Throwable.initCause() Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/Builder.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java VASSAL-src/trunk/src/VASSAL/tools/ThrowableUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOException.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java Modified: VASSAL-src/trunk/src/VASSAL/build/Builder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -162,8 +162,7 @@ return null; } catch (SAXException e) { - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } finally { IOUtils.closeQuietly(in); @@ -204,8 +203,7 @@ xformer.transform(source, result); } catch (TransformerException e) { - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -183,8 +183,7 @@ } catch (ParserConfigurationException ex) { ErrorDialog.bug(ex); - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(ex); + throw (IOException) new IOException(ex); } try { @@ -197,12 +196,10 @@ } catch (TransformerConfigurationException | TransformerFactoryConfigurationError ex) { ErrorDialog.bug(ex); - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException(ex).initCause(ex); + throw (IOException) new IOException(ex); } catch (TransformerException ex) { - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(ex); + throw (IOException) new IOException(ex); } } Modified: VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/chat/peer2peer/AcceptPeerThread.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -26,8 +26,7 @@ // FIXME: review error message catch (Exception ex) { if (i == MAX_ATTEMPTS -1) { - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(ex); + throw (IOException) new IOException(ex); } } } Modified: VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/launch/BasicModule.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -103,8 +103,8 @@ // we have failed I/O from when we read ok but have no module catch (IOException e) { throw (IOException) new IOException( - Resources.getString("BasicModule.not_a_module") //$NON-NLS-1$ - ).initCause(e); + Resources.getString("BasicModule.not_a_module"), //$NON-NLS-1$ + e); } final Document doc = Builder.createDocument(in); Modified: VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/launch/ModuleManager.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -148,7 +148,7 @@ klock = kraf.getChannel().lock(); } catch (OverlappingFileLockException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } // determine whether we are the server or a client @@ -161,7 +161,7 @@ lock = lout.getChannel().tryLock(); } catch (OverlappingFileLockException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } if (lock != null) { Modified: VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/BugUtils.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -48,7 +48,7 @@ } } catch (NumberFormatException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } in.close(); Modified: VASSAL-src/trunk/src/VASSAL/tools/ThrowableUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ThrowableUtils.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/ThrowableUtils.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -103,7 +103,7 @@ throws T { T toThrow = null; try { - toThrow = cl.cast(cl.getConstructor().newInstance().initCause(t)); + toThrow = cl.cast(cl.getConstructor().newInstance(t)); } catch (Throwable ignore) { // If anything happens here, we're screwed anyway, as we're already Modified: VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOException.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOException.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOException.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -60,8 +60,8 @@ } public ImageIOException(File file, Throwable cause) { - this(file); - initCause(cause); + super(file.getPath(), cause); + this.file = file; } public ImageIOException(String filename, String message, Throwable cause) { @@ -69,9 +69,8 @@ } public ImageIOException(File file, String message, Throwable cause) { - super(file.getPath() + ": " + message); + super(file.getPath() + ": " + message, cause); this.file = file; - initCause(cause); } public File getFile() { Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -147,7 +147,7 @@ } } catch (DOMException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } final NodeList usenodes = doc.getElementsByTagName("use"); @@ -198,7 +198,7 @@ DOMUtilities.writeDocument(doc, sw); } catch (DOMException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } sw.flush(); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -102,7 +102,7 @@ in.close(); } catch (DOMException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } finally { IOUtils.closeQuietly(in); @@ -200,7 +200,7 @@ return doc; } catch (DOMException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } finally { IOUtils.closeQuietly(in); Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -109,7 +109,7 @@ throw new IllegalStateException(e); } catch (ExecutionException e) { - throw (IOException) new IOException().initCause(e); + throw (IOException) new IOException(e); } finally { // cancel everything if anything fails Modified: VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java 2020-05-24 15:32:50 UTC (rev 9413) +++ VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java 2020-05-24 15:33:00 UTC (rev 9414) @@ -507,7 +507,7 @@ } err += " Data written to " + tmpFile.getAbsolutePath() + " instead."; - throw (IOException) new IOException(err).initCause(e); + throw (IOException) new IOException(err, e); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:32:53
|
Revision: 9413 http://sourceforge.net/p/vassalengine/svn/9413 Author: uckelman Date: 2020-05-24 15:32:50 +0000 (Sun, 24 May 2020) Log Message: ----------- identical catch sections collapsed into multi-catch sections Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/Builder.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/NewColorConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/ExtensionMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/ModuleMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/SaveMetaData.java VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageBoardControls.java VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java VASSAL-src/trunk/src/VASSAL/configure/ColorConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java VASSAL-src/trunk/src/VASSAL/configure/HotKeyConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/PropertiesWindow.java VASSAL-src/trunk/src/VASSAL/configure/SavedGameUpdaterDialog.java VASSAL-src/trunk/src/VASSAL/i18n/BundleHelper.java VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java VASSAL-src/trunk/src/VASSAL/launch/Launcher.java VASSAL-src/trunk/src/VASSAL/launch/StartUp.java VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java VASSAL-src/trunk/src/VASSAL/launch/UpdateCheckRequest.java VASSAL-src/trunk/src/VASSAL/tools/AudioSystemClip.java VASSAL-src/trunk/src/VASSAL/tools/Base64.java VASSAL-src/trunk/src/VASSAL/tools/BrowserSupport.java VASSAL-src/trunk/src/VASSAL/tools/BugDialog.java VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java VASSAL-src/trunk/src/VASSAL/tools/FutureUtils.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/FutureUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/OpIcon.java VASSAL-src/trunk/src/VASSAL/tools/imports/ImportAction.java VASSAL-src/trunk/src/VASSAL/tools/io/ProcessCallable.java VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageDispatcher.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageReceiver.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java VASSAL-src/trunk/src/bsh/Remote.java VASSAL-src/trunk/src/org/netbeans/api/wizard/displayer/WizardDisplayerImpl.java Modified: VASSAL-src/trunk/src/VASSAL/build/Builder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/Builder.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -85,14 +85,10 @@ catch (IllegalBuildException ex) { ErrorDialog.bug(ex); } - catch (RuntimeException ex) { + catch (RuntimeException | Error ex) { logger.error("Error building " + child.getNodeName()); throw ex; } - catch (Error ex) { - logger.error("Error building " + child.getNodeName()); - throw ex; - } } } } Modified: VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -123,12 +123,9 @@ catch (ZipException e) { // Not a zip file. Ignore. } - catch (IOException e) { + catch (IOException | LoadExtensionException e) { reportBuildError(e, extension.getName()); } - catch (LoadExtensionException e) { - reportBuildError(e, extension.getName()); - } } return success; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -76,14 +76,10 @@ // return new String[] { URLEncoder.encode(query.toString(), "UTF-8") }; } - catch (MalformedURLException e) { + catch (MalformedURLException | URISyntaxException e) { // should never happen ErrorDialog.bug(e); } - catch (URISyntaxException e) { - // should never happen - ErrorDialog.bug(e); - } return null; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/NewColorConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/NewColorConfigurer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/NewColorConfigurer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -162,9 +162,6 @@ Integer.parseInt(st.nextToken())); } // FIXME: review error message - catch (NumberFormatException e) { - return null; - } catch (IllegalArgumentException e) { return null; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -454,14 +454,11 @@ } // FIXME: should getTileFuture() throw these? Yes, probably, because it's // synchronous when obs is null. - catch (CancellationException e) { + catch (CancellationException | ExecutionException e) { // FIXME: bug until we permit cancellation + // FIXME: bug until we figure out why getTileFuture() throws ExecutionException ErrorDialog.bug(e); } - catch (ExecutionException e) { - // FIXME: bug until we figure out why getTileFuture() throws this - ErrorDialog.bug(e); - } } if (map != null && obs == map.getView()) { @@ -515,15 +512,9 @@ final ImageOp sop = Op.scale(boardImageOp, zoom); return (reversed ? Op.rotate(sop, 180) : sop).getImage(null); } - catch (CancellationException e) { + catch (CancellationException | ExecutionException | InterruptedException e) { ErrorDialog.bug(e); } - catch (InterruptedException e) { - ErrorDialog.bug(e); - } - catch (ExecutionException e) { - ErrorDialog.bug(e); - } return null; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -195,16 +195,11 @@ "{http://xml.apache.org/xslt}indent-amount", "2"); xformer.transform(new DOMSource(doc), new StreamResult(out)); } - catch (TransformerConfigurationException ex) { + catch (TransformerConfigurationException | TransformerFactoryConfigurationError ex) { ErrorDialog.bug(ex); // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(ex); + throw (IOException) new IOException(ex).initCause(ex); } - catch (TransformerFactoryConfigurationError ex) { - ErrorDialog.bug(ex); - // FIXME: switch to IOException(Throwable) ctor in Java 1.6 - throw (IOException) new IOException().initCause(ex); - } catch (TransformerException ex) { // FIXME: switch to IOException(Throwable) ctor in Java 1.6 throw (IOException) new IOException().initCause(ex); Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/ExtensionMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/ExtensionMetaData.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/ExtensionMetaData.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -167,13 +167,10 @@ zip.close(); } - catch (IOException e) { - logger.error("", e); - } catch (SAXEndException e) { // Indicates End of module/extension parsing. not an error. } - catch (SAXException e) { + catch (IOException | SAXException e) { logger.error("", e); } finally { Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/ModuleMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/ModuleMetaData.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/ModuleMetaData.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -145,13 +145,10 @@ zip.close(); } - catch (IOException e) { - logger.error("", e); - } catch (SAXEndException e) { // Indicates End of module/extension parsing. not an error. } - catch (SAXException e) { + catch (IOException | SAXException e) { logger.error("", e); } finally { Modified: VASSAL-src/trunk/src/VASSAL/build/module/metadata/SaveMetaData.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/metadata/SaveMetaData.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/build/module/metadata/SaveMetaData.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -161,12 +161,9 @@ zip.close(); } - catch (IOException e) { + catch (IOException | SAXException e) { logger.error("", e); } - catch (SAXException e) { - logger.error("", e); - } finally { IOUtils.closeQuietly(zip); } Modified: VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/AddressBookServerConfigurer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -119,10 +119,6 @@ s = new String(out.toByteArray(), ENCODING); } // FIXME: review error message - catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - // FIXME: review error message catch (IOException e) { e.printStackTrace(); } @@ -138,10 +134,6 @@ p.load(new ByteArrayInputStream(s.getBytes(ENCODING))); } // FIXME: review error message - catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - // FIXME: review error message catch (IOException e) { e.printStackTrace(); } Modified: VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -158,13 +158,9 @@ l.add(new String[]{ moduleName, roomName, playerName }); } // FIXME: review error message - catch (NoSuchElementException e) { + catch (NoSuchElementException | NumberFormatException e) { e.printStackTrace(); } - // FIXME: review error message - catch (NumberFormatException e) { - e.printStackTrace(); - } } requests.add(i); Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerConfigurer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -281,10 +281,6 @@ s = new String(out.toByteArray(), ENCODING); } // FIXME: review error message - catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - // FIXME: review error message catch (IOException e) { e.printStackTrace(); } @@ -326,10 +322,6 @@ p.load(new ByteArrayInputStream(s.getBytes(ENCODING))); } // FIXME: review error message - catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - // FIXME: review error message catch (IOException e) { e.printStackTrace(); } Modified: VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -639,9 +639,6 @@ out = new ObfuscatingOutputStream(ba); out.write(clearText.getBytes("UTF-8")); //$NON-NLS-1$ } - catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (IOException e) { e.printStackTrace(); } Modified: VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageBoardControls.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageBoardControls.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageBoardControls.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -99,12 +99,9 @@ try { showMessages(get()); } - catch (InterruptedException e) { + catch (InterruptedException | ExecutionException e) { ErrorDialog.bug(e); } - catch (ExecutionException e) { - ErrorDialog.bug(e); - } msgFrame.setTitle(serverName != null ? Resources.getString("Chat.message_board_title", serverName) : @@ -146,12 +143,9 @@ try { showMessages(get()); } - catch (InterruptedException e) { + catch (InterruptedException | ExecutionException e) { ErrorDialog.bug(e); } - catch (ExecutionException e) { - ErrorDialog.bug(e); - } msgFrame.setTitle(serverName != null ? Resources.getString("Chat.message_board_title", serverName) : Modified: VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -228,13 +228,9 @@ refresh(historicalModels[sel - 1], get()); } // FIXME: review error message - catch (InterruptedException ex) { + catch (InterruptedException | ExecutionException ex) { ex.printStackTrace(); } - // FIXME: review error message - catch (ExecutionException ex) { - ex.printStackTrace(); - } fireSelectionChanged(); } Modified: VASSAL-src/trunk/src/VASSAL/configure/ColorConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/ColorConfigurer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/configure/ColorConfigurer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -111,12 +111,9 @@ catch (NumberFormatException e) { ErrorDialog.dataError(new BadDataReport("not an integer", s, e)); } - catch (IllegalArgumentException e) { + catch (IllegalArgumentException | NoSuchElementException e) { ErrorDialog.dataError(new BadDataReport("bad color", s, e)); } - catch (NoSuchElementException e) { - ErrorDialog.dataError(new BadDataReport("bad color", s, e)); - } // default to black in case of bad data return Color.BLACK; Modified: VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -806,21 +806,10 @@ catch (NoSuchMethodException e) { // Ignore. This is normal, since some classes won't have this method. } - catch (IllegalAccessException e) { + catch (IllegalAccessException | ExceptionInInitializerError + | NullPointerException | InvocationTargetException | IllegalArgumentException e) { ErrorDialog.bug(e); } - catch (IllegalArgumentException e) { - ErrorDialog.bug(e); - } - catch (InvocationTargetException e) { - ErrorDialog.bug(e); - } - catch (NullPointerException e) { - ErrorDialog.bug(e); - } - catch (ExceptionInInitializerError e) { - ErrorDialog.bug(e); - } return c.getName().substring(c.getName().lastIndexOf(".") + 1); } Modified: VASSAL-src/trunk/src/VASSAL/configure/HotKeyConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/HotKeyConfigurer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/configure/HotKeyConfigurer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -140,9 +140,6 @@ Integer.parseInt(s.substring(index + 1))); } // FIXME: review error message - catch (NumberFormatException e) { - return null; - } catch (IllegalArgumentException e) { return null; } Modified: VASSAL-src/trunk/src/VASSAL/configure/PropertiesWindow.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/PropertiesWindow.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/configure/PropertiesWindow.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -73,9 +73,6 @@ catch (ClassNotFoundException e) { // This element doesn't correspond to a class. Skip it. } - catch (ExceptionInInitializerError e) { - ErrorDialog.bug(e); - } catch (LinkageError e) { ErrorDialog.bug(e); } Modified: VASSAL-src/trunk/src/VASSAL/configure/SavedGameUpdaterDialog.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/configure/SavedGameUpdaterDialog.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/configure/SavedGameUpdaterDialog.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -189,11 +189,8 @@ SwingUtilities.invokeAndWait(showError); } // FIXME: review error message - catch (InterruptedException e1) { + catch (InterruptedException | InvocationTargetException e1) { } - // FIXME: review error message - catch (InvocationTargetException e1) { - } } } updateButton.setEnabled(true); Modified: VASSAL-src/trunk/src/VASSAL/i18n/BundleHelper.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/i18n/BundleHelper.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/i18n/BundleHelper.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -42,12 +42,9 @@ try { return bundle.getString(id); } - catch (ClassCastException e) { + catch (ClassCastException | MissingResourceException e) { logger.error("No Translation: " + id); } - catch (MissingResourceException e) { - logger.error("No Translation: " + id); - } // fallback: return the key return id; Modified: VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -177,16 +177,13 @@ for (Future<IPCMessage> f : futures) { try { if (f.get() instanceof Launcher.CloseReject) { -System.out.println("rejected!"); + System.out.println("rejected!"); return false; } } - catch (ExecutionException e) { -e.printStackTrace(); + catch (ExecutionException | InterruptedException e) { + e.printStackTrace(); } - catch (InterruptedException e) { -e.printStackTrace(); - } } return true; Modified: VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/CommandServer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -83,12 +83,9 @@ out.writeObject(result); } } - catch (EOFException e) { + catch (EOFException | SocketException e) { // Normal. This happens when the socket is closed from the other end. } - catch (SocketException e) { - // Normal. This happens when the socket is closed from the other end. - } clientSocket.close(); serverSocket.close(); Modified: VASSAL-src/trunk/src/VASSAL/launch/Launcher.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/Launcher.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/Launcher.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -148,12 +148,9 @@ try { launch(); } - catch (ExtensionsLoader.LoadExtensionException e2) { + catch (ExtensionsLoader.LoadExtensionException | IOException e2) { warn(e2); } - catch (IOException e1) { - warn(e1); - } } private void warn (Exception e1) { Modified: VASSAL-src/trunk/src/VASSAL/launch/StartUp.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/StartUp.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/StartUp.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -89,18 +89,10 @@ UIManager.getSystemLookAndFeelClassName() ); } - catch (ClassNotFoundException e) { + catch (ClassNotFoundException | UnsupportedLookAndFeelException + | InstantiationException | IllegalAccessException e) { ErrorDialog.bug(e); } - catch (IllegalAccessException e) { - ErrorDialog.bug(e); - } - catch (InstantiationException e) { - ErrorDialog.bug(e); - } - catch (UnsupportedLookAndFeelException e) { - ErrorDialog.bug(e); - } } // Ensure consistent behavior in NOT consuming "mousePressed" events @@ -110,12 +102,9 @@ } }); } - catch (InterruptedException e) { + catch (InterruptedException | InvocationTargetException e) { ErrorDialog.bug(e); } - catch (InvocationTargetException e) { - ErrorDialog.bug(e); - } } protected void initSystemSpecificProperties() {} Modified: VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -303,14 +303,10 @@ throw new IOException("return value == " + retval); } } - catch (ExecutionException e) { + catch (ExecutionException | InterruptedException e) { // should never happen throw new IllegalStateException(e); } - catch (InterruptedException e) { - // should never happen - throw new IllegalStateException(e); - } } protected void makeHashDirs() throws IOException { @@ -371,13 +367,9 @@ try { runSlicer(multi, s.first, maxheap); } - catch (CancellationException e) { + catch (CancellationException | IOException e) { cleanup(); throw e; } - catch (IOException e) { - cleanup(); - throw e; - } } } Modified: VASSAL-src/trunk/src/VASSAL/launch/UpdateCheckRequest.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/launch/UpdateCheckRequest.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/launch/UpdateCheckRequest.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -56,11 +56,8 @@ } } } - catch (InterruptedException e) { + catch (InterruptedException | ExecutionException e) { logger.error("", e); } - catch (ExecutionException e) { - logger.error("", e); - } } } Modified: VASSAL-src/trunk/src/VASSAL/tools/AudioSystemClip.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/AudioSystemClip.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/AudioSystemClip.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -47,15 +47,9 @@ try { clip = AudioSystem.getClip(); } - catch (IllegalArgumentException e) { + catch (IllegalArgumentException | SecurityException | LineUnavailableException e) { throw new IOException(e); } - catch (LineUnavailableException e) { - throw new IOException(e); - } - catch (SecurityException e) { - throw new IOException(e); - } // wrap the input stream AudioInputStream ais = null; @@ -81,15 +75,9 @@ clip.open(cais); return clip; } - catch (IllegalArgumentException e) { + catch (IllegalArgumentException | SecurityException | LineUnavailableException e) { throw new IOException(e); } - catch (LineUnavailableException e) { - throw new IOException(e); - } - catch (SecurityException e) { - throw new IOException(e); - } } finally { IOUtils.closeQuietly(cais); Modified: VASSAL-src/trunk/src/VASSAL/tools/Base64.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/Base64.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -1,5 +1,7 @@ package VASSAL.tools; +import java.io.IOException; + /** * <p>Encodes and decodes to and from Base64 notation.</p> * <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p> @@ -1066,16 +1068,11 @@ obj = ois.readObject(); } // end try - catch( java.io.IOException e ) + catch( IOException | ClassNotFoundException e ) { e.printStackTrace(); obj = null; } // end catch - catch( java.lang.ClassNotFoundException e ) - { - e.printStackTrace(); - obj = null; - } // end catch finally { try{ bais.close(); } catch( Exception e ){} Modified: VASSAL-src/trunk/src/VASSAL/tools/BrowserSupport.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/BrowserSupport.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/BrowserSupport.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -53,14 +53,10 @@ return; } } - catch (IllegalArgumentException e) { + catch (IllegalArgumentException | URISyntaxException e) { ErrorDialog.bug(e); return; } - catch (URISyntaxException e) { - ErrorDialog.bug(e); - return; - } } } } Modified: VASSAL-src/trunk/src/VASSAL/tools/BugDialog.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/BugDialog.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/BugDialog.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -477,21 +477,11 @@ // cancelled by user, do nothing timer.stop(); } - catch (InterruptedException e) { + catch (InterruptedException | TimeoutException | ExecutionException e) { timer.stop(); e.printStackTrace(); showConnectionFailedPanel(); } - catch (ExecutionException e) { - timer.stop(); - e.printStackTrace(); - showConnectionFailedPanel(); - } - catch (TimeoutException e) { - timer.stop(); - e.printStackTrace(); - showConnectionFailedPanel(); - } } } @@ -568,21 +558,11 @@ // cancelled by user, do nothing timer.stop(); } - catch (InterruptedException e) { + catch (InterruptedException | TimeoutException | ExecutionException e) { timer.stop(); e.printStackTrace(); showConnectionFailedPanel(); } - catch (ExecutionException e) { - timer.stop(); - e.printStackTrace(); - showConnectionFailedPanel(); - } - catch (TimeoutException e) { - timer.stop(); - e.printStackTrace(); - showConnectionFailedPanel(); - } } } Modified: VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -68,12 +68,9 @@ try { SwingUtilities.invokeAndWait(runnable); } - catch (InterruptedException e) { + catch (InterruptedException | InvocationTargetException e) { ErrorDialog.bug(e); } - catch (InvocationTargetException e) { - ErrorDialog.bug(e); - } } }); } Modified: VASSAL-src/trunk/src/VASSAL/tools/FutureUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/FutureUtils.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/FutureUtils.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -37,14 +37,11 @@ try { future.get(); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { ErrorDialog.bug(e); } - catch (InterruptedException e) { - e.printStackTrace(); - } } } Modified: VASSAL-src/trunk/src/VASSAL/tools/concurrent/FutureUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/concurrent/FutureUtils.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/concurrent/FutureUtils.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -41,14 +41,11 @@ try { future.get(); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { ErrorDialog.bug(e); } - catch (InterruptedException e) { - e.printStackTrace(); - } } } Modified: VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -427,15 +427,19 @@ try { return w.run(name, in); } - catch (ArrayIndexOutOfBoundsException e) { + catch (ArrayIndexOutOfBoundsException | IllegalArgumentException | CMMException e) { // Note: ImageIO can throw an ArrayIndexOutOfBoundsException for // some corrupt JPEGs. This problem is noted in Sun Bug 6351707, // // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6351707 // - throw new BrokenImageException(name, e); - } - catch (CMMException e) { + + // Note: ImageIO can throw IllegalArgumentExceptions for certain + // kinds of broken images, e.g., JPEGs which are in the RGB color + // space but have non-RGB color profiles (see Bug 2673589 for an + // example of this). This problem is noted in Sun Bug 6404011, + // http://bugs.sun.com/view_bug.do?bug_id=6404011 + // Note: ImageIO can throw a CMMException for JPEGs which have // broken color profiles. This problem is noted in Sun Bugs 6444360 // and 6839133. @@ -442,19 +446,8 @@ // // http://bugs.sun.com/view_bug.do?bug_id=6444360 // http://bugs.sun.com/view_bug.do?bug_id=6839133 - // throw new BrokenImageException(name, e); } - catch (IllegalArgumentException e) { - // Note: ImageIO can throw IllegalArgumentExceptions for certain - // kinds of broken images, e.g., JPEGs which are in the RGB color - // space but have non-RGB color profiles (see Bug 2673589 for an - // example of this). This problem is noted in Sun Bug 6404011, - // - // http://bugs.sun.com/view_bug.do?bug_id=6404011 - // - throw new BrokenImageException(name, e); - } catch (ImageIOException e) { // Don't wrap ImageIOExceptions. throw e; Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -88,13 +88,10 @@ } in.close(); } - catch (DOMException e) { - throw new ImageIOException(name, e); - } catch (FileNotFoundException e) { throw new ImageNotFoundException(name, e); } - catch (IOException e) { + catch (DOMException | IOException e) { throw new ImageIOException(name, e); } finally { Modified: VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGRenderer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -144,12 +144,9 @@ return r.getBufferedImage(); } // FIXME: review error message - catch (BridgeException e) { + catch (BridgeException | TranscoderException e) { logger.error("", e); } - catch (TranscoderException e) { - logger.error("", e); - } return null; } @@ -175,12 +172,9 @@ return r.getBufferedImage(); } // FIXME: review error message - catch (BridgeException e) { + catch (BridgeException | TranscoderException e) { logger.error("", e); } - catch (TranscoderException e) { - logger.error("", e); - } return null; } Modified: VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -104,7 +104,7 @@ progress.receive(null); } } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { // should never happen throw new IllegalStateException(e); } @@ -111,10 +111,6 @@ catch (ExecutionException e) { throw (IOException) new IOException().initCause(e); } - catch (InterruptedException e) { - // should never happen - throw new IllegalStateException(e); - } finally { // cancel everything if anything fails for (Future<Void> f : futures) { Modified: VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractOpImpl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractOpImpl.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/imageop/AbstractOpImpl.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -77,13 +77,10 @@ try { return getImage(null); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { // FIXME: bug until we permit cancellation ErrorDialog.bug(e); } - catch (InterruptedException e) { - ErrorDialog.bug(e); - } catch (ExecutionException e) { if (!Op.handleException(e)) ErrorDialog.bug(e); } Modified: VASSAL-src/trunk/src/VASSAL/tools/imageop/OpIcon.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imageop/OpIcon.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/imageop/OpIcon.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -86,12 +86,9 @@ try { g.drawImage(Op.scale(sop, os_scale).getImage(r), x, y, c); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { ErrorDialog.bug(e); } - catch (InterruptedException e) { - ErrorDialog.bug(e); - } catch (ExecutionException e) { if (!Op.handleException(e)) ErrorDialog.bug(e); } Modified: VASSAL-src/trunk/src/VASSAL/tools/imports/ImportAction.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/imports/ImportAction.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/imports/ImportAction.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -131,12 +131,9 @@ return IMPORTERS[index]; } } - catch (InstantiationException e) { + catch (InstantiationException | IllegalAccessException e) { ErrorDialog.bug(e); } - catch (IllegalAccessException e) { - ErrorDialog.bug(e); - } } return null; @@ -178,12 +175,9 @@ imp.writeToArchive(); } // these should never happen - catch (IllegalAccessException e) { + catch (IllegalAccessException | InstantiationException e) { ErrorDialog.bug(e); } - catch (InstantiationException e) { - ErrorDialog.bug(e); - } module.getFrame().setVisible(true); new ModuleEditorWindow(module).setVisible(true); Modified: VASSAL-src/trunk/src/VASSAL/tools/io/ProcessCallable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/ProcessCallable.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/io/ProcessCallable.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -125,12 +125,9 @@ try { f.get(1000L, TimeUnit.MILLISECONDS); } - catch (ExecutionException e) { + catch (ExecutionException | InterruptedException e) { logger.error("", e); } - catch (InterruptedException e) { - logger.error("", e); - } catch (TimeoutException e) { logger.error("", e); f.cancel(true); Modified: VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -208,13 +208,10 @@ Thread.sleep(poll_interval); } } - catch (IOException e) { + catch (IOException | InterruptedException e) { // FIXME: there should be an error listener; we can't handle exceptions here logger.error("", e); } - catch (InterruptedException e) { - logger.error("", e); - } finally { IOUtils.closeQuietly(raf); } Modified: VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageDispatcher.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageDispatcher.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageDispatcher.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -29,14 +29,10 @@ out.close(); } - catch (IOException e) { + catch (IOException | InterruptedException e) { // FIXME e.printStackTrace(); } - catch (InterruptedException e) { -// FIXME - e.printStackTrace(); - } finally { IOUtils.closeQuietly(out); } Modified: VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageReceiver.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageReceiver.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessageReceiver.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -41,21 +41,10 @@ in.close(); } - catch (ClassCastException e) { + catch (ClassCastException | OptionalDataException | StreamCorruptedException + | InvalidClassException | ClassNotFoundException e) { throw new IllegalStateException(e); } - catch (ClassNotFoundException e) { - throw new IllegalStateException(e); - } - catch (InvalidClassException e) { - throw new IllegalStateException(e); - } - catch (StreamCorruptedException e) { - throw new IllegalStateException(e); - } - catch (OptionalDataException e) { - throw new IllegalStateException(e); - } catch (EOFException e) { // this is normal, happens on close } Modified: VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -95,15 +95,9 @@ try { f.get(); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException | ExecutionException e) { throw new IllegalStateException(e); } - catch (ExecutionException e) { - throw new IllegalStateException(e); - } - catch (InterruptedException e) { - throw new IllegalStateException(e); - } } public Future<IPCMessage> send(IPCMessage msg) throws IOException { Modified: VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -225,16 +225,10 @@ try { return get(key, null); } - catch (CancellationException e) { + catch (CancellationException | ExecutionException | InterruptedException e) { // FIXME: bug until we permit cancellation ErrorDialog.bug(e); } - catch (InterruptedException e) { - ErrorDialog.bug(e); - } - catch (ExecutionException e) { - ErrorDialog.bug(e); - } return null; } @@ -382,12 +376,8 @@ try { return fut.get(); } - catch (CancellationException e) { + catch (CancellationException | ExecutionException | InterruptedException e) { } - catch (InterruptedException e) { - } - catch (ExecutionException e) { - } } return null; } Modified: VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -62,14 +62,10 @@ catch (TimeoutException e) { return false; } - catch (CancellationException e) { - // Should not happen, the poision pill is never cancelled. + catch (CancellationException | ExecutionException e) { + // Should not happen, the poision pill is never cancelled / runs no code throw new IllegalStateException(e); } - catch (ExecutionException e) { - // Should not happen, the poision pill runs no code. - throw new IllegalStateException(e); - } finally { lock.unlock(); } @@ -189,10 +185,8 @@ try { f.get(); } - catch (CancellationException ignore) { + catch (CancellationException | ExecutionException ignore) { } - catch (ExecutionException ignore) { - } } } @@ -239,10 +233,8 @@ try { f.get(nanos, TimeUnit.NANOSECONDS); } - catch (CancellationException ignore) { + catch (CancellationException | ExecutionException ignore) { } - catch (ExecutionException ignore) { - } catch (TimeoutException toe) { return futures; } Modified: VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -258,14 +258,10 @@ try { return f.get(); } - catch (CancellationException e) { + catch (CancellationException | InterruptedException e) { // this should never happen throw new IllegalStateException(e); } - catch (InterruptedException e) { - // this should never happen - throw new IllegalStateException(e); - } catch (ExecutionException e) { throw new RuntimeException(e); } Modified: VASSAL-src/trunk/src/bsh/Remote.java =================================================================== --- VASSAL-src/trunk/src/bsh/Remote.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/bsh/Remote.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -189,13 +189,13 @@ System.out.println( "Return Value: "+returnValue ); - } catch (MalformedURLException e) { - System.out.println(e); // bad postURL - } catch (IOException e2) { - System.out.println(e2); // I/O error } + catch (IOException e) { + // bad postURL, I/O error + System.out.println(e); + } - return returnValue; + return returnValue; } /* Modified: VASSAL-src/trunk/src/org/netbeans/api/wizard/displayer/WizardDisplayerImpl.java =================================================================== --- VASSAL-src/trunk/src/org/netbeans/api/wizard/displayer/WizardDisplayerImpl.java 2020-05-24 15:32:29 UTC (rev 9412) +++ VASSAL-src/trunk/src/org/netbeans/api/wizard/displayer/WizardDisplayerImpl.java 2020-05-24 15:32:50 UTC (rev 9413) @@ -485,16 +485,11 @@ { EventQueue.invokeAndWait(this); } - catch (InvocationTargetException ex) + catch (InvocationTargetException | InterruptedException ex) { ex.printStackTrace(); return; } - catch (InterruptedException ex) - { - ex.printStackTrace(); - return; - } finally { buttonManager.getWindow().setCursor(Cursor.getDefaultCursor()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:32:32
|
Revision: 9412 http://sourceforge.net/p/vassalengine/svn/9412 Author: uckelman Date: 2020-05-24 15:32:29 +0000 (Sun, 24 May 2020) Log Message: ----------- Indentation. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java Modified: VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:32:19 UTC (rev 9411) +++ VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java 2020-05-24 15:32:29 UTC (rev 9412) @@ -465,27 +465,25 @@ } /** A functor for reading images. */ - protected static Wrapper<BufferedImage> readImage = - new Wrapper<>() { - /** - * Loads an image. - * - * @param name the image name - * @param in the input stream - * @return the image - * @throws UnrecognizedImageTypeException if the image type is unknown - * @throws IOException if reading the image goes wrong - */ - public BufferedImage run(String name, InputStream in) throws IOException { + protected static Wrapper<BufferedImage> readImage = new Wrapper<>() { + /** + * Loads an image. + * + * @param name the image name + * @param in the input stream + * @return the image + * @throws UnrecognizedImageTypeException if the image type is unknown + * @throws IOException if reading the image goes wrong + */ + public BufferedImage run(String name, InputStream in) throws IOException { + final BufferedImage img = + ImageIO.read(new MemoryCacheImageInputStream(in)); + if (img == null) throw new UnrecognizedImageTypeException(name); - final BufferedImage img = - ImageIO.read(new MemoryCacheImageInputStream(in)); - if (img == null) throw new UnrecognizedImageTypeException(name); + return img; + } + }; - return img; - } - }; - /** A functor for reading image dimensions. */ protected static Wrapper<Dimension> readSize = new Wrapper<>() { /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-24 15:32:23
|
Revision: 9411 http://sourceforge.net/p/vassalengine/svn/9411 Author: uckelman Date: 2020-05-24 15:32:19 +0000 (Sun, 24 May 2020) Log Message: ----------- replaced explicit type with diamond operator Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java VASSAL-src/trunk/src/VASSAL/build/GameModule.java VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java VASSAL-src/trunk/src/VASSAL/build/module/DiceButton.java VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java VASSAL-src/trunk/src/VASSAL/build/module/EventLog.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsManager.java VASSAL-src/trunk/src/VASSAL/build/module/GameRefresher.java VASSAL-src/trunk/src/VASSAL/build/module/GameState.java VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java VASSAL-src/trunk/src/VASSAL/build/module/Map.java VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java VASSAL-src/trunk/src/VASSAL/build/module/ObscurableOptions.java VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java VASSAL-src/trunk/src/VASSAL/build/module/PrivateMap.java VASSAL-src/trunk/src/VASSAL/build/module/PrototypeDefinition.java VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java VASSAL-src/trunk/src/VASSAL/build/module/SpecialDie.java VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImage.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayout.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/InstanceConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java VASSAL-src/trunk/src/VASSAL/build/module/map/CompoundPieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/CounterDetailViewer.java VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java VASSAL-src/trunk/src/VASSAL/build/module/map/HighlightLastMoved.java VASSAL-src/trunk/src/VASSAL/build/module/map/ImageSaver.java VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java VASSAL-src/trunk/src/VASSAL/build/module/map/MapShader.java VASSAL-src/trunk/src/VASSAL/build/module/map/MenuDisplayer.java VASSAL-src/trunk/src/VASSAL/build/module/map/MovementReporter.java VASSAL-src/trunk/src/VASSAL/build/module/map/PieceMover.java VASSAL-src/trunk/src/VASSAL/build/module/map/SelectionHighlighters.java VASSAL-src/trunk/src/VASSAL/build/module/map/SetupStack.java VASSAL-src/trunk/src/VASSAL/build/module/map/SimplePieceCollection.java VASSAL-src/trunk/src/VASSAL/build/module/map/Zoomer.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/Board.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/HexGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/RegionGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/SquareGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/ZonedGrid.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/Zone.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/ZoneHighlight.java VASSAL-src/trunk/src/VASSAL/build/module/map/boardPicker/board/mapgrid/ZonedGridHighlighter.java VASSAL-src/trunk/src/VASSAL/build/module/metadata/AbstractMetaData.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/PrivateNotesController.java VASSAL-src/trunk/src/VASSAL/build/module/noteswindow/SecretNotesController.java VASSAL-src/trunk/src/VASSAL/build/module/properties/GlobalProperties.java VASSAL-src/trunk/src/VASSAL/build/module/properties/MutablePropertiesContainer.java VASSAL-src/trunk/src/VASSAL/build/module/properties/MutableProperty.java VASSAL-src/trunk/src/VASSAL/build/module/properties/PropertyChangerConfigurer.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnComponent.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnLevel.java VASSAL-src/trunk/src/VASSAL/build/module/turn/TurnTracker.java VASSAL-src/trunk/src/VASSAL/build/widget/BoxWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/ListWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/PanelWidget.java VASSAL-src/trunk/src/VASSAL/build/widget/TabWidget.java VASSAL-src/trunk/src/VASSAL/chat/CgiServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/ChatServerFactory.java VASSAL-src/trunk/src/VASSAL/chat/HttpMessageServer.java VASSAL-src/trunk/src/VASSAL/chat/HttpRequestWrapper.java VASSAL-src/trunk/src/VASSAL/chat/PrivateChatManager.java VASSAL-src/trunk/src/VASSAL/chat/ServerStatus.java VASSAL-src/trunk/src/VASSAL/chat/SimpleRoom.java VASSAL-src/trunk/src/VASSAL/chat/SoundEncoder.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberClient.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberPlayer.java VASSAL-src/trunk/src/VASSAL/chat/jabber/JabberRoom.java VASSAL-src/trunk/src/VASSAL/chat/messageboard/MessageViewer.java VASSAL-src/trunk/src/VASSAL/chat/node/AsynchronousServerNode.java VASSAL-src/trunk/src/VASSAL/chat/node/ConnectionLimiter.java VASSAL-src/trunk/src/VASSAL/chat/node/Node.java VASSAL-src/trunk/src/VASSAL/chat/node/ServerNode.java VASSAL-src/trunk/src/VASSAL/chat/node/SocketHandler.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomManager.java VASSAL-src/trunk/src/VASSAL/chat/peer2peer/RoomTracker.java VASSAL-src/trunk/src/VASSAL/chat/ui/RoomInteractionControlsInitializer.java VASSAL-src/trunk/src/VASSAL/chat/ui/ServerStatusView.java VASSAL-src/trunk/src/VASSAL/command/Command.java VASSAL-src/trunk/src/VASSAL/configure/AutoConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/CompoundValidityChecker.java VASSAL-src/trunk/src/VASSAL/configure/ConfigureTree.java VASSAL-src/trunk/src/VASSAL/configure/EditPropertiesAction.java VASSAL-src/trunk/src/VASSAL/configure/KeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ListConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/NamedKeyStrokeArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/PieceAccessConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/StringArrayConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/TableConfigurer.java VASSAL-src/trunk/src/VASSAL/configure/ValidationReport.java VASSAL-src/trunk/src/VASSAL/counters/ActionButton.java VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java VASSAL-src/trunk/src/VASSAL/counters/BoundsTracker.java VASSAL-src/trunk/src/VASSAL/counters/CalculatedProperty.java VASSAL-src/trunk/src/VASSAL/counters/ColoredBorder.java VASSAL-src/trunk/src/VASSAL/counters/Deck.java VASSAL-src/trunk/src/VASSAL/counters/Decorator.java VASSAL-src/trunk/src/VASSAL/counters/DragBuffer.java VASSAL-src/trunk/src/VASSAL/counters/DynamicProperty.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java VASSAL-src/trunk/src/VASSAL/counters/Embellishment0.java VASSAL-src/trunk/src/VASSAL/counters/Footprint.java VASSAL-src/trunk/src/VASSAL/counters/FreeRotator.java VASSAL-src/trunk/src/VASSAL/counters/Hideable.java VASSAL-src/trunk/src/VASSAL/counters/Immobilized.java VASSAL-src/trunk/src/VASSAL/counters/KeyBuffer.java VASSAL-src/trunk/src/VASSAL/counters/KeyCommandSubMenu.java VASSAL-src/trunk/src/VASSAL/counters/Labeler.java VASSAL-src/trunk/src/VASSAL/counters/Marker.java VASSAL-src/trunk/src/VASSAL/counters/MassPieceDefiner.java VASSAL-src/trunk/src/VASSAL/counters/MassPieceLoader.java VASSAL-src/trunk/src/VASSAL/counters/MovementMarkable.java VASSAL-src/trunk/src/VASSAL/counters/MultiImagePicker.java VASSAL-src/trunk/src/VASSAL/counters/NonRectangular.java VASSAL-src/trunk/src/VASSAL/counters/Obscurable.java VASSAL-src/trunk/src/VASSAL/counters/PieceIterator.java VASSAL-src/trunk/src/VASSAL/counters/PropertySheet.java VASSAL-src/trunk/src/VASSAL/counters/RestrictCommands.java VASSAL-src/trunk/src/VASSAL/counters/SendToLocation.java VASSAL-src/trunk/src/VASSAL/counters/SetGlobalProperty.java VASSAL-src/trunk/src/VASSAL/counters/Stack.java VASSAL-src/trunk/src/VASSAL/counters/SubMenu.java VASSAL-src/trunk/src/VASSAL/counters/Translate.java VASSAL-src/trunk/src/VASSAL/counters/TriggerAction.java VASSAL-src/trunk/src/VASSAL/i18n/ComponentI18nData.java VASSAL-src/trunk/src/VASSAL/i18n/LocaleConfigurer.java VASSAL-src/trunk/src/VASSAL/i18n/Localization.java VASSAL-src/trunk/src/VASSAL/i18n/PieceI18nData.java VASSAL-src/trunk/src/VASSAL/i18n/Resources.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateAction.java VASSAL-src/trunk/src/VASSAL/i18n/TranslateVassalWindow.java VASSAL-src/trunk/src/VASSAL/launch/AbstractLaunchAction.java VASSAL-src/trunk/src/VASSAL/launch/GameModuleAction.java VASSAL-src/trunk/src/VASSAL/launch/LaunchRequest.java VASSAL-src/trunk/src/VASSAL/launch/ModuleManagerWindow.java VASSAL-src/trunk/src/VASSAL/launch/TilingHandler.java VASSAL-src/trunk/src/VASSAL/preferences/Prefs.java VASSAL-src/trunk/src/VASSAL/preferences/PrefsEditor.java VASSAL-src/trunk/src/VASSAL/property/ConcurrentPropertySupport.java VASSAL-src/trunk/src/VASSAL/property/SinglePropertyContainer.java VASSAL-src/trunk/src/VASSAL/script/ExpressionInterpreter.java VASSAL-src/trunk/src/VASSAL/script/expression/FunctionBuilder.java VASSAL-src/trunk/src/VASSAL/script/proxy/Map.java VASSAL-src/trunk/src/VASSAL/script/proxy/Stack.java VASSAL-src/trunk/src/VASSAL/tools/ActionManager.java VASSAL-src/trunk/src/VASSAL/tools/ComponentPathBuilder.java VASSAL-src/trunk/src/VASSAL/tools/ComponentSplitter.java VASSAL-src/trunk/src/VASSAL/tools/DataArchive.java VASSAL-src/trunk/src/VASSAL/tools/DialogUtils.java VASSAL-src/trunk/src/VASSAL/tools/ErrorDialog.java VASSAL-src/trunk/src/VASSAL/tools/FormattedString.java VASSAL-src/trunk/src/VASSAL/tools/IterableEnumeration.java VASSAL-src/trunk/src/VASSAL/tools/IterableIterator.java VASSAL-src/trunk/src/VASSAL/tools/KeyStrokeListener.java VASSAL-src/trunk/src/VASSAL/tools/NamedKeyManager.java VASSAL-src/trunk/src/VASSAL/tools/Pair.java VASSAL-src/trunk/src/VASSAL/tools/SavedGameUpdater.java VASSAL-src/trunk/src/VASSAL/tools/SplashScreen.java VASSAL-src/trunk/src/VASSAL/tools/StringUtils.java VASSAL-src/trunk/src/VASSAL/tools/ThreadManager.java VASSAL-src/trunk/src/VASSAL/tools/UniqueIdManager.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/ConcurrentSoftHashMap.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/Exec.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/RangedRunnable.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DefaultEventListenerSupport.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/DefaultMultiEventListenerSupport.java VASSAL-src/trunk/src/VASSAL/tools/concurrent/listener/EventAccumulator.java VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageIOImageLoader.java VASSAL-src/trunk/src/VASSAL/tools/image/ImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/svg/SVGImageUtils.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ImageTileDiskCache.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ImageToTiles.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/TileSlicerImpl.java VASSAL-src/trunk/src/VASSAL/tools/image/tilecache/ZipFileImageTiler.java VASSAL-src/trunk/src/VASSAL/tools/imageop/CropOpBitmapImpl.java VASSAL-src/trunk/src/VASSAL/tools/imageop/OwningOpMultiResolutionImage.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/ADC2Module.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/MapBoard.java VASSAL-src/trunk/src/VASSAL/tools/imports/adc2/SymbolSet.java VASSAL-src/trunk/src/VASSAL/tools/io/CompositeInputStream.java VASSAL-src/trunk/src/VASSAL/tools/io/FileUtils.java VASSAL-src/trunk/src/VASSAL/tools/io/InputOutputStreamPump.java VASSAL-src/trunk/src/VASSAL/tools/io/Tailer.java VASSAL-src/trunk/src/VASSAL/tools/io/ZipArchive.java VASSAL-src/trunk/src/VASSAL/tools/ipc/IPCMessenger.java VASSAL-src/trunk/src/VASSAL/tools/lang/Pair.java VASSAL-src/trunk/src/VASSAL/tools/logging/LogPane.java VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractParent.java VASSAL-src/trunk/src/VASSAL/tools/menu/AbstractProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/CheckBoxMenuItemProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuBarProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuItemProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuManager.java VASSAL-src/trunk/src/VASSAL/tools/menu/MenuProxy.java VASSAL-src/trunk/src/VASSAL/tools/menu/SeparatorProxy.java VASSAL-src/trunk/src/VASSAL/tools/opcache/AbstractOpImpl.java VASSAL-src/trunk/src/VASSAL/tools/opcache/OpCache.java VASSAL-src/trunk/src/VASSAL/tools/swing/EDTExecutorService.java VASSAL-src/trunk/src/VASSAL/tools/swing/ProgressDialog.java VASSAL-src/trunk/src/VASSAL/tools/version/SimpleVersionTokenizer.java VASSAL-src/trunk/src/VASSAL/tools/version/VassalVersionTokenizer.java VASSAL-src/trunk/src/VASSAL/tools/version/Version.java Modified: VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/AbstractBuildable.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -40,7 +40,7 @@ * handled automatically. */ public abstract class AbstractBuildable implements Buildable, ValidityChecker, PropertyNameSource { - protected List<Buildable> buildComponents = new ArrayList<Buildable>(); + protected List<Buildable> buildComponents = new ArrayList<>(); // Sub-classes can set this reference to perform validity checking protected ValidityChecker validator; @@ -115,7 +115,7 @@ * @return all build components that are an instance of the given class */ public <T> List<T> getComponentsOf(Class<T> target) { - final ArrayList<T> l = new ArrayList<T>(); + final ArrayList<T> l = new ArrayList<>(); for (Buildable b : buildComponents) { if (target.isInstance(b)) { l.add(target.cast(b)); @@ -145,7 +145,7 @@ * @return */ public <T> List<T> getAllDescendantComponentsOf(Class<T> target) { - ArrayList<T> l = new ArrayList<T>(); + ArrayList<T> l = new ArrayList<>(); addComponents(target, l); return l; } @@ -225,6 +225,6 @@ * Default implementation of PropertyNameSource - No properties exposed */ public List<String> getPropertyNames() { - return new ArrayList<String>(); + return new ArrayList<>(); } } Modified: VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/AbstractConfigurable.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -156,7 +156,7 @@ } public Configurable[] getConfigureComponents() { - final ArrayList<Configurable> l = new ArrayList<Configurable>(); + final ArrayList<Configurable> l = new ArrayList<>(); for (Buildable b : getBuildables()) { if (b instanceof Configurable) { l.add((Configurable) b); Modified: VASSAL-src/trunk/src/VASSAL/build/GameModule.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -166,12 +166,10 @@ protected WizardSupport wizardSupport; protected PropertyChangeSupport idChangeSupport; - protected List<KeyStrokeSource> keyStrokeSources = - new ArrayList<KeyStrokeSource>(); - protected List<KeyStrokeListener> keyStrokeListeners = - new ArrayList<KeyStrokeListener>(); + protected List<KeyStrokeSource> keyStrokeSources = new ArrayList<>(); + protected List<KeyStrokeListener> keyStrokeListeners = new ArrayList<>(); protected CommandEncoder[] commandEncoders = new CommandEncoder[0]; - protected List<String> deferredChat = new ArrayList<String>(); + protected List<String> deferredChat = new ArrayList<>(); protected int nextGpId = 0; @@ -1079,7 +1077,7 @@ } protected Long buildCrc() { - final List<File> files = new ArrayList<File>(); + final List<File> files = new ArrayList<>(); if (getDataArchive().getArchive() != null) { files.add(new File(getDataArchive().getName())); } Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -40,8 +40,8 @@ protected int maxId; protected boolean useName = false; protected boolean extensionsLoaded = false; - final HashMap<String, SlotElement> goodSlots = new HashMap<String, SlotElement>(); - final ArrayList<SlotElement> errorSlots = new ArrayList<SlotElement>(); + final HashMap<String, SlotElement> goodSlots = new HashMap<>(); + final ArrayList<SlotElement> errorSlots = new ArrayList<>(); public GpIdChecker() { this(null); Modified: VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/BasicCommandEncoder.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -92,9 +92,9 @@ LoggerFactory.getLogger(BasicCommandEncoder.class); private Map<String,BasicPieceFactory> basicFactories = - new HashMap<String,BasicPieceFactory>(); + new HashMap<>(); private Map<String,DecoratorFactory> decoratorFactories = - new HashMap<String,DecoratorFactory>(); + new HashMap<>(); public BasicCommandEncoder() { basicFactories.put(Stack.TYPE, new BasicPieceFactory() { Modified: VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/BasicLogger.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -94,8 +94,8 @@ undoAction.setEnabled(false); endLogAction.setEnabled(false); newLogAction.setEnabled(false); - logInput = new ArrayList<Command>(); - logOutput = new ArrayList<Command>(); + logInput = new ArrayList<>(); + logOutput = new ArrayList<>(); } public void build(Element e) { } Modified: VASSAL-src/trunk/src/VASSAL/build/module/DiceButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/DiceButton.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/DiceButton.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -465,7 +465,7 @@ * Implement PropertyNameSource - Expose roll result property */ public List<String> getPropertyNames() { - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); l.add(getConfigureName()+"_result"); return l; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/DieManager.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -52,8 +52,7 @@ public class DieManager extends AbstractConfigurable { private Map<String,DieServer> servers; - private List<InternetDiceButton> dieButtons = - new ArrayList<InternetDiceButton>(); + private List<InternetDiceButton> dieButtons = new ArrayList<>(); private String desc = "Die Manager"; private boolean useMultiRoll; private int defaultNDice = 2; @@ -81,7 +80,7 @@ public DieManager() { DieServer d; - servers = new HashMap<String,DieServer>(); + servers = new HashMap<>(); /* * Create the Internet Dice Servers we know about Modified: VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -91,7 +91,7 @@ protected boolean doSound = false; protected String soundClip = ""; //$NON-NLS-1$ protected boolean doHotkey = false; - protected List<NamedKeyStroke> hotkeys = new ArrayList<NamedKeyStroke>(); + protected List<NamedKeyStroke> hotkeys = new ArrayList<>(); protected boolean doLoop = false; protected String loopType = LoopControl.LOOP_COUNTED; protected FormattedString loopCount = new FormattedString("1"); //$NON-NLS-1$ @@ -510,7 +510,7 @@ } protected List<NamedKeyStroke> decodeHotkeys(String s) { - List<NamedKeyStroke> list = new ArrayList<NamedKeyStroke>(); + List<NamedKeyStroke> list = new ArrayList<>(); SequenceEncoder.Decoder sd = new SequenceEncoder.Decoder(s, ','); while (sd.hasMoreTokens()) { NamedKeyStroke key = NamedHotKeyConfigurer.decode(sd.nextToken()); @@ -720,7 +720,7 @@ */ public List<String> getPropertyNames() { if (doLoop && hasIndex) { - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); l.add(indexProperty); return l; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/EventLog.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/EventLog.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/EventLog.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -44,8 +44,8 @@ mod.addCommandEncoder(this); mod.getGameState().addGameComponent(this); mod.getPrefs().addOption(new StringConfigurer(EVENT_LIST, null)); - myEvents = new ArrayList<Event>(); - savedEvents = new ArrayList<Event>(); + myEvents = new ArrayList<>(); + savedEvents = new ArrayList<>(); for (Event e : decodedEvents((String) mod.getPrefs().getValue(EVENT_LIST))) myEvents.add(e); @@ -102,9 +102,9 @@ * @return the events represented by the string */ public static Iterable<Event> decodedEvents(final String s) { - return new Iterable<Event>() { + return new Iterable<>() { public Iterator<Event> iterator() { - return new Iterator<Event>() { + return new Iterator<>() { private final SequenceEncoder.Decoder se = new SequenceEncoder.Decoder(s, '|'); @@ -130,7 +130,7 @@ /** Use {@link #decodedEvents()} instead. */ @Deprecated public static Enumeration<Event> decodeEvents(String s) { - ArrayList<Event> l = new ArrayList<Event>(); + ArrayList<Event> l = new ArrayList<>(); SequenceEncoder.Decoder se = new SequenceEncoder.Decoder(s, '|'); while (se.hasMoreTokens()) { SequenceEncoder.Decoder sub = Modified: VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsLoader.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -47,8 +47,8 @@ public static final String SPECIFY_DIR_IN_PREFS = "specifyExtensionDirInPrefs"; //$NON-NLS-1$ public static final String EXTENSION_DIR = "extensionDIR"; //$NON-NLS-1$ - protected Set<String> loadedExtensions = new HashSet<String>(); - protected HashMap<String,String> loadedIds = new HashMap<String,String>(); + protected Set<String> loadedExtensions = new HashSet<>(); + protected HashMap<String,String> loadedIds = new HashMap<>(); protected ExtensionsManager extMgr; protected ExtensionsManager globalExtMgr; Modified: VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsManager.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/ExtensionsManager.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -156,7 +156,7 @@ } private List<File> getExtensions(File dir) { - final List<File> extensions = new ArrayList<File>(0); + final List<File> extensions = new ArrayList<>(0); if (dir != null && dir.exists()) { File[] files = dir.listFiles(filter); if (files == null) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameRefresher.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameRefresher.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameRefresher.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -134,7 +134,7 @@ * 2. Make a list of all pieces in the game that we have access to */ final Command command = new NullCommand(); - final ArrayList<GamePiece> pieces = new ArrayList<GamePiece>(); + final ArrayList<GamePiece> pieces = new ArrayList<>(); for (GamePiece piece : theModule.getGameState().getAllPieces()) { if (piece instanceof Deck) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -95,9 +95,9 @@ private static final org.slf4j.Logger log = LoggerFactory.getLogger(GameState.class); - protected Map<String,GamePiece> pieces = new HashMap<String,GamePiece>(); - protected List<GameComponent> gameComponents = new ArrayList<GameComponent>(); - protected List<GameSetupStep> setupSteps = new ArrayList<GameSetupStep>(); + protected Map<String,GamePiece> pieces = new HashMap<>(); + protected List<GameComponent> gameComponents = new ArrayList<>(); + protected List<GameSetupStep> setupSteps = new ArrayList<>(); protected Action loadGame, saveGame, saveGameAs, newGame, closeGame; protected String lastSave; protected File lastSaveFile = null; @@ -238,7 +238,7 @@ * yet finished */ public Iterator<GameSetupStep> getUnfinishedSetupSteps() { - ArrayList<GameSetupStep> l = new ArrayList<GameSetupStep>(); + ArrayList<GameSetupStep> l = new ArrayList<>(); for (GameSetupStep step : setupSteps) { if (!step.isFinished()) { l.add(step); @@ -850,9 +850,9 @@ */ public Command getRestorePiecesCommand() { // TODO remove stacks that were empty when the game was loaded and are still empty now - final List<GamePiece> pieceList = new ArrayList<GamePiece>(pieces.values()); - Collections.sort(pieceList, new Comparator<GamePiece>() { - private final Map<GamePiece,Integer> indices = new HashMap<GamePiece,Integer>(); + final List<GamePiece> pieceList = new ArrayList<>(pieces.values()); + Collections.sort(pieceList, new Comparator<>() { + private final Map<GamePiece, Integer> indices = new HashMap<>(); // Cache indices because indexOf() is linear; // otherwise sorting would be quadratic. Modified: VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/GlobalOptions.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -93,9 +93,8 @@ private String autoReport = ALWAYS; private String markMoved = NEVER; - private Map<String,Object> properties = new HashMap<String,Object>(); - private static Map<String,Configurer> optionConfigurers = - new LinkedHashMap<String,Configurer>(); + private Map<String,Object> properties = new HashMap<>(); + private static Map<String,Configurer> optionConfigurers = new LinkedHashMap<>(); private static Properties optionInitialValues = new Properties(); private FormattedString playerIdFormat = new FormattedString("$" + PLAYER_NAME + "$"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -221,7 +220,7 @@ } public String[] getAttributeNames() { - final ArrayList<String> attributes = new ArrayList<String>( + final ArrayList<String> attributes = new ArrayList<>( Arrays.asList( NON_OWNER_UNMASKABLE, PROMPT_STRING, @@ -443,7 +442,7 @@ * Implement PropertyNameSource - Expose our preference names */ public List<String> getPropertyNames() { - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); for (Buildable b : getBuildables()) { if (b instanceof BasicPreference) { l.add(((BasicPreference) b).getVariableName()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/Inventory.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -451,7 +451,7 @@ m.getPieces(); } - final ArrayList<String> path = new ArrayList<String>(); + final ArrayList<String> path = new ArrayList<>(); for (String value : groupBy) path.add(value); results = new CounterInventory( new Counter(this.getConfigureName()), path, sortPieces); @@ -462,7 +462,7 @@ ); while (pi.hasMoreElements()) { - final ArrayList<String> groups = new ArrayList<String>(); + final ArrayList<String> groups = new ArrayList<>(); final GamePiece p = pi.nextPiece(); if (p instanceof Decorator || p instanceof BasicPiece) { @@ -860,7 +860,7 @@ Command c = new NullCommand(); final TreePath[] tp = tree.getSelectionPaths(); // set to not get duplicates - HashSet<GamePiece> pieces = new HashSet<GamePiece>(); + HashSet<GamePiece> pieces = new HashSet<>(); for (TreePath treePath : tp) { CounterNode node = (CounterNode) treePath.getLastPathComponent(); if (node.isLeaf()) { @@ -887,7 +887,7 @@ private void refresh() { // Make an attempt to keep the same nodes expanded - HashSet<String> expanded = new HashSet<String>(); + HashSet<String> expanded = new HashSet<>(); for (int i = 0, n = tree.getRowCount(); i < n; ++i) { if (tree.isExpanded(i)) { expanded.add(tree.getPathForRow(i).getLastPathComponent().toString()); @@ -1165,7 +1165,7 @@ this.entry = entry; this.counter = counter; counter.setNode(this); - children = new ArrayList<CounterNode>(); + children = new ArrayList<>(); } public String toString() { @@ -1296,7 +1296,7 @@ } public void cutLeaves() { - ArrayList<CounterNode> toBeRemoved = new ArrayList<CounterNode>(); + ArrayList<CounterNode> toBeRemoved = new ArrayList<>(); for (CounterNode child : children) { if (child.isLeaf()) toBeRemoved.add(child); @@ -1472,7 +1472,7 @@ public class CounterInventory implements TreeModel { // Needed for TreeModel protected List<TreeModelListener> treeModelListeners = - new ArrayList<TreeModelListener>(); + new ArrayList<>(); // This contains shortcuts to the nodes of the tree protected Map<String,CounterNode> inventory; // The start of the tree @@ -1489,7 +1489,7 @@ public CounterInventory(Counter c, List<String> path, boolean sort) { this.root = new CounterNode(c.getName(), c); this.path = path; - this.inventory = new HashMap<String,CounterNode>(); + this.inventory = new HashMap<>(); this.sort = sort; changed = true; } Modified: VASSAL-src/trunk/src/VASSAL/build/module/Map.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -185,7 +185,7 @@ protected static final String MAIN_WINDOW_HEIGHT = "mainWindowHeight"; //$NON-NLS-1$ protected static UniqueIdManager idMgr = new UniqueIdManager("Map"); //$NON-NLS-1$ protected JPanel theMap; - protected ArrayList<Drawable> drawComponents = new ArrayList<Drawable>(); + protected ArrayList<Drawable> drawComponents = new ArrayList<>(); protected JLayeredPane layeredPane = new JLayeredPane(); protected JScrollPane scroll; protected ComponentSplitter.SplitPane mainWindowDock; @@ -203,14 +203,13 @@ protected String markUnmovedText = ""; //$NON-NLS-1$ protected String markUnmovedTooltip = Resources.getString("Map.mark_unmoved"); //$NON-NLS-1$ protected MouseListener multicaster = null; - protected ArrayList<MouseListener> mouseListenerStack = - new ArrayList<MouseListener>(); - protected List<Board> boards = new CopyOnWriteArrayList<Board>(); + protected ArrayList<MouseListener> mouseListenerStack = new ArrayList<>(); + protected List<Board> boards = new CopyOnWriteArrayList<>(); protected int[][] boardWidths; // Cache of board widths by row/column protected int[][] boardHeights; // Cache of board heights by row/column protected PieceCollection pieces = new DefaultPieceCollection(); protected Highlighter highlighter = new ColoredBorder(); - protected ArrayList<Highlighter> highlighters = new ArrayList<Highlighter>(); + protected ArrayList<Highlighter> highlighters = new ArrayList<>(); protected boolean clearFirst = false; // Whether to clear the display before // drawing the map protected boolean hideCounters = false; // Option to hide counters to see @@ -1252,7 +1251,7 @@ if (!this.equals(activeMap)) { boolean dirty = false; - final ArrayList<GamePiece> l = new ArrayList<GamePiece>(); + final ArrayList<GamePiece> l = new ArrayList<>(); for (Iterator<GamePiece> i = KeyBuffer.getBuffer().getPiecesIterator(); i.hasNext(); ) { l.add(i.next()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/MultiRoll.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -146,7 +146,7 @@ } public RollSet getRollSet() { - ArrayList<DieRoll> l = new ArrayList<DieRoll>(); + ArrayList<DieRoll> l = new ArrayList<>(); for (int i = 0; i < MAX_ROLLS; ++i) { if (useDie[i]) { l.add(rolls[i]); Modified: VASSAL-src/trunk/src/VASSAL/build/module/ObscurableOptions.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ObscurableOptions.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/ObscurableOptions.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -48,7 +48,7 @@ public static final String COMMAND_ID = "UNMASK\t"; //$NON-NLS-1$ public static final String PREFS_KEY = "OpponentUnmaskable"; //$NON-NLS-1$ - private List<String> allowed = new ArrayList<String>(); + private List<String> allowed = new ArrayList<>(); private Boolean override; private ObscurableOptions() { @@ -139,7 +139,7 @@ public Command decode(String command) { if (command.startsWith(COMMAND_ID)) { command = command.substring(COMMAND_ID.length()); - ArrayList<String> l = new ArrayList<String>(); + ArrayList<String> l = new ArrayList<>(); SequenceEncoder.Decoder st = new SequenceEncoder.Decoder(command, '\t'); while (st.hasMoreTokens()) { l.add(st.nextToken()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/PlayerRoster.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -67,12 +67,12 @@ public static final String SIDES = "sides"; //$NON-NLS-1$ public static final String COMMAND_PREFIX = "PLAYER\t"; //$NON-NLS-1$ public static final String OBSERVER = "<observer>"; //$NON-NLS-1$ - protected List<PlayerInfo> players = new ArrayList<PlayerInfo>(); - protected List<String> sides = new ArrayList<String>(); + protected List<PlayerInfo> players = new ArrayList<>(); + protected List<String> sides = new ArrayList<>(); protected String[] untranslatedSides; protected LaunchButton retireButton; protected List<SideChangeListener> sideChangeListeners = - new ArrayList<SideChangeListener>(); + new ArrayList<>(); protected String translatedObserver; @@ -387,8 +387,8 @@ } public Component getControls() { - ArrayList<String> availableSides = new ArrayList<String>(sides); - ArrayList<String> alreadyTaken = new ArrayList<String>(); + ArrayList<String> availableSides = new ArrayList<>(sides); + ArrayList<String> alreadyTaken = new ArrayList<>(); for (PlayerInfo p : players) { alreadyTaken.add(p.side); @@ -449,8 +449,8 @@ } protected String promptForSide() { - ArrayList<String> availableSides = new ArrayList<String>(sides); - ArrayList<String> alreadyTaken = new ArrayList<String>(); + ArrayList<String> availableSides = new ArrayList<>(sides); + ArrayList<String> alreadyTaken = new ArrayList<>(); for (PlayerInfo p : players) { alreadyTaken.add(p.side); @@ -635,7 +635,7 @@ if (SIDES.equals(key)) { untranslatedSides = sides.toArray(new String[sides.size()]); String[] s = StringArrayConfigurer.stringToArray((String) value); - sides = new ArrayList<String>(s.length); + sides = new ArrayList<>(s.length); for (String item : s) { sides.add(item); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/PrivateMap.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PrivateMap.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/PrivateMap.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -285,11 +285,11 @@ private static final long serialVersionUID = 1L; private boolean listenersActive; - private List<KeyListener> keyListeners = new ArrayList<KeyListener>(); + private List<KeyListener> keyListeners = new ArrayList<>(); private List<MouseListener> mouseListeners = - new ArrayList<MouseListener>(); + new ArrayList<>(); private List<MouseMotionListener> mouseMotionListeners = - new ArrayList<MouseMotionListener>(); + new ArrayList<>(); private DropTarget dropTarget; public View(PrivateMap m) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/PrototypeDefinition.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PrototypeDefinition.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/PrototypeDefinition.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -59,7 +59,7 @@ ValidityChecker { private String name = "Prototype"; //$NON-NLS-1$ private java.util.Map<String,GamePiece> pieces = - new HashMap<String,GamePiece>(); + new HashMap<>(); private String pieceDefinition; private static UniqueIdManager idMgr = new UniqueIdManager("prototype-"); //$NON-NLS-1$ private PropertyChangeSupport propSupport = new PropertyChangeSupport(this); Modified: VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/PrototypesContainer.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -42,7 +42,7 @@ public class PrototypesContainer extends AbstractConfigurable { private static PrototypesContainer instance; private Map<String,PrototypeDefinition> definitions = - new HashMap<String,PrototypeDefinition>(); + new HashMap<>(); public String[] getAttributeDescriptions() { return new String[0]; Modified: VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -186,7 +186,7 @@ */ public String[] getAttributeNames() { ArrayList<String> l = - new ArrayList<String>(Arrays.asList(super.getAttributeNames())); + new ArrayList<>(Arrays.asList(super.getAttributeNames())); l.remove(N_SIDES); l.add(FACES); l.add(NUMERIC); @@ -195,9 +195,9 @@ public String[] getAttributeDescriptions() { ArrayList<String> l = - new ArrayList<String>(Arrays.asList(super.getAttributeDescriptions())); + new ArrayList<>(Arrays.asList(super.getAttributeDescriptions())); ArrayList<String> names = - new ArrayList<String>(Arrays.asList(super.getAttributeNames())); + new ArrayList<>(Arrays.asList(super.getAttributeNames())); l.remove(names.indexOf(N_SIDES)); l.add(Resources.getString("Editor.RandomTextButton.faces")); //$NON-NLS-1$ l.add(Resources.getString("Editor.RandomTextButton.faces_numeric")); //$NON-NLS-1$ @@ -206,9 +206,9 @@ public Class<?>[] getAttributeTypes() { ArrayList<Class<?>> l = - new ArrayList<Class<?>>(Arrays.asList(super.getAttributeTypes())); + new ArrayList<>(Arrays.asList(super.getAttributeTypes())); ArrayList<String> names = - new ArrayList<String>(Arrays.asList(super.getAttributeNames())); + new ArrayList<>(Arrays.asList(super.getAttributeNames())); l.remove(names.indexOf(N_SIDES)); l.add(String[].class); l.add(Boolean.class); Modified: VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/SpecialDiceButton.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -80,7 +80,7 @@ protected static UniqueIdManager idMgr = new UniqueIdManager("SpecialDiceButton"); //$NON-NLS-1$ public static final String SHOW_RESULTS_COMMAND = "SHOW_RESULTS\t"; //$NON-NLS-1$ - protected List<SpecialDie> dice = new ArrayList<SpecialDie>(); + protected List<SpecialDie> dice = new ArrayList<>(); protected java.util.Random ran; protected boolean reportResultAsText = true; protected boolean reportResultInWindow = false; @@ -535,7 +535,7 @@ return EMPTY; } final SequenceEncoder.Decoder st = new SequenceEncoder.Decoder(s, ','); - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); while (st.hasMoreTokens()) { l.add(st.nextToken()); } @@ -550,7 +550,7 @@ * Implement PropertyNameSource - Expose roll result property */ public List<String> getPropertyNames() { - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); l.add(getConfigureName()+"_result"); return l; } @@ -581,7 +581,7 @@ st.nextToken(); } if (st != null) { - final ArrayList<String> l = new ArrayList<String>(); + final ArrayList<String> l = new ArrayList<>(); while (st.hasMoreTokens()) { l.add(st.nextToken()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/SpecialDie.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/SpecialDie.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/SpecialDie.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -39,7 +39,7 @@ private static final Logger logger = LoggerFactory.getLogger(SpecialDie.class); - private List<SpecialDieFace> dieFaceList = new ArrayList<SpecialDieFace>(); + private List<SpecialDieFace> dieFaceList = new ArrayList<>(); private FormattedString format = new FormattedString("$" + RESULT + "$"); //$NON-NLS-1$ //$NON-NLS-2$ public static final String NAME = "name"; //$NON-NLS-1$ Modified: VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -71,9 +71,9 @@ /** Buttons where this property contains a JPopupMenu will turn into sub-menus */ public static final String MENU_PROPERTY = "ToolbarMenu.popup"; //$NON-NLS-1$ public static final String HIDDEN_BY_TOOLBAR = "hidden"; //$NON-NLS-1$ - protected List<String> menuItems = new ArrayList<String>(); + protected List<String> menuItems = new ArrayList<>(); protected Map<AbstractButton,JMenuItem> buttonsToMenuMap = - new HashMap<AbstractButton,JMenuItem>(); + new HashMap<>(); protected LaunchButton launch; protected JToolBar toolbar; protected JPopupMenu menu; @@ -145,7 +145,7 @@ if (value instanceof String) { value = StringArrayConfigurer.stringToArray((String) value); } - menuItems = new ArrayList<String>(Arrays.asList((String[]) value)); + menuItems = new ArrayList<>(Arrays.asList((String[]) value)); if (toolbar != null) { scheduleBuildMenu(); } @@ -195,7 +195,7 @@ } buttonsToMenuMap.clear(); menu.removeAll(); - HashMap<String,JButton> nameToButton = new HashMap<String,JButton>(); + HashMap<String,JButton> nameToButton = new HashMap<>(); if (toolbar != null) { for (int i = 0, n = toolbar.getComponentCount(); i < n; ++i) { if (toolbar.getComponentAtIndex(i) instanceof JButton) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/WizardSupport.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -117,7 +117,7 @@ public static final String LOAD_GAME_ACTION = "loadGame"; //$NON-NLS-1$ public static final String WELCOME_WIZARD_ENABLED = "showWelcomeWizard"; //$NON-NLS-1$ protected Dimension logoSize = new Dimension(200, 200); - protected List<PredefinedSetup> setups = new ArrayList<PredefinedSetup>(); + protected List<PredefinedSetup> setups = new ArrayList<>(); protected Tutorial tutorial; public WizardSupport() { @@ -170,7 +170,7 @@ final WizardBranchController c = createWelcomeWizard(); final Wizard welcomeWizard = c.createWizard(); - final HashMap<String, Wizard> props = new HashMap<String, Wizard>(); + final HashMap<String, Wizard> props = new HashMap<>(); props.put(WELCOME_WIZARD_KEY, welcomeWizard); Action help = null; @@ -218,7 +218,7 @@ } public WizardPanelProvider createPlayOfflinePanels() { - ArrayList<PredefinedSetup> l = new ArrayList<PredefinedSetup>(); + ArrayList<PredefinedSetup> l = new ArrayList<>(); for (PredefinedSetup ps : setups) { if (!ps.isMenu()) l.add(ps); @@ -669,7 +669,7 @@ fileConfig = new FileConfigurer(null, Resources.getString("WizardSupport.SavedGame"), GameModule.getGameModule().getGameState().getSavedGameDirectoryPreference()); //$NON-NLS-1$ fileConfig.addPropertyChangeListener(new PropertyChangeListener() { - private Set<File> processing = new HashSet<File>(); + private Set<File> processing = new HashSet<>(); public void propertyChange(PropertyChangeEvent evt) { final File f = (File) evt.getNewValue(); @@ -755,8 +755,8 @@ public static GameSetupPanels newInstance() { GameSetupPanels panels = null; - final ArrayList<SetupStepPage> pages = new ArrayList<SetupStepPage>(); - final ArrayList<GameSetupStep> setupSteps = new ArrayList<GameSetupStep>(); + final ArrayList<SetupStepPage> pages = new ArrayList<>(); + final ArrayList<GameSetupStep> setupSteps = new ArrayList<>(); for (Iterator<GameSetupStep> i = GameModule.getGameModule().getGameState().getUnfinishedSetupSteps(); i.hasNext();) { final GameSetupStep step = i.next(); setupSteps.add(step); Modified: VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/dice/BonesDiceServer.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -106,7 +106,7 @@ public void doIRoll(RollSet toss) throws IOException { final String[] rollString = buildInternetRollString(toss); - final Vector<String> returnString = new Vector<String>(); + final Vector<String> returnString = new Vector<>(); final URL url = new URL(rollString[0]); final HttpURLConnection connection = Modified: VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -260,7 +260,7 @@ public void doIRoll(RollSet toss) throws IOException { final String[] rollString = buildInternetRollString(toss); - final ArrayList<String> returnString = new ArrayList<String>(); + final ArrayList<String> returnString = new ArrayList<>(); // rollString[0] = // "number1=2&type1=6&number2=2&type2=30&number3=2&type3=30" // + "&number4=0&type4=2&number5=0&type5=2&number6=0&type6=2&number7=0&type7=2" @@ -294,7 +294,7 @@ IOUtils.closeQuietly(in); } - parseInternetRollString(toss, new Vector<String>(returnString)); + parseInternetRollString(toss, new Vector<>(returnString)); } /** Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/ColorManager.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -108,7 +108,7 @@ * User defined Colors */ protected Map<String,ColorSwatch> userColors = - new HashMap<String,ColorSwatch>(); + new HashMap<>(); public ColorManager() { instance = this; @@ -229,11 +229,11 @@ } public String[] getColorNames() { - ArrayList<ColorSwatch> a = new ArrayList<ColorSwatch>(userColors.values()); + ArrayList<ColorSwatch> a = new ArrayList<>(userColors.values()); Collections.sort(a); ArrayList<String> names = - new ArrayList<String>(a.size() + standardColors.length); + new ArrayList<>(a.size() + standardColors.length); for (ColorSwatch cs : a) { names.add(cs.getConfigureName()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/FontManager.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -47,7 +47,7 @@ return instance; } - protected Map<String,FontStyle> fontStyles = new HashMap<String,FontStyle>(); + protected Map<String,FontStyle> fontStyles = new HashMap<>(); public static final String DIALOG = "Dialog"; //$NON-NLS-1$ public static final String SERIF = "Serif"; //$NON-NLS-1$ @@ -151,7 +151,7 @@ } public String[] getFontNames() { - ArrayList<String> names = new ArrayList<String>(fontStyles.size()); + ArrayList<String> names = new ArrayList<>(fontStyles.size()); for (FontStyle fs : fontStyles.values()) { names.add(fs.getConfigureName()); } Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImage.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImage.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceImage.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -57,7 +57,7 @@ public static final String BG_COLOR = "bgColor"; //$NON-NLS-1$ public static final String BORDER_COLOR = "borderColor"; //$NON-NLS-1$ - protected List<ItemInstance> instances = new ArrayList<ItemInstance>(); + protected List<ItemInstance> instances = new ArrayList<>(); protected InstanceConfigurer defnConfig = null; protected GamePieceLayout layout; protected ColorSwatch bgColor = ColorSwatch.getWhite(); @@ -402,7 +402,7 @@ * Reconcile our current elements with the elements in the owning scheme. */ protected void rebuildInstances() { - final ArrayList<ItemInstance> newInstances = new ArrayList<ItemInstance>(); + final ArrayList<ItemInstance> newInstances = new ArrayList<>(); for (ItemInstance prop : instances) { final Item item = layout.getItem(prop.getName()); Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayout.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayout.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayout.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -73,7 +73,7 @@ public static final String[] LOCATIONS = new String[]{CENTER, N, S, E, W, NE, NW, SE, SW}; public static final int[] X_POS = new int[]{POS_C, POS_C, POS_C, POS_R, POS_L, POS_R, POS_L, POS_R, POS_L}; public static final int[] Y_POS = new int[]{POS_C, POS_T, POS_B, POS_C, POS_C, POS_T, POS_T, POS_B, POS_B}; - protected static Map<String,String> compass = new HashMap<String,String>(); + protected static Map<String,String> compass = new HashMap<>(); static { compass.put(N,"N"); compass.put(S,"S"); @@ -124,7 +124,7 @@ protected String border = BORDER_3D; protected GamePieceImage imageDefn; protected Image visImage; - protected List<Item> items = new ArrayList<Item>(); + protected List<Item> items = new ArrayList<>(); public GamePieceLayout() { super(); Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/GamePieceLayoutsContainer.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -37,8 +37,7 @@ * {@link VASSAL.build.module.gamepieceimage.GamePieceLayout}. */ public class GamePieceLayoutsContainer extends AbstractConfigurable { - protected Map<String,GamePieceLayout> definitions = - new HashMap<String,GamePieceLayout>(); + protected Map<String,GamePieceLayout> definitions = new HashMap<>(); protected GamePieceLayout getDefinition(String name) { return definitions.get(name); Modified: VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/InstanceConfigurer.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/InstanceConfigurer.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/gamepieceimage/InstanceConfigurer.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -131,7 +131,7 @@ public static List<ItemInstance> StringToProperties(String s, GamePieceImage defn) { - ArrayList<ItemInstance> props = new ArrayList<ItemInstance>(); + ArrayList<ItemInstance> props = new ArrayList<>(); String[] p = StringArrayConfigurer.stringToArray(s); for (String item : p) { if (item.startsWith(SymbolItem.TYPE)) { Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java 2020-05-23 23:40:13 UTC (rev 9410) +++ VASSAL-src/trunk/src/VASSAL/build/module/map/BoardPicker.java 2020-05-24 15:32:19 UTC (rev 9411) @@ -87,7 +87,7 @@ public class BoardPicker extends AbstractBuildable implements ActionListener, GameComponent, GameSetupStep, Configurable, CommandEncoder, ValidityChecker { private static final long serialVersionUID = 1L; public static final String ID = "BoardPicker"; //$NON-NLS-1$ - protected List<Board> possibleBoards = new ArrayList<Board>(); + protected List<Board> possibleBoards = new ArrayList<>(); protected List<Board> currentBoards = null; protected Dimension psize = new Dimension(350, 125); protected double slotScale = 0.2; @@ -129,7 +129,7 @@ } protected void initComponents() { - multipleButtons = new ArrayList<JButton>(); + multipleButtons = new ArrayList<>(); controls = new JPanel(new BorderLayout()); statusLabel = new JLabel(""); //$NON-NLS-1$ statusLabel.setForeground(Color.BLUE); @@ -253,7 +253,7 @@ if (possibleBoards.isEmpty()) { report.addWarning(Resources.getString("BoardPicker.must_define", ConfigureTree.getConfigureName(map))); //$NON-NLS-1$ } - HashSet<String> names = new HashSet<String>(); + HashSet<String> names = new HashSet<>(); for (Board b : possibleBoards) { if (names.contains(b.getName())) { report.addWarning(Resources.getString("BoardPicker.more_than_one", b.getName(), ConfigureTree.getConfigureName(map))); //$NON-NLS-1$ @@ -384,7 +384,7 @@ d.pack(); d.setLocationRelativeTo(c); d.setVisible(true); - currentBoards = new ArrayList<Board>(getBoardsFromControls()); + currentBoards = new ArrayList<>(getBoardsFromControls()); } /** @@ -413,7 +413,7 @@ * @return an array of the names of all boards from which the user may choose */ public String[] getAllowableBoardNames() { - final ArrayList<String> s = new ArrayList<String>(possibleBoards.size()); + ... [truncated message content] |
From: <uck...@us...> - 2020-05-23 23:40:16
|
Revision: 9410 http://sourceforge.net/p/vassalengine/svn/9410 Author: uckelman Date: 2020-05-23 23:40:13 +0000 (Sat, 23 May 2020) Log Message: ----------- Bug 12816: Adjust splitter between chat pane and docked map after starting a game. Ugly, but the existing code is also quite gnarly. Modified Paths: -------------- VASSAL-src/trunk/CHANGES VASSAL-src/trunk/src/VASSAL/build/module/GameState.java Modified: VASSAL-src/trunk/CHANGES =================================================================== --- VASSAL-src/trunk/CHANGES 2020-05-23 23:40:08 UTC (rev 9409) +++ VASSAL-src/trunk/CHANGES 2020-05-23 23:40:13 UTC (rev 9410) @@ -2,6 +2,7 @@ * 12861: Improved behavior of Zone editor * 12817: Right-clicking on unexpanded stacks no longer selects top piece +* 12816: Splitter between chat and map panes starts with map obscured * 12805: Upgraded Batik from 1.12 to 1.13 3.3.0-beta3 - 12 May 2020 Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-23 23:40:08 UTC (rev 9409) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-23 23:40:13 UTC (rev 9410) @@ -18,6 +18,7 @@ */ package VASSAL.build.module; +import java.awt.Component; import java.awt.Cursor; import java.awt.event.ActionEvent; import java.io.BufferedInputStream; @@ -45,6 +46,7 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.SwingWorker; +import javax.swing.SwingUtilities; import org.slf4j.LoggerFactory; @@ -66,6 +68,7 @@ import VASSAL.counters.GamePiece; import VASSAL.i18n.Resources; import VASSAL.launch.Launcher; +import VASSAL.tools.ComponentSplitter; import VASSAL.tools.ErrorDialog; import VASSAL.tools.ReadErrorDialog; import VASSAL.tools.ThrowableUtils; @@ -82,6 +85,7 @@ import VASSAL.tools.menu.MenuManager; import VASSAL.tools.swing.Dialogs; + /** * The GameState represents the state of the game currently being played. * Only one game can be open at once. @@ -328,8 +332,36 @@ gameStarted |= this.gameStarting; lastSave = gameStarting ? saveString() : null; lastSaveFile = null; + + if (gameStarted) { + adjustSplitter(); + } } + private void adjustSplitter() { + // If there is a docked map, set the splitter to a reasaonable location + final GameModule g = GameModule.getGameModule(); + for (VASSAL.build.module.Map m : g.getComponentsOf(VASSAL.build.module.Map.class)) { + if (m.shouldDockIntoMainWindow()) { + final Component c = SwingUtilities.getAncestorOfClass( + ComponentSplitter.SplitPane.class, m.getView() + ); + + // this should always be true + if (c instanceof ComponentSplitter.SplitPane) { + final ComponentSplitter.SplitPane sp = (ComponentSplitter.SplitPane) c; + + SwingUtilities.invokeLater(new Runnable() { + public void run() { + sp.setDividerLocation(g.getChatter().getPreferredSize().height); + } + }); + } + return; + } + } + } + /** Return true if a game is currently in progress */ public boolean isGameStarted() { return gameStarted; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-23 23:40:10
|
Revision: 9409 http://sourceforge.net/p/vassalengine/svn/9409 Author: uckelman Date: 2020-05-23 23:40:08 +0000 (Sat, 23 May 2020) Log Message: ----------- Made Chatter 10x80. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java 2020-05-23 23:40:02 UTC (rev 9408) +++ VASSAL-src/trunk/src/VASSAL/build/module/Chatter.java 2020-05-23 23:40:08 UTC (rev 9409) @@ -93,8 +93,8 @@ public Chatter() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); - conversation = new JTextArea(15, 60); - for (int i = 0; i < 15; ++i) { + conversation = new JTextArea(10, 80); + for (int i = 0; i < 10; ++i) { conversation.append("\n"); //$NON-NLS-1$ } conversation.setEditable(false); @@ -106,7 +106,7 @@ scroll.getVerticalScrollBar().setValue(scroll.getVerticalScrollBar().getMaximum()); } }); - input = new JTextField(60); + input = new JTextField(80); input.setFocusTraversalKeysEnabled(false); input.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-23 23:40:05
|
Revision: 9408 http://sourceforge.net/p/vassalengine/svn/9408 Author: uckelman Date: 2020-05-23 23:40:02 +0000 (Sat, 23 May 2020) Log Message: ----------- Added some type parameters. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java VASSAL-src/trunk/src/VASSAL/counters/Labeler.java Modified: VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-23 23:39:57 UTC (rev 9407) +++ VASSAL-src/trunk/src/VASSAL/chat/ServerAddressBook.java 2020-05-23 23:40:02 UTC (rev 9408) @@ -88,7 +88,7 @@ private JComponent controls; private StringConfigurer addressConfig; private JList myList; - private DefaultListModel addressBook; + private DefaultListModel<AddressBookEntry> addressBook; private AddressBookEntry currentEntry; private boolean enabled = true; private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this); @@ -236,7 +236,7 @@ controls = new JPanel(new MigLayout()); addressConfig = new StringConfigurer(ADDRESS_PREF, null, ""); //$NON-NLS-1$ Prefs.getGlobalPrefs().addOption(null, addressConfig); - addressBook = new DefaultListModel(); + addressBook = new DefaultListModel<AddressBookEntry>(); loadAddressBook(); myList = new JList(addressBook); myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); @@ -318,7 +318,7 @@ private void updateButtonVisibility() { final int index = myList.getSelectedIndex(); if (index >= 0) { - final AddressBookEntry e = (AddressBookEntry) addressBook.get(index); + final AddressBookEntry e = addressBook.get(index); editButton.setEnabled(e.isEditable() && (isEnabled() || !e.isCurrent())); removeButton.setEnabled(e.isRemovable() && !e.isCurrent()); setButton.setEnabled(isEnabled() && !e.isCurrent()); @@ -337,8 +337,8 @@ final String type = p.getProperty(TYPE_KEY); final String dtype = p.getProperty(DYNAMIC_TYPE); final String ctype = p.getProperty(P2P_MODE_KEY); - for (Enumeration<?> e = addressBook.elements(); e.hasMoreElements();) { - final AddressBookEntry entry = (AddressBookEntry) e.nextElement(); + for (Enumeration<AddressBookEntry> e = addressBook.elements(); e.hasMoreElements();) { + final AddressBookEntry entry = e.nextElement(); final Properties ep = entry.getProperties(); if (ep.equals(p)) { @@ -374,7 +374,7 @@ } private void setCurrentServer(int index) { - final AddressBookEntry e = (AddressBookEntry) addressBook.get(index); + final AddressBookEntry e = addressBook.get(index); if (currentEntry != null) { currentEntry.setCurrent(false); } @@ -395,8 +395,8 @@ public void showPopup(JComponent source) { final JPopupMenu popup = new JPopupMenu(); - for (Enumeration<?> e = addressBook.elements(); e.hasMoreElements();) { - final AddressBookEntry entry = (AddressBookEntry) e.nextElement(); + for (Enumeration<AddressBookEntry> e = addressBook.elements(); e.hasMoreElements();) { + final AddressBookEntry entry = e.nextElement(); final JMenuItem item = new JMenuItem(entry.toString()); final AbstractAction action = new MenuAction(entry); item.setAction(action); @@ -447,7 +447,7 @@ } private void editServer(int index, boolean enabled) { - final AddressBookEntry e = (AddressBookEntry) addressBook.get(index); + final AddressBookEntry e = addressBook.get(index); final boolean current = e.equals(currentEntry); final Properties oldProps = e.getProperties(); if (e.edit(enabled) && current) { @@ -456,7 +456,7 @@ } private void removeServer(int index) { - final AddressBookEntry e = (AddressBookEntry) addressBook.get(index); + final AddressBookEntry e = addressBook.get(index); int i = JOptionPane.showConfirmDialog(GameModule.getGameModule().getFrame(), Resources .getString("ServerAddressBook.remove_server", e.getDescription())); //$NON-NLS-1$ if (i == 0) { @@ -511,8 +511,8 @@ // Remove any PeerClientEntry's, these are obsolete final DefaultListModel newAddressBook = new DefaultListModel(); - for (Enumeration<?> e = addressBook.elements(); e.hasMoreElements();) { - final AddressBookEntry entry = (AddressBookEntry) e.nextElement(); + for (Enumeration<AddressBookEntry> e = addressBook.elements(); e.hasMoreElements();) { + final AddressBookEntry entry = e.nextElement(); if (entry instanceof LegacyEntry) { newAddressBook.add(0, entry); } @@ -531,8 +531,8 @@ // boolean peerClient = false; boolean updated = false; - for (Enumeration<?> e = addressBook.elements(); e.hasMoreElements();) { - final AddressBookEntry entry = (AddressBookEntry) e.nextElement(); + for (Enumeration<AddressBookEntry> e = addressBook.elements(); e.hasMoreElements();) { + final AddressBookEntry entry = e.nextElement(); if (entry instanceof LegacyEntry) { legacy = true; } @@ -580,8 +580,8 @@ private String encodeAddressBook() { SequenceEncoder se = new SequenceEncoder(','); - for (Enumeration<?> e = addressBook.elements(); e.hasMoreElements();) { - final AddressBookEntry entry = (AddressBookEntry) e.nextElement(); + for (Enumeration<AddressBookEntry> e = addressBook.elements(); e.hasMoreElements();) { + final AddressBookEntry entry = e.nextElement(); if (entry != null) { se.append(entry.encode()); } Modified: VASSAL-src/trunk/src/VASSAL/counters/Labeler.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/counters/Labeler.java 2020-05-23 23:39:57 UTC (rev 9407) +++ VASSAL-src/trunk/src/VASSAL/counters/Labeler.java 2020-05-23 23:40:02 UTC (rev 9408) @@ -674,11 +674,11 @@ private StringConfigurer command; private StringConfigurer initialValue; private ColorConfigurer fg,bg; - private JComboBox hPos,vPos,hJust,vJust; + private JComboBox<Character> hPos, vPos, hJust, vJust; private IntConfigurer hOff,vOff,fontSize; private ListCellRenderer renderer; private FormattedStringConfigurer format; - private JComboBox fontFamily; + private JComboBox<String> fontFamily; private IntConfigurer rotate; private BooleanConfigurer bold, italic; private StringConfigurer propertyNameConfig; @@ -705,7 +705,7 @@ Box b = Box.createHorizontalBox(); b.add(new JLabel("Font: ")); - fontFamily = new JComboBox(); + fontFamily = new JComboBox<String>(); final String[] s = new String[]{ "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" }; @@ -745,7 +745,7 @@ b = Box.createHorizontalBox(); b.add(new JLabel("Vertical position: ")); - vPos = new JComboBox(topBottom); + vPos = new JComboBox<Character>(topBottom); vPos.setRenderer(renderer); vPos.setSelectedItem(l.verticalPos); b.add(vPos); @@ -755,7 +755,7 @@ b = Box.createHorizontalBox(); b.add(new JLabel("Horizontal position: ")); - hPos = new JComboBox(rightLeft); + hPos = new JComboBox<Character>(rightLeft); hPos.setRenderer(renderer); hPos.setSelectedItem(l.horizontalPos); b.add(hPos); @@ -765,7 +765,7 @@ b = Box.createHorizontalBox(); b.add(new JLabel("Vertical text justification: ")); - vJust = new JComboBox(topBottom); + vJust = new JComboBox<Character>(topBottom); vJust.setRenderer(renderer); vJust.setSelectedItem(l.verticalJust); b.add(vJust); @@ -773,7 +773,7 @@ b = Box.createHorizontalBox(); b.add(new JLabel("Horizontal text justification: ")); - hJust = new JComboBox(rightLeft); + hJust = new JComboBox<Character>(rightLeft); hJust.setRenderer(renderer); hJust.setSelectedItem(l.horizontalJust); b.add(hJust); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-23 23:40:00
|
Revision: 9407 http://sourceforge.net/p/vassalengine/svn/9407 Author: uckelman Date: 2020-05-23 23:39:57 +0000 (Sat, 23 May 2020) Log Message: ----------- Cleanup. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/Map.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/Map.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-23 23:39:53 UTC (rev 9406) +++ VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-23 23:39:57 UTC (rev 9407) @@ -1924,20 +1924,22 @@ } public boolean shouldDockIntoMainWindow() { - boolean shouldDock = false; - if (GlobalOptions.getInstance().isUseSingleWindow() && !useLaunchButton) { - shouldDock = true; - for (Map m : GameModule.getGameModule().getComponentsOf(Map.class)) { - if (m == this) { - break; - } - if (m.shouldDockIntoMainWindow()) { - shouldDock = false; - break; - } + // set to show via a button, or no combined window at all, don't dock + if (useLaunchButton || !GlobalOptions.getInstance().isUseSingleWindow()) { + return false; + } + + // otherwise dock if this map is the first not to show via a button + for (Map m : GameModule.getGameModule().getComponentsOf(Map.class)) { + if (m == this) { + return true; } + else if (m.shouldDockIntoMainWindow()) { + return false; + } } - return shouldDock; + // should be impossible + return true; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-23 23:39:55
|
Revision: 9406 http://sourceforge.net/p/vassalengine/svn/9406 Author: uckelman Date: 2020-05-23 23:39:53 +0000 (Sat, 23 May 2020) Log Message: ----------- Reduced repetition. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-23 23:39:49 UTC (rev 9405) +++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2020-05-23 23:39:53 UTC (rev 9406) @@ -282,9 +282,11 @@ * on all registered {@link GameComponent} objects. */ public void setup(boolean gameStarting) { + final GameModule g = GameModule.getGameModule(); + if (!gameStarting && gameStarted && isModified()) { switch (JOptionPane.showConfirmDialog( - GameModule.getGameModule().getFrame(), + g.getFrame(), Resources.getString("GameState.save_game_query"), //$NON-NLS-1$ Resources.getString("GameState.game_modified"), //$NON-NLS-1$ JOptionPane.YES_NO_CANCEL_OPTION)) { @@ -310,12 +312,12 @@ if (gameStarting) { loadGame.putValue(Action.NAME, Resources.getString("GameState.load_continuation")); - GameModule.getGameModule().getWizardSupport().showGameSetupWizard(); + g.getWizardSupport().showGameSetupWizard(); } else { loadGame.putValue(Action.NAME, Resources.getString("GameState.load_game")); - GameModule.getGameModule().appendToTitle(null); + g.appendToTitle(null); } gameStarted &= this.gameStarting; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <uck...@us...> - 2020-05-23 23:39:50
|
Revision: 9405 http://sourceforge.net/p/vassalengine/svn/9405 Author: uckelman Date: 2020-05-23 23:39:49 +0000 (Sat, 23 May 2020) Log Message: ----------- Bug 12816: Give all the resize weight to the docked map. Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/Map.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/Map.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-23 21:57:46 UTC (rev 9404) +++ VASSAL-src/trunk/src/VASSAL/build/module/Map.java 2020-05-23 23:39:49 UTC (rev 9405) @@ -674,6 +674,7 @@ ComponentSplitter.getSplitAncestor(g.getControlPanel(), -1), layeredPane, true ); + mainWindowDock.setResizeWeight(0.0); g.addKeyStrokeSource( new KeyStrokeSource(theMap, JComponent.WHEN_FOCUSED)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |