From 734cd9d48451c44c22d6b9cb59b8b0a9b0ce16ab Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 6 Apr 2016 19:49:47 +0000 Subject: [PATCH] Code cleanup via IntelliJ: Remove unnecessary semicolon git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738031 13f79535-47bb-0310-9956-ffa450edef68 --- .../streaming/examples/HybridStreaming.java | 2 +- .../poi/ddf/EscherPropertyMetaData.java | 2 +- .../poi/poifs/crypt/CipherAlgorithm.java | 3 +- .../apache/poi/poifs/crypt/HashAlgorithm.java | 1 - .../poi/poifs/filesystem/Ole10Native.java | 142 +++++++++--------- .../org/apache/poi/sl/draw/SLGraphics.java | 2 - .../apache/poi/sl/usermodel/TableCell.java | 4 +- .../poi/sl/usermodel/TextParagraph.java | 2 +- .../apache/poi/sl/usermodel/TextShape.java | 2 +- .../poi/ss/format/CellNumberFormatter.java | 2 +- .../functions/LinearRegressionFunction.java | 2 +- .../poi/ss/usermodel/FillPatternType.java | 2 +- .../poi/ss/usermodel/IgnoredErrorType.java | 2 +- .../apache/poi/ss/usermodel/PaperSize.java | 2 +- .../org/apache/poi/ss/util/CellReference.java | 2 +- .../apache/poi/openxml4j/opc/PackagePart.java | 3 +- .../java/org/apache/poi/util/OOXMLLite.java | 10 +- .../apache/poi/xslf/usermodel/XSLFShape.java | 2 +- .../poi/xssf/extractor/XSSFExportToXml.java | 2 +- .../apache/poi/xssf/model/ThemesTable.java | 2 +- .../poi/xssf/usermodel/TextDirection.java | 2 +- .../poi/xwpf/usermodel/XWPFDocument.java | 2 +- .../apache/poi/xwpf/usermodel/XWPFRun.java | 2 - .../apache/poi/xwpf/usermodel/XWPFTable.java | 1 - .../poi/xwpf/usermodel/XWPFTableCell.java | 1 - .../poi/xssf/usermodel/TestXSSFSheet.java | 2 +- .../src/org/apache/poi/hslf/blip/JPEG.java | 4 +- .../apache/poi/hslf/model/PPGraphics2D.java | 2 - .../model/textproperties/BitMaskTextProp.java | 4 +- .../textproperties/TextPropCollection.java | 2 +- .../org/apache/poi/hslf/record/PPDrawing.java | 2 +- .../poi/hslf/usermodel/HSLFSlideShow.java | 4 +- .../org/apache/poi/hwmf/record/HwmfText.java | 4 +- .../poi/hwpf/usermodel/OfficeDrawing.java | 8 +- .../org/apache/poi/hslf/model/TestSheet.java | 2 +- .../poi/hslf/model/TestSlideMaster.java | 1 - .../org/apache/poi/hslf/model/TestSlides.java | 2 +- .../poi/hslf/usermodel/TestAddingSlides.java | 6 +- .../apache/poi/hssf/usermodel/TestBugs.java | 2 +- .../poi/hssf/usermodel/TestCellStyle.java | 4 +- .../poi/ss/formula/TestFunctionRegistry.java | 4 +- 41 files changed, 118 insertions(+), 134 deletions(-) diff --git a/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java b/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java index f2ceb5e1d4..1e5515859d 100644 --- a/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java +++ b/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java @@ -46,7 +46,7 @@ public class HybridStreaming { if (!SHEET_TO_STREAM.equals(ctSheet.getName())) { super.parseSheet(shIdMap, ctSheet); } - }; + } }; // Having avoided a DOM-based parse of the sheet, we can stream it instead. diff --git a/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java b/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java index 0c3105f57d..b38e52df3e 100644 --- a/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java +++ b/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java @@ -31,7 +31,7 @@ public class EscherPropertyMetaData public final static byte TYPE_RGB = (byte) 2; public final static byte TYPE_SHAPEPATH = (byte) 3; public final static byte TYPE_SIMPLE = (byte)4; - public final static byte TYPE_ARRAY = (byte)5;; + public final static byte TYPE_ARRAY = (byte)5; private String description; private byte type; diff --git a/src/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java b/src/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java index 5b5b1e186d..c5887354db 100644 --- a/src/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java +++ b/src/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java @@ -36,8 +36,7 @@ public enum CipherAlgorithm { des3_112(null, "DESede", -1, 128, new int[]{128}, 8, 32, "3DES_112", true), // only for digital signatures rsa(null, "RSA", -1, 1024, new int[]{1024, 2048, 3072, 4096}, -1, -1, "", false); - ; - + public final CipherProvider provider; public final String jceId; public final int ecmaId; diff --git a/src/java/org/apache/poi/poifs/crypt/HashAlgorithm.java b/src/java/org/apache/poi/poifs/crypt/HashAlgorithm.java index 6a490b0148..24c43325d9 100644 --- a/src/java/org/apache/poi/poifs/crypt/HashAlgorithm.java +++ b/src/java/org/apache/poi/poifs/crypt/HashAlgorithm.java @@ -35,7 +35,6 @@ public enum HashAlgorithm { whirlpool("Whirlpool", -1, "WHIRLPOOL", 64, "HMac-Whirlpool", true), // only for xml signing sha224 ( "SHA-224", -1, "SHA224", 28, "HmacSHA224", true); - ; public final String jceId; public final int ecmaId; diff --git a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java index 4aee1e07b2..99b7ab3931 100644 --- a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java +++ b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - -package org.apache.poi.poifs.filesystem; - + +package org.apache.poi.poifs.filesystem; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -30,24 +30,24 @@ import org.apache.poi.util.StringUtil; * Represents an Ole10Native record which is wrapped around certain binary * files being embedded in OLE2 documents. * - * @author Rainer Schwarze - */ -public class Ole10Native { - - public static final String OLE10_NATIVE = "\u0001Ole10Native"; - protected static final String ISO1 = "ISO-8859-1"; - + * @author Rainer Schwarze + */ +public class Ole10Native { + + public static final String OLE10_NATIVE = "\u0001Ole10Native"; + protected static final String ISO1 = "ISO-8859-1"; + // (the fields as they appear in the raw record:) - private int totalSize; // 4 bytes, total size of record not including this field - private short flags1 = 2; // 2 bytes, unknown, mostly [02 00] - private String label; // ASCIIZ, stored in this field without the terminating zero - private String fileName; // ASCIIZ, stored in this field without the terminating zero - private short flags2 = 0; // 2 bytes, unknown, mostly [00 00] - private short unknown1 = 3; // see below - private String command; // ASCIIZ, stored in this field without the terminating zero - private byte[] dataBuffer; // varying size, the actual native data - private short flags3 = 0; // some final flags? or zero terminators?, sometimes not there - + private int totalSize; // 4 bytes, total size of record not including this field + private short flags1 = 2; // 2 bytes, unknown, mostly [02 00] + private String label; // ASCIIZ, stored in this field without the terminating zero + private String fileName; // ASCIIZ, stored in this field without the terminating zero + private short flags2 = 0; // 2 bytes, unknown, mostly [00 00] + private short unknown1 = 3; // see below + private String command; // ASCIIZ, stored in this field without the terminating zero + private byte[] dataBuffer; // varying size, the actual native data + private short flags3 = 0; // some final flags? or zero terminators?, sometimes not there + /** * the field encoding mode - merely a try-and-error guess ... **/ @@ -63,16 +63,16 @@ public class Ole10Native { /** * the data is stored raw after the length field and the flags1 field */ - compact; + compact } private EncodingMode mode; - /** - * Creates an instance of this class from an embedded OLE Object. The OLE Object is expected - * to include a stream "{01}Ole10Native" which contains the actual + /** + * Creates an instance of this class from an embedded OLE Object. The OLE Object is expected + * to include a stream "{01}Ole10Native" which contains the actual * data relevant for this class. * * @param poifs POI Filesystem object @@ -102,18 +102,18 @@ public class Ole10Native { assert(readBytes == data.length); return new Ole10Native(data, 0); - } - - /** - * Creates an instance and fills the fields based on ... the fields - */ - public Ole10Native(String label, String filename, String command, byte[] data) { - setLabel(label); - setFileName(filename); - setCommand(command); + } + + /** + * Creates an instance and fills the fields based on ... the fields + */ + public Ole10Native(String label, String filename, String command, byte[] data) { + setLabel(label); + setFileName(filename); + setCommand(command); setDataBuffer(data); - mode = EncodingMode.parsed; - } + mode = EncodingMode.parsed; + } /** * Creates an instance and fills the fields based on the data in the given buffer. @@ -128,11 +128,11 @@ public class Ole10Native { public Ole10Native(byte[] data, int offset, boolean plain) throws Ole10NativeException { this(data, offset); } - - /** - * Creates an instance and fills the fields based on the data in the given buffer. - * - * @param data The buffer containing the Ole10Native record + + /** + * Creates an instance and fills the fields based on the data in the given buffer. + * + * @param data The buffer containing the Ole10Native record * @param offset The start offset of the record in the buffer * @throws Ole10NativeException on invalid or unexcepted data format */ @@ -174,25 +174,25 @@ public class Ole10Native { ofs += len; flags2 = LittleEndian.getShort(data, ofs); - ofs += LittleEndianConsts.SHORT_SIZE; - - unknown1 = LittleEndian.getShort(data, ofs); - ofs += LittleEndianConsts.SHORT_SIZE; - - len = LittleEndian.getInt(data, ofs); + ofs += LittleEndianConsts.SHORT_SIZE; + + unknown1 = LittleEndian.getShort(data, ofs); + ofs += LittleEndianConsts.SHORT_SIZE; + + len = LittleEndian.getInt(data, ofs); ofs += LittleEndianConsts.INT_SIZE; - command = StringUtil.getFromCompressedUnicode(data, ofs, len - 1); - ofs += len; - - if (totalSize < ofs) { - throw new Ole10NativeException("Invalid Ole10Native"); - } - - dataSize = LittleEndian.getInt(data, ofs); - ofs += LittleEndianConsts.INT_SIZE; - - if (dataSize < 0 || totalSize - (ofs - LittleEndianConsts.INT_SIZE) < dataSize) { - throw new Ole10NativeException("Invalid Ole10Native"); + command = StringUtil.getFromCompressedUnicode(data, ofs, len - 1); + ofs += len; + + if (totalSize < ofs) { + throw new Ole10NativeException("Invalid Ole10Native"); + } + + dataSize = LittleEndian.getInt(data, ofs); + ofs += LittleEndianConsts.INT_SIZE; + + if (dataSize < 0 || totalSize - (ofs - LittleEndianConsts.INT_SIZE) < dataSize) { + throw new Ole10NativeException("Invalid Ole10Native"); } break; } @@ -205,11 +205,11 @@ public class Ole10Native { case unparsed: dataSize = totalSize; break; - } - - dataBuffer = new byte[dataSize]; - System.arraycopy(data, ofs, dataBuffer, 0, dataSize); - ofs += dataSize; + } + + dataBuffer = new byte[dataSize]; + System.arraycopy(data, ofs, dataBuffer, 0, dataSize); + ofs += dataSize; } /* @@ -326,12 +326,12 @@ public class Ole10Native { return flags3; } - /** - * Have the contents printer out into an OutputStream, used when writing a - * file back out to disk (Normally, atom classes will keep their bytes - * around, but non atom classes will just request the bytes from their - * children, then chuck on their header and return) - */ + /** + * Have the contents printer out into an OutputStream, used when writing a + * file back out to disk (Normally, atom classes will keep their bytes + * around, but non atom classes will just request the bytes from their + * children, then chuck on their header and return) + */ public void writeOut(OutputStream out) throws IOException { // byte intbuf[] = new byte[LittleEndianConsts.INT_SIZE]; // byte shortbuf[] = new byte[LittleEndianConsts.SHORT_SIZE]; @@ -377,7 +377,7 @@ public class Ole10Native { } } - + public void setFlags1(short flags1) { this.flags1 = flags1; } @@ -409,4 +409,4 @@ public class Ole10Native { public void setDataBuffer(byte dataBuffer[]) { this.dataBuffer = dataBuffer; } -} +} diff --git a/src/java/org/apache/poi/sl/draw/SLGraphics.java b/src/java/org/apache/poi/sl/draw/SLGraphics.java index b4bc14ae96..1deca63d13 100644 --- a/src/java/org/apache/poi/sl/draw/SLGraphics.java +++ b/src/java/org/apache/poi/sl/draw/SLGraphics.java @@ -918,7 +918,6 @@ public final class SLGraphics extends Graphics2D implements Cloneable { * @see java.awt.Graphics#create */ public void dispose() { - ; } /** @@ -1145,7 +1144,6 @@ public final class SLGraphics extends Graphics2D implements Cloneable { } public void copyArea(int x, int y, int width, int height, int dx, int dy) { - ; } /** diff --git a/src/java/org/apache/poi/sl/usermodel/TableCell.java b/src/java/org/apache/poi/sl/usermodel/TableCell.java index 5ad4c4c296..0b8d7dc549 100644 --- a/src/java/org/apache/poi/sl/usermodel/TableCell.java +++ b/src/java/org/apache/poi/sl/usermodel/TableCell.java @@ -26,8 +26,8 @@ public interface TableCell< S extends Shape, P extends TextParagraph > extends TextShape { - enum BorderEdge { bottom, left, top, right }; - + enum BorderEdge { bottom, left, top, right } + /** * Return line style of given edge or {@code null} if border is not defined * diff --git a/src/java/org/apache/poi/sl/usermodel/TextParagraph.java b/src/java/org/apache/poi/sl/usermodel/TextParagraph.java index 61c06a9e4c..50e75becbb 100644 --- a/src/java/org/apache/poi/sl/usermodel/TextParagraph.java +++ b/src/java/org/apache/poi/sl/usermodel/TextParagraph.java @@ -104,7 +104,7 @@ public interface TextParagraph< * This is different than BASELINE because of letters such as "g", "q", and "y". * Also known as "UpholdFixed" */ - BOTTOM; + BOTTOM } public interface BulletStyle { diff --git a/src/java/org/apache/poi/sl/usermodel/TextShape.java b/src/java/org/apache/poi/sl/usermodel/TextShape.java index d2f66e52f1..a4a61824d3 100644 --- a/src/java/org/apache/poi/sl/usermodel/TextShape.java +++ b/src/java/org/apache/poi/sl/usermodel/TextShape.java @@ -50,7 +50,7 @@ public interface TextShape< * Determines if all of the text is vertical * ("one letter on top of another"). */ - STACKED; + STACKED } /** diff --git a/src/java/org/apache/poi/ss/format/CellNumberFormatter.java b/src/java/org/apache/poi/ss/format/CellNumberFormatter.java index 230d245546..668149f85a 100644 --- a/src/java/org/apache/poi/ss/format/CellNumberFormatter.java +++ b/src/java/org/apache/poi/ss/format/CellNumberFormatter.java @@ -96,7 +96,7 @@ public class CellNumberFormatter extends CellFormatter { public void simpleValue(StringBuffer toAppendTo, Object value) { formatValue(toAppendTo, value); } - }; + } /** diff --git a/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java b/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java index 870d08bc75..73a0204be0 100644 --- a/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java +++ b/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java @@ -106,7 +106,7 @@ public final class LinearRegressionFunction extends Fixed2ArgFunction { } } - public enum FUNCTION {INTERCEPT, SLOPE}; + public enum FUNCTION {INTERCEPT, SLOPE} public FUNCTION function; public LinearRegressionFunction(FUNCTION function) { diff --git a/src/java/org/apache/poi/ss/usermodel/FillPatternType.java b/src/java/org/apache/poi/ss/usermodel/FillPatternType.java index 25c8495b0e..e34ed34b44 100644 --- a/src/java/org/apache/poi/ss/usermodel/FillPatternType.java +++ b/src/java/org/apache/poi/ss/usermodel/FillPatternType.java @@ -78,6 +78,6 @@ public enum FillPatternType { LESS_DOTS, /** Least Dots */ - LEAST_DOTS; + LEAST_DOTS } diff --git a/src/java/org/apache/poi/ss/usermodel/IgnoredErrorType.java b/src/java/org/apache/poi/ss/usermodel/IgnoredErrorType.java index 9939ec1cd7..2843de4de3 100644 --- a/src/java/org/apache/poi/ss/usermodel/IgnoredErrorType.java +++ b/src/java/org/apache/poi/ss/usermodel/IgnoredErrorType.java @@ -79,5 +79,5 @@ public enum IgnoredErrorType { * Whether to check for unprotected formulas. * HSSF + XSSF. */ - UNLOCKED_FORMULA; + UNLOCKED_FORMULA } diff --git a/src/java/org/apache/poi/ss/usermodel/PaperSize.java b/src/java/org/apache/poi/ss/usermodel/PaperSize.java index cebab20381..abd65f3eaa 100644 --- a/src/java/org/apache/poi/ss/usermodel/PaperSize.java +++ b/src/java/org/apache/poi/ss/usermodel/PaperSize.java @@ -39,5 +39,5 @@ public enum PaperSize { FOLIO_PAPER, QUARTO_PAPER, STANDARD_PAPER_10_14, - STANDARD_PAPER_11_17; + STANDARD_PAPER_11_17 } diff --git a/src/java/org/apache/poi/ss/util/CellReference.java b/src/java/org/apache/poi/ss/util/CellReference.java index cf0fa57dfd..6eb8035aa2 100644 --- a/src/java/org/apache/poi/ss/util/CellReference.java +++ b/src/java/org/apache/poi/ss/util/CellReference.java @@ -47,7 +47,7 @@ public class CellReference { NAMED_RANGE, COLUMN, ROW, - BAD_CELL_OR_NAMED_RANGE; + BAD_CELL_OR_NAMED_RANGE } /** The character ($) that signifies a row or column value is absolute instead of relative */ diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java index 8f961c9335..bcf457e1ae 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePart.java @@ -453,8 +453,7 @@ public abstract class PackagePart implements RelationshipSource, Comparable { if (paint != null) { setValue(paint); return true; - }; + } } return false; diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java index 734a9f4546..d187b66ca1 100644 --- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java +++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java @@ -303,7 +303,7 @@ public class XSSFExportToXml implements Comparator{ } break; - default: ; + default: } if (node instanceof Element) { diff --git a/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java index 19a08b3aae..0fe4abf426 100644 --- a/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java +++ b/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java @@ -59,7 +59,7 @@ public class ThemesTable extends POIXMLDocumentPart { } public final int idx; public final String name; - }; + } private ThemeDocument theme; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/TextDirection.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/TextDirection.java index 111ab652fc..f91fcca7a8 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/TextDirection.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/TextDirection.java @@ -44,5 +44,5 @@ public enum TextDirection { * Determines if all of the text is vertical * ("one letter on top of another"). */ - STACKED; + STACKED } diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java index e5dd3056c6..74de72db33 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java @@ -1227,7 +1227,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody { * @param zoomPercent A percent value denoting the zoom setting for this document. */ public void setZoomPercent(long zoomPercent) { - settings.setZoomPercent(zoomPercent);; + settings.setZoomPercent(zoomPercent); } /** diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java index 3bbcac704f..ea931e7349 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java @@ -150,8 +150,6 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun { } } - ; - /** * @deprecated Use {@link XWPFRun#XWPFRun(CTR, IRunBody)} */ diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java index 7c9bb397f9..d512521388 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java @@ -74,7 +74,6 @@ public class XWPFTable implements IBodyElement, ISDTContents { protected StringBuffer text = new StringBuffer(); protected List tableRows; - ; protected List styleIDs; protected IBody part; private CTTbl ctTbl; diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java index d074e79e01..39a92f41cf 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java @@ -68,7 +68,6 @@ public class XWPFTableCell implements IBody, ICell { protected List tables = null; protected List bodyElements = null; - ; protected IBody part; private XWPFTableRow tableRow = null; diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java index 2b7616a29c..844e591bc8 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java @@ -1319,7 +1319,7 @@ public final class TestXSSFSheet extends BaseTestSheet { @Test(timeout=180000) public void bug51585() throws IOException { - XSSFTestDataSamples.openSampleWorkbook("51585.xlsx").close();; + XSSFTestDataSamples.openSampleWorkbook("51585.xlsx").close(); } private XSSFWorkbook setupSheet(){ diff --git a/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java b/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java index c7b94a6845..72cac5f90d 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java @@ -23,8 +23,8 @@ package org.apache.poi.hslf.blip; */ public final class JPEG extends Bitmap { - public enum ColorSpace { rgb, cymk }; - + public enum ColorSpace { rgb, cymk } + private ColorSpace colorSpace = ColorSpace.rgb; @Override diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java b/src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java index 7d6b0c2626..70229b1bd8 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java @@ -928,7 +928,6 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable { * @see java.awt.Graphics#create */ public void dispose() { - ; } /** @@ -1155,7 +1154,6 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable { } public void copyArea(int x, int y, int width, int height, int dx, int dy) { - ; } /** diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java index 2b626e643d..067c0af160 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java @@ -91,8 +91,8 @@ public abstract class BitMaskTextProp extends TextProp implements Cloneable { */ @Override public int getValue() { - int val = dataValue, i = 0;; - for (int mask : subPropMasks) { + int val = dataValue, i = 0; + for (int mask : subPropMasks) { if (!subPropMatches[i++]) { val &= ~mask; } diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java index b6ffeec9bd..e82b966e60 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java @@ -86,7 +86,7 @@ public class TextPropCollection { }; public enum TextPropType { - paragraph, character; + paragraph, character } private int charactersCovered; diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java b/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java index 90b24ed9f2..ba36989bc0 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java @@ -159,7 +159,7 @@ public final class PPDrawing extends RecordAtom { final Record r1 = progBinaryTag.getChildRecords()[1]; if (!(r0 instanceof CString)) { return null; } - if (!("___PPT9".equals(((CString) r0).getText()))) { return null; }; + if (!("___PPT9".equals(((CString) r0).getText()))) { return null; } if (!(r1 instanceof BinaryTagDataBlob )) { return null; } final BinaryTagDataBlob blob = (BinaryTagDataBlob) r1; if (1 != blob.getChildRecords().length) { return null; } diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java index 78abb0ab0f..4269861e67 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java @@ -95,8 +95,8 @@ import org.apache.poi.util.Units; */ public final class HSLFSlideShow implements SlideShow, Closeable { enum LoadSavePhase { - INIT, LOADED; - } + INIT, LOADED + } private static ThreadLocal loadSavePhase = new ThreadLocal(); // What we're based on diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java index e4e4ecb4d8..1649d13eee 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java @@ -335,13 +335,13 @@ public class HwmfText { public enum HwmfTextAlignment { LEFT, RIGHT, - CENTER; + CENTER } public enum HwmfTextVerticalAlignment { TOP, BOTTOM, - BASELINE; + BASELINE } /** diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java index 5165c9eb58..4bed04e495 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java @@ -69,11 +69,11 @@ public interface OfficeDrawing * The shape is horizontally positioned at the right side of the page * element. */ - RIGHT; + RIGHT } public enum HorizontalRelativeElement { - CHAR, MARGIN, PAGE, TEXT; + CHAR, MARGIN, PAGE, TEXT } public enum VerticalPositioning { @@ -109,11 +109,11 @@ public interface OfficeDrawing /** * The shape is vertically positioned at the top of the page element */ - TOP; + TOP } public enum VerticalRelativeElement { - LINE, MARGIN, PAGE, TEXT; + LINE, MARGIN, PAGE, TEXT } /** diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java index a5e9084b9e..1b5aa8dcc5 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java @@ -49,7 +49,7 @@ public final class TestSheet { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream(file)); doSlideShow(ppt); } catch (EncryptedPowerPointFileException e){ - ; //skip encrypted ppt + //skip encrypted ppt } } } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java index cd46ef98ec..23a3d156fa 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java @@ -162,7 +162,6 @@ public final class TestSlideMaster { } } - ; for (List tparas : slide.get(1).getTextParagraphs()) { HSLFTextParagraph tpara = tparas.get(0); if (tpara.getRunType() == TextHeaderAtom.TITLE_TYPE){ diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java index a84caefd68..5ced9945c8 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java @@ -133,7 +133,7 @@ public final class TestSlides { s2 = ppt.getSlides().get(1); assertEquals(257, s2._getSheetNumber()); assertEquals(4, s2._getSheetRefId()); - s3 = ppt.getSlides().get(2);; + s3 = ppt.getSlides().get(2); assertEquals(3, ppt.getSlides().size()); assertEquals(258, s3._getSheetNumber()); assertEquals(5, s3._getSheetRefId()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java index 800df623e3..b89a5f6e2d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java @@ -238,15 +238,13 @@ public final class TestAddingSlides extends TestCase { ppt.removeSlide(-1); fail("expected exception"); } catch (Exception e){ - ; - } + } try { ppt.removeSlide(2); fail("expected exception"); } catch (Exception e){ - ; - } + } assertEquals(1, slide1.getSlideNumber()); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 56071f6d93..e55680538f 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -838,7 +838,7 @@ public final class TestBugs extends BaseTestBugzillaIssues { public void bug28774() throws Exception { HSSFWorkbook wb = openSample("28774.xls"); assertTrue("no errors reading sample xls", true); - writeOutAndReadBack(wb).close();; + writeOutAndReadBack(wb).close(); assertTrue("no errors writing sample xls", true); wb.close(); } diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java b/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java index 428d2bf967..cba7a6615e 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java @@ -452,8 +452,8 @@ public final class TestCellStyle extends TestCase { public Throwable getException() { return exception; } - }; - + } + public void test56563() throws Throwable { CellFormatBugExample threadA = new CellFormatBugExample("56563a.xls"); threadA.start(); diff --git a/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java b/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java index 87f07ce69d..b6d118e89b 100644 --- a/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java +++ b/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java @@ -49,8 +49,7 @@ public class TestFunctionRegistry extends TestCase { cv = fe.evaluate(cellA); fail("expectecd exception"); } catch (NotImplementedException e) { - ; - } + } FunctionEval.registerFunction("FISHER", new Function() { public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) { @@ -67,7 +66,6 @@ public class TestFunctionRegistry extends TestCase { cv = fe.evaluate(cellB); fail("expectecd exception"); } catch (NotImplementedException e) { - ; } AnalysisToolPak.registerFunction("CUBEMEMBERPROPERTY", new FreeRefFunction() { -- 2.39.5