aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java1
-rw-r--r--src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java1
-rw-r--r--src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java1
-rw-r--r--src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java1
-rw-r--r--src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java3
-rw-r--r--src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java1
-rw-r--r--src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java1
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVBorder.java3
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVFractionalFormat.java12
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java3
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java5
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java21
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java7
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVTableModel.java18
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SViewer.java24
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SViewerPanel.java13
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/brush/DoubleStroke.java2
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java1
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java2
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java1
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/PropertySetDescriptorRenderer.java1
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java1
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/ToCSV.java1
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java1
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java2
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java1
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java1
-rw-r--r--src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java4
-rw-r--r--src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java9
-rw-r--r--src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java5
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java3
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java1
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetDoubleCell.java3
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetFormulaCell.java3
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetStringCell.java3
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java3
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java3
-rw-r--r--src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java1
-rw-r--r--src/excelant/testcases/org/apache/poi/ss/excelant/BuildFileTest.java8
-rw-r--r--src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java2
-rw-r--r--src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java1
-rw-r--r--src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java3
-rw-r--r--src/integrationtest/org/apache/poi/stress/OPCFileHandler.java1
-rw-r--r--src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java6
-rw-r--r--src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java32
-rw-r--r--src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java3
-rw-r--r--src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java7
-rw-r--r--src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java2
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java6
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFForkedEvaluator.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java15
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java1
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java1
-rw-r--r--src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java12
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/AllDataFilesTester.java1
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java1
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java3
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java1
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/TestWrite.java3
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/Util.java2
-rw-r--r--src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java4
-rw-r--r--src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestSheet.java9
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestWorkbook.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java6
-rw-r--r--src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java2
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java2
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java1
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java3
-rw-r--r--src/testcases/org/apache/poi/poifs/eventfilesystem/Listener.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java2
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java3
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java9
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java9
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/property/LocalProperty.java2
-rw-r--r--src/testcases/org/apache/poi/poifs/storage/LocalProperty.java2
-rw-r--r--src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java3
-rw-r--r--src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java9
-rw-r--r--src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java2
-rw-r--r--src/testcases/org/apache/poi/ss/formula/EvaluationListener.java27
-rw-r--r--src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java27
-rw-r--r--src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java4
-rw-r--r--src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java3
-rw-r--r--src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java3
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java6
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java3
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java19
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/forked/TestForkedEvaluator.java3
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/AbstractNumericTestCase.java2
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java19
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestDate.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/udf/BaseTestUDFFinder.java1
-rw-r--r--src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java2
-rw-r--r--src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java3
-rw-r--r--src/testcases/org/apache/poi/util/LocalTestNode.java3
156 files changed, 478 insertions, 143 deletions
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java b/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
index b09427c321..43ea2e9d8d 100644
--- a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
+++ b/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
@@ -311,6 +311,7 @@ public class CopyCompare
* <p>The method is called by POI's eventing API for each file in the
* origin POIFS.</p>
*/
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event) {
/* The following declarations are shortcuts for accessing the
* "event" object. */
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java b/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java
index 222fff9fff..9649842114 100644
--- a/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java
+++ b/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java
@@ -61,6 +61,7 @@ public class ReadCustomPropertySets
static class MyPOIFSReaderListener implements POIFSReaderListener
{
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
PropertySet ps = null;
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java b/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java
index 201030ac29..1805444100 100644
--- a/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java
+++ b/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java
@@ -54,6 +54,7 @@ public class ReadTitle
static class MyPOIFSReaderListener implements POIFSReaderListener
{
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
SummaryInformation si = null;
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java b/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java
index 996aa9ff7b..d08d778b0a 100644
--- a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java
+++ b/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java
@@ -155,6 +155,7 @@ public class WriteAuthorAndTitle
* <p>The method is called by POI's eventing API for each file in the
* origin POIFS.</p>
*/
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
/* The following declarations are shortcuts for accessing the
diff --git a/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java b/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
index 8bab0a8e4b..610d961741 100644
--- a/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
+++ b/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
@@ -133,7 +133,8 @@ public class XLS2CSVmra implements HSSFListener {
* Main HSSFListener method, processes events, and outputs the
* CSV as the file is processed.
*/
- public void processRecord(Record record) {
+ @Override
+ public void processRecord(Record record) {
int thisRow = -1;
int thisColumn = -1;
String thisStr = null;
diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java
index 7dd5ee3ca9..a324b3af43 100644
--- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java
+++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java
@@ -40,6 +40,7 @@ public class EventExample
* This method listens for incoming records and handles them as required.
* @param record The record that was found while reading.
*/
+ @Override
public void processRecord(Record record)
{
switch (record.getSid())
diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java
index 125d60d770..ad93f5e717 100644
--- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java
+++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java
@@ -61,6 +61,7 @@ public class Outlines implements Closeable {
}
}
+ @Override
public void close() throws IOException {
wb.close();
}
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVBorder.java b/src/examples/src/org/apache/poi/hssf/view/SVBorder.java
index 97a4689663..273ed07fdb 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVBorder.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVBorder.java
@@ -66,7 +66,8 @@ public class SVBorder extends AbstractBorder {
this.selected = selected;
}
- public void paintBorder(Component c, Graphics g, int x, int y, int width,
+ @Override
+public void paintBorder(Component c, Graphics g, int x, int y, int width,
int height) {
Color oldColor = g.getColor();
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVFractionalFormat.java b/src/examples/src/org/apache/poi/hssf/view/SVFractionalFormat.java
index cd6ff6ea72..4884195880 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVFractionalFormat.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVFractionalFormat.java
@@ -189,7 +189,8 @@ public class SVFractionalFormat extends Format {
throw new RuntimeException("Unexpected Case");
}
- public StringBuffer format(Object obj,
+ @Override
+public StringBuffer format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos) {
if (obj instanceof Number) {
@@ -199,19 +200,22 @@ public class SVFractionalFormat extends Format {
throw new IllegalArgumentException("Can only handle Numbers");
}
- public Object parseObject(String source,
+ @Override
+public Object parseObject(String source,
ParsePosition status) {
//JMH TBD
return null;
}
- public Object parseObject(String source)
+ @Override
+public Object parseObject(String source)
throws ParseException {
//JMH TBD
return null;
}
- public Object clone() {
+ @Override
+public Object clone() {
//JMH TBD
return null;
}
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java b/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java
index c6db2f71a4..622f506430 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java
@@ -44,9 +44,11 @@ public class SVRowHeader extends JList {
this.sheet = sheet;
}
+ @Override
public int getSize() {
return sheet.getLastRowNum() + 1;
}
+ @Override
public Object getElementAt(int index) {
return Integer.toString(index+1);
}
@@ -69,6 +71,7 @@ public class SVRowHeader extends JList {
setFont(header.getFont());
}
+ @Override
public Component getListCellRendererComponent( JList list,
Object value, int index, boolean isSelected, boolean cellHasFocus) {
Dimension d = getPreferredSize();
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java b/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
index 8f95e03fbe..c9e2090877 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
@@ -114,6 +114,7 @@ public class SVSheetTable extends JTable {
}
private class HeaderCellRenderer implements TableCellRenderer {
+ @Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
@@ -128,6 +129,7 @@ public class SVSheetTable extends JTable {
this.formulaDisplay = formulaDisplay;
}
+ @Override
public void valueChanged(ListSelectionEvent e) {
int row = getSelectedRow();
int col = getSelectedColumn();
@@ -187,7 +189,8 @@ public class SVSheetTable extends JTable {
}
addHierarchyListener(new HierarchyListener() {
- public void hierarchyChanged(HierarchyEvent e) {
+ @Override
+ public void hierarchyChanged(HierarchyEvent e) {
if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
Container changedParent = e.getChangedParent();
if (changedParent instanceof JViewport) {
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java b/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
index 6c1552e54f..3c58d5346b 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
@@ -66,7 +66,8 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
*
* @return The cellEditable value
*/
- public boolean isCellEditable(java.util.EventObject e) {
+ @Override
+public boolean isCellEditable(java.util.EventObject e) {
if (e instanceof MouseEvent) {
return ((MouseEvent) e).getClickCount() >= 2;
}
@@ -74,7 +75,8 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
}
- public boolean shouldSelectCell(EventObject anEvent) {
+ @Override
+public boolean shouldSelectCell(EventObject anEvent) {
return true;
}
@@ -85,20 +87,23 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
}
- public boolean stopCellEditing() {
+ @Override
+public boolean stopCellEditing() {
System.out.println("Stop Cell Editing");
fireEditingStopped();
return true;
}
- public void cancelCellEditing() {
+ @Override
+public void cancelCellEditing() {
System.out.println("Cancel Cell Editing");
fireEditingCanceled();
}
- public void actionPerformed(ActionEvent e) {
+ @Override
+public void actionPerformed(ActionEvent e) {
System.out.println("Action performed");
stopCellEditing();
}
@@ -109,7 +114,8 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
*
* @return The cellEditorValue value
*/
- public Object getCellEditorValue() {
+ @Override
+public Object getCellEditorValue() {
System.out.println("GetCellEditorValue");
//JMH Look at when this method is called. Should it return a HSSFCell?
return editor.getText();
@@ -121,7 +127,8 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
*
* @return The tableCellEditorComponent value
*/
- public Component getTableCellEditorComponent(JTable table, Object value,
+ @Override
+public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected,
int row,
int column) {
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java b/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
index 8a59b8306f..1448c5363c 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
@@ -137,6 +137,7 @@ public class SVTableCellRenderer extends JLabel
this.wb = wb;
}
+ @Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
boolean isBorderSet = false;
@@ -249,14 +250,19 @@ public class SVTableCellRenderer extends JLabel
return this;
}
+ @Override
public void validate() {}
+ @Override
public void revalidate() {}
+ @Override
public void repaint(long tm, int x, int y, int width, int height) {}
+ @Override
public void repaint(Rectangle r) { }
+ @Override
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
// Strings get interned...
if (propertyName=="text") {
@@ -264,6 +270,7 @@ public class SVTableCellRenderer extends JLabel
}
}
+ @Override
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { }
/**
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVTableModel.java b/src/examples/src/org/apache/poi/hssf/view/SVTableModel.java
index 5868a175df..25ac83fc50 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVTableModel.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVTableModel.java
@@ -55,10 +55,12 @@ public class SVTableModel extends AbstractTableModel {
}
- public int getColumnCount() {
+ @Override
+public int getColumnCount() {
return this.maxcol+1;
}
- public Object getValueAt(int row, int col) {
+ @Override
+public Object getValueAt(int row, int col) {
HSSFRow r = st.getRow(row);
HSSFCell c = null;
if (r != null) {
@@ -66,19 +68,23 @@ public class SVTableModel extends AbstractTableModel {
}
return c;
}
- public int getRowCount() {
+ @Override
+public int getRowCount() {
return st.getLastRowNum() + 1;
}
- public Class<?> getColumnClass(int c) {
+ @Override
+public Class<?> getColumnClass(int c) {
return HSSFCell.class;
}
- public boolean isCellEditable(int rowIndex, int columnIndex) {
+ @Override
+public boolean isCellEditable(int rowIndex, int columnIndex) {
return true;
}
- public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
+ @Override
+public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if (aValue != null)
System.out.println("SVTableModel.setValueAt. value type = "+aValue.getClass().getName());
else System.out.println("SVTableModel.setValueAt. value type = null");
diff --git a/src/examples/src/org/apache/poi/hssf/view/SViewer.java b/src/examples/src/org/apache/poi/hssf/view/SViewer.java
index de2cfb1f6d..a323992756 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SViewer.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SViewer.java
@@ -54,7 +54,8 @@ public class SViewer extends JApplet {
}
/**Initialize the applet*/
- public void init() {
+ @Override
+public void init() {
try {
jbInit();
}
@@ -104,20 +105,25 @@ public class SViewer extends JApplet {
}
/**Start the applet*/
- public void start() {
+ @Override
+public void start() {
}
/**Stop the applet*/
- public void stop() {
+ @Override
+public void stop() {
}
/**Destroy the applet*/
- public void destroy() {
+ @Override
+public void destroy() {
}
/**Get Applet information*/
- public String getAppletInfo() {
+ @Override
+public String getAppletInfo() {
return "Applet Information";
}
/**Get parameter info*/
- public String[][] getParameterInfo() {
+ @Override
+public String[][] getParameterInfo() {
return null;
}
@@ -149,13 +155,15 @@ public class SViewer extends JApplet {
applet.filename = args[0];
Frame frame;
frame = new Frame() {
- protected void processWindowEvent(WindowEvent e) {
+ @Override
+ protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}
- public synchronized void setTitle(String title) {
+ @Override
+ public synchronized void setTitle(String title) {
super.setTitle(title);
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
}
diff --git a/src/examples/src/org/apache/poi/hssf/view/SViewerPanel.java b/src/examples/src/org/apache/poi/hssf/view/SViewerPanel.java
index 5fe596220a..bf1ba4ab7f 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SViewerPanel.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SViewerPanel.java
@@ -129,7 +129,8 @@ public class SViewerPanel extends JPanel {
return scroll;
}
- public void paint(Graphics g) {
+ @Override
+public void paint(Graphics g) {
//JMH I am only overriding this to get a picture of the time taken to paint
long start = System.currentTimeMillis();
super.paint(g);
@@ -180,19 +181,24 @@ public class SViewerPanel extends JPanel {
}
}
+ @Override
public void mouseClicked(MouseEvent e) {
checkPopup(e);
}
+ @Override
public void mousePressed(MouseEvent e) {
checkPopup(e);
}
+ @Override
public void mouseReleased(MouseEvent e) {
checkPopup(e);
}
+ @Override
public void mouseEntered(MouseEvent e) {}
+ @Override
public void mouseExited(MouseEvent e) {}
}
@@ -202,6 +208,7 @@ public class SViewerPanel extends JPanel {
super("Rename");
}
+ @Override
public void actionPerformed(ActionEvent e) {
int tabIndex = sheetPane.getSelectedIndex();
if (tabIndex != -1) {
@@ -220,6 +227,7 @@ public class SViewerPanel extends JPanel {
super("Insert");
}
+ @Override
public void actionPerformed(ActionEvent e) {
//Create a new sheet then search for the sheet and make sure that the
//sheetPane shows it.
@@ -239,6 +247,7 @@ public class SViewerPanel extends JPanel {
super("Delete");
}
+ @Override
public void actionPerformed(ActionEvent e) {
int tabIndex = sheetPane.getSelectedIndex();
if (tabIndex != -1) {
@@ -267,12 +276,14 @@ public class SViewerPanel extends JPanel {
SViewerPanel p = new SViewerPanel(wb, true);
JFrame frame;
frame = new JFrame() {
+ @Override
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}
+ @Override
public synchronized void setTitle(String title) {
super.setTitle(title);
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
diff --git a/src/examples/src/org/apache/poi/hssf/view/brush/DoubleStroke.java b/src/examples/src/org/apache/poi/hssf/view/brush/DoubleStroke.java
index 126214b8a1..01b17ef4d0 100644
--- a/src/examples/src/org/apache/poi/hssf/view/brush/DoubleStroke.java
+++ b/src/examples/src/org/apache/poi/hssf/view/brush/DoubleStroke.java
@@ -47,6 +47,7 @@ public class DoubleStroke implements Brush {
*
* @return The created stroke as a new shape.
*/
+ @Override
public Shape createStrokedShape(Shape s) {
// Use the first stroke to create an outline of the shape
Shape outline = stroke1.createStrokedShape(s);
@@ -56,6 +57,7 @@ public class DoubleStroke implements Brush {
}
/** {@inheritDoc} */
+ @Override
public float getLineWidth() {
return stroke1.getLineWidth() + 2 * stroke2.getLineWidth();
}
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java b/src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java
index 698aab35ea..de1204e77d 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java
@@ -31,6 +31,7 @@ import org.apache.poi.util.HexDump;
public class DocumentDescriptorRenderer extends DefaultTreeCellRenderer
{
+ @Override
public Component getTreeCellRendererComponent(final JTree tree,
final Object value,
final boolean selectedCell,
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java b/src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java
index 917c0b0570..dbb759c9c5 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java
@@ -49,6 +49,7 @@ public class ExtendableTreeCellRenderer implements TreeCellRenderer
renderers = new HashMap<Class<?>,TreeCellRenderer>();
register(Object.class, new DefaultTreeCellRenderer()
{
+ @Override
public Component getTreeCellRendererComponent
(JTree tree, Object value, boolean selectedCell,
boolean expanded, boolean leaf, int row, boolean hasCellFocus)
@@ -97,6 +98,7 @@ public class ExtendableTreeCellRenderer implements TreeCellRenderer
*
* @see TreeCellRenderer#getTreeCellRendererComponent
*/
+ @Override
public Component getTreeCellRendererComponent
(final JTree tree, final Object value, final boolean selected,
final boolean expanded, final boolean leaf, final int row,
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java b/src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java
index d1fa1727ca..ec84847d68 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java
@@ -65,6 +65,7 @@ public class POIBrowser extends JFrame
{
addWindowListener(new WindowAdapter()
{
+ @Override
public void windowClosing(WindowEvent e)
{
System.exit(0);
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/PropertySetDescriptorRenderer.java b/src/examples/src/org/apache/poi/poifs/poibrowser/PropertySetDescriptorRenderer.java
index 085f2db6d7..8ce336f24d 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/PropertySetDescriptorRenderer.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/PropertySetDescriptorRenderer.java
@@ -41,6 +41,7 @@ import org.apache.poi.util.HexDump;
public class PropertySetDescriptorRenderer extends DocumentDescriptorRenderer
{
+ @Override
public Component getTreeCellRendererComponent(final JTree tree,
final Object value,
final boolean selectedCell,
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java b/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
index 3174610cad..d2427ce15b 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
@@ -121,6 +121,7 @@ public class TreeReaderListener implements POIFSReaderListener
* reading. This method retrieves properties of the document and
* adds them to a tree model.</p>
*/
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
DocumentDescriptor d;
diff --git a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java b/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
index e8bca901f8..532b89c0f7 100644
--- a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
+++ b/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
@@ -764,6 +764,7 @@ public class ToCSV {
* file ends with either '.xls' or '.xlsx' and false will be
* returned in all other instances.
*/
+ @Override
public boolean accept(File file, String name) {
return(name.endsWith(".xls") || name.endsWith(".xlsx"));
}
diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java b/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java
index 4b9a325cdf..3d6b4423a1 100644
--- a/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java
+++ b/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java
@@ -33,6 +33,7 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction ;
*/
public class CalculateMortgage implements FreeRefFunction {
+ @Override
public ValueEval evaluate( ValueEval[] args, OperationEvaluationContext ec ) {
// verify that we have enough data
diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java b/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java
index ae70794368..bf4018f3d6 100644
--- a/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java
+++ b/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java
@@ -56,6 +56,7 @@ public class SettingExternalFunction {
// don't care about the implementation, we are not interested in evaluation
// and this method will never be called
FreeRefFunction NA = new FreeRefFunction() {
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
return ErrorEval.NA;
}
@@ -66,6 +67,7 @@ public class SettingExternalFunction {
_functionsByName.put("BDS", NA);
}
+ @Override
public FreeRefFunction findFunction(String name) {
return _functionsByName.get(name.toUpperCase(Locale.ROOT));
}
diff --git a/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java b/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java
index 1e235f929e..677a38ab71 100644
--- a/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java
+++ b/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java
@@ -42,6 +42,7 @@ public class HSSFHtmlHelper implements HtmlHelper {
colors = wb.getCustomPalette();
}
+ @Override
public void colorStyles(CellStyle style, Formatter out) {
HSSFCellStyle cs = (HSSFCellStyle) style;
out.format(" /* fill pattern = %d */%n", cs.getFillPattern());
diff --git a/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java b/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java
index 9b22e1ed04..20a30ed2eb 100644
--- a/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java
+++ b/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java
@@ -28,6 +28,7 @@ import org.apache.poi.xssf.usermodel.XSSFColor;
* @author Ken Arnold, Industrious Media LLC
*/
public class XSSFHtmlHelper implements HtmlHelper {
+ @Override
public void colorStyles(CellStyle style, Formatter out) {
XSSFCellStyle cs = (XSSFCellStyle) style;
styleColor(out, "background-color", cs.getFillForegroundXSSFColor());
diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
index 11d14ae376..0f84ce91fe 100644
--- a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
+++ b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
@@ -83,6 +83,7 @@ public class XLSX2CSV {
}
}
+ @Override
public void startRow(int rowNum) {
// If there were gaps, output the missing rows
outputMissingRows(rowNum-currentRow-1);
@@ -92,6 +93,7 @@ public class XLSX2CSV {
currentCol = -1;
}
+ @Override
public void endRow(int rowNum) {
// Ensure the minimum number of columns
for (int i=currentCol; i<minColumns; i++) {
@@ -100,6 +102,7 @@ public class XLSX2CSV {
output.append('\n');
}
+ @Override
public void cell(String cellReference, String formattedValue,
XSSFComment comment) {
if (firstCellOfRow) {
@@ -132,6 +135,7 @@ public class XLSX2CSV {
}
}
+ @Override
public void headerFooter(String text, boolean isHeader, String tagName) {
// Skip, no headers or footers in CSV
}
diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java b/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
index 1997e6776f..6e35e8cdbd 100644
--- a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
+++ b/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
@@ -116,7 +116,8 @@ public class FromHowTo {
this.sst = sst;
}
- public void startElement(String uri, String localName, String name,
+ @Override
+ public void startElement(String uri, String localName, String name,
Attributes attributes) throws SAXException {
// c => cell
if(name.equals("c")) {
@@ -131,7 +132,8 @@ public class FromHowTo {
lastContents = "";
}
- public void endElement(String uri, String localName, String name)
+ @Override
+ public void endElement(String uri, String localName, String name)
throws SAXException {
// Process the last contents as required.
// Do now, as characters() may be called more than once
@@ -152,7 +154,8 @@ public class FromHowTo {
}
}
- public void characters(char[] ch, int start, int length) throws SAXException { // NOSONAR
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException { // NOSONAR
lastContents += new String(ch, start, length);
}
}
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 1e5515859d..31b5e859fd 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
@@ -42,6 +42,7 @@ public class HybridStreaming {
InputStream sourceBytes = new FileInputStream("workbook.xlsx");
XSSFWorkbook workbook = new XSSFWorkbook(sourceBytes) {
/** Avoid DOM parse of large sheet */
+ @Override
public void parseSheet(java.util.Map<String,XSSFSheet> shIdMap, CTSheet ctSheet) {
if (!SHEET_TO_STREAM.equals(ctSheet.getName())) {
super.parseSheet(shIdMap, ctSheet);
@@ -59,15 +60,19 @@ public class HybridStreaming {
private static SheetContentsHandler createSheetContentsHandler() {
return new SheetContentsHandler() {
+ @Override
public void startRow(int rowNum) {
}
+ @Override
public void headerFooter(String text, boolean isHeader, String tagName) {
}
+ @Override
public void endRow(int rowNum) {
}
+ @Override
public void cell(String cellReference, String formattedValue, XSSFComment comment) {
}
};
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java
index 55e51975fe..bf13348485 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java
@@ -102,7 +102,8 @@ public class ExcelAntEvaluateCell extends Task {
return precisionToUse;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
precisionToUse = 0 ;
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java
index eaf04007ce..35f5420f01 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java
@@ -58,6 +58,7 @@ public class ExcelAntHandlerTask extends Task {
wbUtil = wkbkUtil ;
}
+ @Override
public void execute() throws BuildException {
log( "handling the workbook with class " + className, Project.MSG_INFO ) ;
try {
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetDoubleCell.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetDoubleCell.java
index 3e6c4cd607..2451a61e68 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetDoubleCell.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetDoubleCell.java
@@ -50,7 +50,8 @@ public class ExcelAntSetDoubleCell extends ExcelAntSet {
return cellValue;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
wbUtil.setDoubleValue(cellStr, cellValue ) ;
log( "set cell " + cellStr + " to value " + cellValue + " as double.", Project.MSG_DEBUG ) ;
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetFormulaCell.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetFormulaCell.java
index 1b9d5f0539..8dc599b104 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetFormulaCell.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetFormulaCell.java
@@ -43,7 +43,8 @@ public class ExcelAntSetFormulaCell extends ExcelAntSet {
return cellValue;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
wbUtil.setFormulaValue( cellStr, cellValue ) ;
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetStringCell.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetStringCell.java
index 047e544ea5..e1ab047fbf 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetStringCell.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntSetStringCell.java
@@ -50,7 +50,8 @@ public class ExcelAntSetStringCell extends ExcelAntSet {
return stringValue;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
wbUtil.setStringValue(cellStr, stringValue ) ;
log( "set cell " + cellStr + " to value " + stringValue + " as String.", Project.MSG_DEBUG ) ;
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java
index 13271611b1..47ee3124a7 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java
@@ -78,7 +78,8 @@ public class ExcelAntTask extends Task {
functions.add( def ) ;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
checkClassPath();
int totalCount = 0 ;
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java
index 36b9b6d9e0..fd8f930919 100644
--- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java
+++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java
@@ -124,7 +124,8 @@ public class ExcelAntTest extends Task{
return evaluators;
}
- public void execute() throws BuildException {
+ @Override
+ public void execute() throws BuildException {
Iterator<Task> taskIt = testTasks.iterator();
diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
index 83ac61e4c8..f1c526bf9d 100644
--- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
+++ b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
@@ -35,6 +35,7 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction ;
*/
public class CalculateMortgageFunction implements FreeRefFunction {
+ @Override
public ValueEval evaluate( ValueEval[] args, OperationEvaluationContext ec ) {
// verify that we have enough data
diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/BuildFileTest.java b/src/excelant/testcases/org/apache/poi/ss/excelant/BuildFileTest.java
index 41b3b04fdc..55ea777871 100644
--- a/src/excelant/testcases/org/apache/poi/ss/excelant/BuildFileTest.java
+++ b/src/excelant/testcases/org/apache/poi/ss/excelant/BuildFileTest.java
@@ -500,6 +500,7 @@ public abstract class BuildFileTest extends TestCase {
this.buffer = buffer;
}
+ @Override
public void write(int b) {
buffer.append((char) b);
}
@@ -522,6 +523,7 @@ public abstract class BuildFileTest extends TestCase {
/**
* Fired before any targets are started.
*/
+ @Override
public void buildStarted(BuildEvent event) {
}
@@ -531,6 +533,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @see BuildEvent#getException()
*/
+ @Override
public void buildFinished(BuildEvent event) {
}
@@ -539,6 +542,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @see BuildEvent#getTarget()
*/
+ @Override
public void targetStarted(BuildEvent event) {
//System.out.println("targetStarted " + event.getTarget().getName());
}
@@ -549,6 +553,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @see BuildEvent#getException()
*/
+ @Override
public void targetFinished(BuildEvent event) {
//System.out.println("targetFinished " + event.getTarget().getName());
}
@@ -558,6 +563,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @see BuildEvent#getTask()
*/
+ @Override
public void taskStarted(BuildEvent event) {
//System.out.println("taskStarted " + event.getTask().getTaskName());
}
@@ -568,6 +574,7 @@ public abstract class BuildFileTest extends TestCase {
*
* @see BuildEvent#getException()
*/
+ @Override
public void taskFinished(BuildEvent event) {
//System.out.println("taskFinished " + event.getTask().getTaskName());
}
@@ -578,6 +585,7 @@ public abstract class BuildFileTest extends TestCase {
* @see BuildEvent#getMessage()
* @see BuildEvent#getPriority()
*/
+ @Override
public void messageLogged(BuildEvent event) {
if (event.getPriority() > logLevel) {
// ignore event
diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java b/src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java
index ffdb2f2fa7..6e52e1d4bf 100644
--- a/src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java
+++ b/src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java
@@ -26,10 +26,12 @@ public class MockExcelAntWorkbookHandler implements IExcelAntWorkbookHandler {
public static Workbook workbook = null;
+ @Override
public void setWorkbook(Workbook workbook) {
MockExcelAntWorkbookHandler.workbook = workbook;
}
+ @Override
public void execute() {
executed = true;
assertNotNull(workbook);
diff --git a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
index 65edbaae50..6bfeee2e71 100644
--- a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
@@ -53,6 +53,7 @@ public abstract class AbstractFileHandler implements FileHandler {
EXPECTED_EXTRACTOR_FAILURES.add("poifs/Notes.ole2");
}
+ @Override
public void handleExtracting(File file) throws Exception {
boolean before = ExtractorFactory.getThreadPrefersEventExtractors();
try {
diff --git a/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
index 12313b78e4..eb0e1b6c06 100644
--- a/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
@@ -51,7 +51,8 @@ public class HDGFFileHandler extends POIFSFileHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
File file = new File("test-data/diagram/44501.vsd");
diff --git a/src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java
index a41b6ebadf..093ef0274b 100644
--- a/src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java
@@ -39,7 +39,8 @@ public class HPBFFileHandler extends POIFSFileHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
File file = new File("test-data/publisher/SampleBrochure.pub");
diff --git a/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
index 6a84201b45..1f3dc69056 100644
--- a/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
@@ -37,7 +37,8 @@ public class HPSFFileHandler extends POIFSFileHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
InputStream stream = new FileInputStream("test-data/hpsf/Test0313rur.adm");
try {
diff --git a/src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java
index c0454e0d30..db9548c41b 100644
--- a/src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java
@@ -49,7 +49,8 @@ public class HSLFFileHandler extends SlideShowHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
InputStream stream = new FileInputStream("test-data/hpsf/Test_Humor-Generation.ppt");
try {
diff --git a/src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java
index d68504a04c..c22edf2fc0 100644
--- a/src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java
@@ -72,7 +72,8 @@ public class HSMFFileHandler extends POIFSFileHandler {
// }
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
InputStream stream = new FileInputStream("test-data/hsmf/example_received_regular.msg");
try {
diff --git a/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
index ead35e47bb..d762598a4c 100644
--- a/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
@@ -38,7 +38,8 @@ public class HWPFFileHandler extends POIFSFileHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
File file = new File("test-data/document/52117.doc");
diff --git a/src/integrationtest/org/apache/poi/stress/OPCFileHandler.java b/src/integrationtest/org/apache/poi/stress/OPCFileHandler.java
index 50a9577c04..12493e24ca 100644
--- a/src/integrationtest/org/apache/poi/stress/OPCFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/OPCFileHandler.java
@@ -55,6 +55,7 @@ public class OPCFileHandler extends AbstractFileHandler {
}
}
+ @Override
public void handleExtracting(File file) throws Exception {
// text-extraction is not possible currenlty for these types of files
}
diff --git a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
index bbfdc661c7..421f842e1b 100644
--- a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
@@ -46,7 +46,8 @@ public class XSLFFileHandler extends SlideShowHandler {
slide.close();
}
- public void handleExtracting(File file) throws Exception {
+ @Override
+ public void handleExtracting(File file) throws Exception {
super.handleExtracting(file);
@@ -65,7 +66,8 @@ public class XSLFFileHandler extends SlideShowHandler {
}
// a test-case to test this locally without executing the full TestAllFiles
- @Test
+ @Override
+ @Test
public void test() throws Exception {
InputStream stream = new FileInputStream("test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx");
try {
diff --git a/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java b/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
index 0e24f04862..bfa31c7127 100644
--- a/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
@@ -203,39 +203,71 @@ public class XSSFFileHandler extends SpreadsheetHandler {
@SuppressWarnings("resource")
NullPrintStream() {
super(new OutputStream() {
+ @Override
public void write(int b) {}
+ @Override
public void write(byte[] b) {}
+ @Override
public void write(byte[] b, int off, int len) {}
});
}
+ @Override
public void write(int b) {}
+ @Override
public void write(byte[] buf, int off, int len) {}
+ @Override
public void print(boolean b) {}
+ @Override
public void print(char c) {}
+ @Override
public void print(int i) {}
+ @Override
public void print(long l) {}
+ @Override
public void print(float f) {}
+ @Override
public void print(double d) {}
+ @Override
public void print(char[] s) {}
+ @Override
public void print(String s) {}
+ @Override
public void print(Object obj) {}
+ @Override
public void println() {}
+ @Override
public void println(boolean x) {}
+ @Override
public void println(char x) {}
+ @Override
public void println(int x) {}
+ @Override
public void println(long x) {}
+ @Override
public void println(float x) {}
+ @Override
public void println(double x) {}
+ @Override
public void println(char[] x) {}
+ @Override
public void println(String x) {}
+ @Override
public void println(Object x) {}
+ @Override
public PrintStream printf(String format, Object... args) { return this; }
+ @Override
public PrintStream printf(Locale l, String format, Object... args) { return this; }
+ @Override
public PrintStream format(String format, Object... args) { return this; }
+ @Override
public PrintStream format(Locale l, String format, Object... args) { return this; }
+ @Override
public PrintStream append(CharSequence csq) { return this; }
+ @Override
public PrintStream append(CharSequence csq, int start, int end) { return this; }
+ @Override
public PrintStream append(char c) { return this; }
+ @Override
public void write(byte[] b) {}
}
}
diff --git a/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java b/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
index e93e820b33..be63e2bf7a 100644
--- a/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
+++ b/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
@@ -79,6 +79,7 @@ public final class TestPOIXMLDocument {
//
}
+ @Override
protected POIXMLRelation getDescriptor(String relationshipType) {
return null;
}
diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java
index 96a46c45e9..4582c2ffdc 100644
--- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java
+++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java
@@ -57,10 +57,12 @@ public class AesZipFileZipEntrySource implements ZipEntrySource {
* Note: the file sizes are rounded up to the next cipher block size,
* so don't rely on file sizes of these custom encrypted zip file entries!
*/
+ @Override
public Enumeration<? extends ZipEntry> getEntries() {
return zipFile.entries();
}
+ @Override
@SuppressWarnings("resource")
public InputStream getInputStream(ZipEntry entry) throws IOException {
InputStream is = zipFile.getInputStream(entry);
@@ -113,6 +115,7 @@ public class AesZipFileZipEntrySource implements ZipEntrySource {
zos.putNextEntry(zeNew);
FilterOutputStream fos2 = new FilterOutputStream(zos){
// don't close underlying ZipOutputStream
+ @Override
public void close() {}
};
CipherOutputStream cos = new CipherOutputStream(fos2, ciEnc);
diff --git a/src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java b/src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java
index fe8747b5a1..ea51926389 100644
--- a/src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java
+++ b/src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java
@@ -57,6 +57,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
@Test
public void testGeneralFormat() throws Exception {
runFormatTests("GeneralFormatTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
switch (CellFormat.ultimateTypeEnum(cell)) {
case BOOLEAN:
@@ -72,6 +73,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
public void testNumberFormat() throws Exception {
runFormatTests("NumberFormatTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
return cell.getNumericCellValue();
}
@@ -81,6 +83,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
@Test
public void testNumberApproxFormat() throws Exception {
runFormatTests("NumberFormatApproxTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
return cell.getNumericCellValue();
}
@@ -104,6 +107,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
LocaleUtil.setUserTimeZone(TimeZone.getTimeZone("CET"));
try {
runFormatTests("DateFormatTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
return cell.getDateCellValue();
}
@@ -116,6 +120,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
@Test
public void testElapsedFormat() throws Exception {
runFormatTests("ElapsedFormatTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
return cell.getNumericCellValue();
}
@@ -125,6 +130,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
@Test
public void testTextFormat() throws Exception {
runFormatTests("TextFormatTests.xlsx", new CellValue() {
+ @Override
public Object getValue(Cell cell) {
switch(CellFormat.ultimateTypeEnum(cell)) {
case BOOLEAN:
@@ -139,6 +145,7 @@ public class TestCellFormatPart extends CellFormatTestBase {
@Test
public void testConditions() throws Exception {
runFormatTests("FormatConditionTests.xlsx", new CellValue() {
+ @Override
Object getValue(Cell cell) {
return cell.getNumericCellValue();
}
diff --git a/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java b/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java
index 57957fa298..43a6036ba2 100644
--- a/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java
+++ b/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java
@@ -30,6 +30,7 @@ public class TestXDGFVisioExtractor extends TestCase {
private OPCPackage pkg;
private XmlVisioDocument xml;
+ @Override
protected void setUp() throws Exception {
diagrams = POIDataSamples.getDiagramInstance();
diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
index b72cd76082..9d710cd70e 100644
--- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
+++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
@@ -48,10 +48,12 @@ public class TestXSLFTextParagraph {
super(p);
}
+ @Override
public void breakText(Graphics2D graphics) {
super.breakText(graphics);
}
+ @Override
public double getWrappingWidth(boolean firstLine, Graphics2D graphics) {
return super.getWrappingWidth(firstLine, graphics);
}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
index dc0fc1c8c9..d5be11e2f4 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
@@ -95,6 +95,7 @@ public final class TestSXSSFSheet extends BaseTestXSheet {
super.bug35084();
}
+ @Override
@Test
public void getCellComment() throws IOException {
// TODO: reading cell comments via Sheet does not work currently as it tries
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
index fec8b449e9..a73a0cf7cf 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
@@ -36,6 +36,7 @@ public class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting
super(XSSFITestDataProvider.instance);
}
+ @Override
protected void assertColour(String hexExpected, Color actual) {
assertNotNull("Colour must be given", actual);
XSSFColor colour = (XSSFColor)actual;
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
index 36ce03406e..c7179531d8 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
@@ -42,7 +42,8 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat {
/**
* [Bug 49928] formatCellValue returns incorrect value for \u00a3 formatted cells
*/
- @Test
+ @Override
+ @Test
public void test49928() throws IOException {
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("49928.xlsx");
doTest49928Core(wb);
@@ -68,7 +69,8 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat {
/**
* [Bug 58532] Handle formats that go numnum, numK, numM etc
*/
- @Test
+ @Override
+ @Test
public void test58532() throws IOException {
XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("FormatKM.xlsx");
doTest58532Core(wb);
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFForkedEvaluator.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFForkedEvaluator.java
index 6de609a5ed..4da863fafb 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFForkedEvaluator.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFForkedEvaluator.java
@@ -22,6 +22,7 @@ import org.apache.poi.ss.usermodel.Workbook;
public class TestXSSFForkedEvaluator extends TestForkedEvaluator {
+ @Override
protected Workbook newWorkbook() {
return new XSSFWorkbook();
}
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java
index 5bf50459e1..d12020b516 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java
@@ -33,6 +33,7 @@ public class TestXWPFDecorators extends TestCase {
private XWPFDocument hyperlink;
private XWPFDocument comments;
+ @Override
protected void setUp() throws IOException {
simple = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx");
hyperlink = XWPFTestDataSamples.openSampleDocument("TestDocument.docx");
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
index bb7a7049e1..0596a941f0 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
@@ -37,6 +37,7 @@ public class TestXWPFHeaderFooterPolicy extends TestCase {
private XWPFDocument oddEven;
private XWPFDocument diffFirst;
+ @Override
protected void setUp() throws IOException {
noHeader = XWPFTestDataSamples.openSampleDocument("NoHeadFoot.docx");
header = XWPFTestDataSamples.openSampleDocument("ThreeColHead.docx");
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
index b4687b36fb..449f6b6b84 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
@@ -37,6 +37,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
* Tests for XWPF Tables
*/
public class TestXWPFTable extends TestCase {
+ @Override
protected void setUp() {
/*
XWPFDocument doc = new XWPFDocument();
diff --git a/src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java b/src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java
index 30296cf822..d19843a6f9 100644
--- a/src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java
+++ b/src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java
@@ -47,7 +47,8 @@ public final class TestPOIDocumentScratchpad extends TestCase {
* Set things up, using a PowerPoint document and
* a Word Document for our testing
*/
- public void setUp() throws Exception {
+ @Override
+ public void setUp() throws Exception {
doc = new HSLFSlideShowImpl(POIDataSamples.getSlideShowInstance().openResourceAsStream("basic_test_ppt_file.ppt"));
doc2 = HWPFTestDataSamples.openSampleFile("test2.doc");
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
index c617341698..5b7723aebe 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
@@ -30,7 +30,8 @@ public final class TestHDGFCore extends TestCase {
private POIFSFileSystem fs;
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("Test_Visio-Some_Random_Text.vsd"));
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java b/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java
index d36c5ba54f..48cc8a9166 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java
@@ -31,7 +31,8 @@ public final class TestVisioExtractor extends TestCase {
private String defFilename;
private int defTextChunks;
- protected void setUp() {
+ @Override
+ protected void setUp() {
defFilename = "Test_Visio-Some_Random_Text.vsd";
defTextChunks = 5;
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java
index 41d1132782..6693ce05df 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java
@@ -33,10 +33,15 @@ public abstract class StreamTest extends TestCase {
this.format = format;
}
- public boolean destinationCompressed() { return compressed; }
- public boolean destinationHasChunks() { return false; }
- public boolean destinationHasPointers() { return hasPointers; }
- public boolean destinationHasStrings() { return false; }
- public int getSizeInBytes() { return -1; }
+ @Override
+ public boolean destinationCompressed() { return compressed; }
+ @Override
+ public boolean destinationHasChunks() { return false; }
+ @Override
+ public boolean destinationHasPointers() { return hasPointers; }
+ @Override
+ public boolean destinationHasStrings() { return false; }
+ @Override
+ public int getSizeInBytes() { return -1; }
}
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
index 06f2dd86c9..431526e56d 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
@@ -36,7 +36,8 @@ public final class TestStreamBugs extends StreamTest {
private PointerFactory ptrFactory;
private POIFSFileSystem filesystem;
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
ptrFactory = new PointerFactory(11);
chunkFactory = new ChunkFactory(11);
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
index 8d4771b735..3af4c6b361 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
@@ -34,7 +34,8 @@ public final class TestStreamComplex extends StreamTest {
private ChunkFactory chunkFactory;
private PointerFactory ptrFactory;
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
ptrFactory = new PointerFactory(11);
chunkFactory = new ChunkFactory(11);
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
index 2178e6a760..f854394816 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
@@ -44,7 +44,8 @@ public final class TestMAPIAttributes extends TestCase {
}
- protected void tearDown() throws Exception {
+ @Override
+protected void tearDown() throws Exception {
stream.close();
super.tearDown();
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
index 67bbd03175..565d7fb922 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
@@ -144,6 +144,7 @@ public final class TestRecordContainer extends TestCase {
assertEquals(ch.length-1, recordContainer.getChildRecords().length);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
index cd4b54d19c..593289ff19 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
@@ -38,6 +38,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShow;
public final class TestTxMasterStyleAtom extends TestCase {
protected HSLFSlideShow _ppt;
+ @Override
public void setUp() {
_ppt = new HSLFSlideShow();
}
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 b89a5f6e2d..2e2998c68b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
@@ -48,7 +48,8 @@ public final class TestAddingSlides extends TestCase {
/**
* Create/open the slideshows
*/
- public void setUp() throws Exception {
+ @Override
+ public void setUp() throws Exception {
hss_empty = HSLFSlideShowImpl.create();
ss_empty = new HSLFSlideShow(hss_empty);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
index e9a8236f66..720719271c 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
@@ -863,11 +863,13 @@ public final class TestBugs {
assertEquals(hlRun.getEndIndex(), hlShape.getEndIndex());
OutputStream nullOutput = new OutputStream(){
+ @Override
public void write(int b) throws IOException {}
};
final boolean found[] = { false };
DummyGraphics2d dgfx = new DummyGraphics2d(new PrintStream(nullOutput)){
+ @Override
public void drawString(AttributedCharacterIterator iterator, float x, float y) {
// For the test file, common sl draws textruns one by one and not mixed
// so we evaluate the whole iterator
diff --git a/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java b/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java
index cdd803a713..799a44c079 100644
--- a/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java
+++ b/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java
@@ -55,6 +55,7 @@ public class TestExcelConverterSuite
"../spreadsheet" );
for ( final File child : directory.listFiles( new FilenameFilter()
{
+ @Override
public boolean accept( File dir, String name )
{
return name.endsWith( ".xls" ) && !failingFiles.contains( name );
diff --git a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
index 78e6534569..17226a654b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
@@ -105,6 +105,7 @@ public class TestHwmfParsing {
while ((ze = zis.getNextEntry()) != null) {
String basename = ze.getName().replaceAll(".*?([^/]+)\\.wmf", "$1");
FilterInputStream fis = new FilterInputStream(zis){
+ @Override
public void close() throws IOException {}
};
try {
@@ -138,6 +139,7 @@ public class TestHwmfParsing {
final String startFile = "";
File files[] = indir.listFiles(new FileFilter() {
boolean foundStartFile = false;
+ @Override
public boolean accept(File pathname) {
foundStartFile |= startFile.isEmpty() || pathname.getName().contains(startFile);
return foundStartFile && pathname.getName().matches("(?i).*\\.wmf?$");
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
index 76fab8a8cb..7ac08176dd 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
@@ -29,7 +29,8 @@ public abstract class HWPFTestCase extends TestCase {
protected HWPFTestCase() {
}
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
super.setUp();
/** @todo verify the constructors */
_hWPFDocFixture = new HWPFDocFixture(this, getTestFile());
@@ -42,7 +43,8 @@ public abstract class HWPFTestCase extends TestCase {
return HWPFDocFixture.DEFAULT_TEST_FILE;
}
- protected void tearDown() throws Exception {
+ @Override
+ protected void tearDown() throws Exception {
if (_hWPFDocFixture != null) {
_hWPFDocFixture.tearDown();
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java
index a0c71f81f5..095d776571 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java
@@ -68,6 +68,7 @@ public class TestFieldsTables extends HWPFTestCase
{
}
+ @Override
protected String getTestFile()
{
return "test-fields.doc";
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
index d8724eb0b9..e065b0999b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
@@ -44,7 +44,8 @@ public final class TestHWPFPictures extends TestCase {
private String imgCFile;
private String imgDFile;
- protected void setUp() {
+ @Override
+ protected void setUp() {
docAFile = "testPictures.doc";
docBFile = "two_images.doc";
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
index 5ab3e889f1..8fce4e5587 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
@@ -93,7 +93,8 @@ public final class TestHWPFRangeParts extends TestCase {
*/
private HWPFDocument docUnicode;
- public void setUp() {
+ @Override
+ public void setUp() {
docUnicode = HWPFTestDataSamples.openSampleFile("HeaderFooterUnicode.doc");
docAscii = HWPFTestDataSamples.openSampleFile("ThreeColHeadFoot.doc");
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java
index f567978a1f..f3194bf2f8 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java
@@ -54,6 +54,7 @@ public class TestWordToConverterSuite
"../document" );
for ( final File child : directory.listFiles( new FilenameFilter()
{
+ @Override
public boolean accept( File dir, String name )
{
return name.endsWith( ".doc" ) && !failingFiles.contains( name );
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java
index b1c3fa8b24..1b18e5fd3a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java
@@ -59,6 +59,7 @@ public class TestWordToHtmlConverter
{
wordToHtmlConverter.setPicturesManager( new PicturesManager()
{
+ @Override
public String savePicture( byte[] content,
PictureType pictureType, String suggestedName,
float widthInches, float heightInches )
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
index 2ecd482892..88ed7c3a0f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
@@ -49,7 +49,8 @@ public final class TestDifferentRoutes extends TestCase {
private HWPFDocument doc;
- protected void setUp() {
+ @Override
+ protected void setUp() {
doc = HWPFTestDataSamples.openSampleFile("test2.doc");
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
index af6aa652f5..9085630551 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
@@ -80,7 +80,8 @@ public final class TestWordExtractor extends TestCase {
// With footnote
private String filename6;
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
String filename = "test2.doc";
String filename2 = "test.doc";
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
index d98390dacc..3ee35eded0 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
@@ -73,7 +73,8 @@ public final class TestCHPBinTable
}
}
- protected void setUp()
+ @Override
+protected void setUp()
throws Exception
{
super.setUp();
@@ -82,7 +83,8 @@ public final class TestCHPBinTable
_hWPFDocFixture.setUp();
}
- protected void tearDown()
+ @Override
+protected void tearDown()
throws Exception
{
_cHPBinTable = null;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
index 6a781851fc..fa4dc3e129 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
@@ -53,7 +53,8 @@ public final class TestFontTable
}
- protected void setUp()
+ @Override
+protected void setUp()
throws Exception
{
super.setUp();
@@ -63,7 +64,8 @@ public final class TestFontTable
_hWPFDocFixture.setUp();
}
- protected void tearDown()
+ @Override
+protected void tearDown()
throws Exception
{
_hWPFDocFixture.tearDown();
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
index f5f3162363..07540541e3 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
@@ -56,7 +56,8 @@ public final class TestPlexOfCps
assertEquals(node.getEnd()-node.getStart(), span);
}
}
- protected void setUp()
+ @Override
+protected void setUp()
throws Exception
{
super.setUp();
@@ -66,7 +67,8 @@ public final class TestPlexOfCps
_hWPFDocFixture.setUp();
}
- protected void tearDown()
+ @Override
+protected void tearDown()
throws Exception
{
_plexOfCps = null;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
index 6fb92165cb..1ca57b098b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
@@ -85,7 +85,8 @@ public final class TestSectionTable
}
}
- protected void setUp()
+ @Override
+protected void setUp()
throws Exception
{
super.setUp();
@@ -95,7 +96,8 @@ public final class TestSectionTable
_hWPFDocFixture.setUp();
}
- protected void tearDown()
+ @Override
+protected void tearDown()
throws Exception
{
_hWPFDocFixture.tearDown();
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
index af9921a6f3..41677ddfba 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
@@ -61,7 +61,8 @@ public final class TestStyleSheet
assertEquals(newStyleSheet, _styleSheet);
}
- protected void setUp()
+ @Override
+protected void setUp()
throws Exception
{
super.setUp();
@@ -76,7 +77,8 @@ public final class TestStyleSheet
_styleSheet = new StyleSheet(tableStream, fib.getFcStshf());
}
- protected void tearDown()
+ @Override
+protected void tearDown()
throws Exception
{
_styleSheet = null;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
index ec9e2f9440..0aa4b31626 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
@@ -35,7 +35,8 @@ public final class TestHeaderStories extends TestCase {
private HWPFDocument unicode;
private HWPFDocument withFields;
- protected void setUp() {
+ @Override
+ protected void setUp() {
none = HWPFTestDataSamples.openSampleFile("NoHeadFoot.doc");
header = HWPFTestDataSamples.openSampleFile("ThreeColHead.doc");
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java
index 5e32812e8d..4d0648b39a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java
@@ -46,7 +46,8 @@ public final class TestRangeDelete extends TestCase {
private String illustrativeDocFile;
- protected void setUp() {
+ @Override
+ protected void setUp() {
illustrativeDocFile = "testRangeDelete.doc";
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java
index ededa32755..79c2af67f1 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java
@@ -38,7 +38,8 @@ public final class TestRangeInsertion extends TestCase {
private String illustrativeDocFile;
- protected void setUp() {
+ @Override
+ protected void setUp() {
illustrativeDocFile = "testRangeInsertion.doc";
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
index e0db917ec6..0865189a22 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
@@ -64,6 +64,7 @@ public final class TestRangeProperties extends TestCase {
private HWPFDocument u;
private HWPFDocument a;
+ @Override
protected void setUp() {
u = HWPFTestDataSamples.openSampleFile("HeaderFooterUnicode.doc");
a = HWPFTestDataSamples.openSampleFile("SampleDoc.doc");
diff --git a/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
index c4282ecf60..026bc41def 100644
--- a/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
+++ b/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
@@ -138,10 +138,14 @@ public final class TestEscherContainerRecord extends TestCase {
private static final class DummyEscherRecord extends EscherRecord {
public DummyEscherRecord() { }
- public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) { return 0; }
- public int serialize(int offset, byte[] data, EscherSerializationListener listener) { return 0; }
- public int getRecordSize() { return 10; }
- public String getRecordName() { return ""; }
+ @Override
+ public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) { return 0; }
+ @Override
+ public int serialize(int offset, byte[] data, EscherSerializationListener listener) { return 0; }
+ @Override
+ public int getRecordSize() { return 10; }
+ @Override
+ public String getRecordName() { return ""; }
}
public void testGetRecordSize() {
diff --git a/src/testcases/org/apache/poi/hpsf/basic/AllDataFilesTester.java b/src/testcases/org/apache/poi/hpsf/basic/AllDataFilesTester.java
index 2a7b89c4a0..155664b37a 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/AllDataFilesTester.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/AllDataFilesTester.java
@@ -57,6 +57,7 @@ public class AllDataFilesTester {
final File dataDir = _samples.getFile("");
final File[] docs = dataDir.listFiles(new FileFilter()
{
+ @Override
public boolean accept(final File file)
{
return file.isFile() && file.getName().startsWith("Test");
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java b/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java
index 7e356a4359..48103b0c9c 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java
@@ -64,6 +64,7 @@ public final class TestEmptyProperties extends TestCase {
* does not exist
* @exception IOException if an I/O exception occurs
*/
+ @Override
public void setUp() throws FileNotFoundException, IOException
{
POIDataSamples samples = POIDataSamples.getHPSFInstance();
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java b/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
index 27758a4474..3cb277f5de 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
@@ -52,7 +52,8 @@ public final class TestMetaDataIPI extends TestCase{
* Setup is used to get the document ready. Gets the DocumentSummaryInformation and the
* SummaryInformation to reasonable values
*/
- public void setUp() throws Exception {
+ @Override
+ public void setUp() throws Exception {
bout = new ByteArrayOutputStream();
poifs = new POIFSFileSystem();
dir = poifs.getRoot();
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java b/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java
index 7edf22ff65..6f7e6db1c5 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java
@@ -54,6 +54,7 @@ public class TestUnicode extends TestCase {
* @exception FileNotFoundException if the file to be read does not exist.
* @exception IOException if any other I/O exception occurs
*/
+ @Override
protected void setUp() {
POIDataSamples samples = POIDataSamples.getHPSFInstance();
data = samples.getFile(POI_FS);
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java b/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
index fc2c832b3d..7acede2fb7 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
@@ -236,6 +236,7 @@ public class TestWrite
final POIFSReader r = new POIFSReader();
r.registerListener(new POIFSReaderListener()
{
+ @Override
public void processPOIFSReaderEvent
(final POIFSReaderEvent event)
{
@@ -318,6 +319,7 @@ public class TestWrite
final POIFSReader r = new POIFSReader();
r.registerListener(new POIFSReaderListener()
{
+ @Override
public void processPOIFSReaderEvent
(final POIFSReaderEvent event)
{
@@ -352,6 +354,7 @@ public class TestWrite
static class MyPOIFSReaderListener implements POIFSReaderListener
{
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
try
diff --git a/src/testcases/org/apache/poi/hpsf/basic/Util.java b/src/testcases/org/apache/poi/hpsf/basic/Util.java
index c67bc5dbd4..14f1977b1e 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/Util.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/Util.java
@@ -133,6 +133,7 @@ final class Util {
POIFSReader r = new POIFSReader();
POIFSReaderListener pfl = new POIFSReaderListener()
{
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
try
@@ -201,6 +202,7 @@ final class Util {
final POIFSReader r = new POIFSReader();
POIFSReaderListener pfl = new POIFSReaderListener()
{
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
try
diff --git a/src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java b/src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java
index 51454333f5..fa59266c16 100644
--- a/src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java
+++ b/src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java
@@ -47,6 +47,7 @@ public final class TestEventRecordFactory extends TestCase {
final boolean[] wascalled = { false, }; // hack to pass boolean by ref into inner class
ERFListener listener = new ERFListener() {
+ @Override
public boolean processRecord(Record rec) {
wascalled[0] = true;
assertTrue("must be BOFRecord got SID="+rec.getSid(),
@@ -154,7 +155,8 @@ public final class TestEventRecordFactory extends TestCase {
ContinueRecord.class.getName(),
ContinueRecord.class.getName()
};
- public boolean processRecord(Record rec)
+ @Override
+ public boolean processRecord(Record rec)
{
// System.out.println(rec.toString());
assertEquals(
diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java
index 37b77423ba..72268832e2 100644
--- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java
+++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java
@@ -153,6 +153,7 @@ public final class TestEventWorkbookBuilder extends TestCase {
private final List<Record> _records = new ArrayList<Record>();
private final List<Record> _frecs = new ArrayList<Record>();
+ @Override
public void processRecord(Record record) {
_records.add(record);
if(record instanceof FormulaRecord) {
diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
index 1eb61509a6..e9fa2a48bc 100644
--- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
+++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
@@ -108,7 +108,8 @@ public final class TestFormatTrackingHSSFListener {
public MockHSSFListener() {}
private final List<Record> _records = new ArrayList<Record>();
- public void processRecord(Record record) {
+ @Override
+ public void processRecord(Record record) {
_records.add(record);
}
}
diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
index 08c1babe04..c87021b36d 100644
--- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
+++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
@@ -130,6 +130,7 @@ public final class TestHSSFEventFactory extends TestCase {
return result;
}
+ @Override
public void processRecord(Record record) {
records.add(record);
}
diff --git a/src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java b/src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
index 228071af24..5ed44a0f4a 100644
--- a/src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
+++ b/src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
@@ -367,7 +367,8 @@ public final class TestMissingRecordAwareHSSFListener extends TestCase {
private final List<Record> _records = new ArrayList<Record>();
private boolean logToStdOut = false;
- public void processRecord(Record record) {
+ @Override
+ public void processRecord(Record record) {
_records.add(record);
if(record instanceof MissingRowDummyRecord) {
diff --git a/src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java b/src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java
index 75a5980cf6..0a0b789408 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java
@@ -25,6 +25,7 @@ public final class TestDrawingManager2 extends TestCase {
private DrawingManager2 drawingManager2;
private EscherDggRecord dgg;
+ @Override
protected void setUp() {
dgg = new EscherDggRecord();
dgg.setFileIdClusters( new EscherDggRecord.FileIdCluster[0] );
diff --git a/src/testcases/org/apache/poi/hssf/model/TestSheet.java b/src/testcases/org/apache/poi/hssf/model/TestSheet.java
index fca517d23e..0e13039340 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestSheet.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestSheet.java
@@ -120,7 +120,8 @@ public final class TestSheet {
public MergedCellListener() {
_count = 0;
}
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
if (r instanceof MergeCellsRecord) {
_count++;
}
@@ -457,7 +458,8 @@ public final class TestSheet {
public SizeCheckingRecordVisitor() {
_totalSize = 0;
}
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
int estimatedSize=r.getRecordSize();
byte[] buf = new byte[estimatedSize];
@@ -554,7 +556,8 @@ public final class TestSheet {
public IndexRecord getIndexRecord() {
return _indexRecord;
}
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
if (r instanceof IndexRecord) {
if (_indexRecord != null) {
throw new RuntimeException("too many index records");
diff --git a/src/testcases/org/apache/poi/hssf/model/TestWorkbook.java b/src/testcases/org/apache/poi/hssf/model/TestWorkbook.java
index 0d88e2111b..6147358bcc 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestWorkbook.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestWorkbook.java
@@ -109,6 +109,7 @@ public final class TestWorkbook {
assertNotNull(wb.getNameXPtg("ISODD", AggregatingUDFFinder.DEFAULT));
FreeRefFunction NotImplemented = new FreeRefFunction() {
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
throw new RuntimeException("not implemented");
}
diff --git a/src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java b/src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java
index 1063c0c208..d7d05ab459 100644
--- a/src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java
+++ b/src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java
@@ -58,7 +58,8 @@ public final class TestMergeCellsRecord extends TestCase {
}
private static final RecordVisitor dummyRecordVisitor = new RecordVisitor() {
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
// do nothing
}
};
diff --git a/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java b/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
index 8bf893639b..98bcc6ba4e 100644
--- a/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
+++ b/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
@@ -66,7 +66,8 @@ public final class TestColumnInfoRecordsAggregate {
private List<Record> _list = new ArrayList<Record>();
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
_list.add(r);
}
diff --git a/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java b/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
index 7403c0c1bf..f31c49d448 100644
--- a/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
+++ b/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
@@ -171,7 +171,8 @@ public final class TestValueRecordsAggregate {
_writeIndex = 0;
}
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
r.serialize(_writeIndex, _buf);
_writeIndex += r.getRecordSize();
}
@@ -396,7 +397,8 @@ public final class TestValueRecordsAggregate {
final BlankStats bs = new BlankStats();
RecordVisitor rv = new RecordVisitor() {
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
if (r instanceof MulBlankRecord) {
MulBlankRecord mbr = (MulBlankRecord) r;
bs.countMulBlankRecords++;
diff --git a/src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java b/src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java
index 6c0f05cacb..d65c37e702 100644
--- a/src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java
+++ b/src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java
@@ -70,7 +70,8 @@ public final class TestChartTitleFormatRecord {
chartTitleFormatRecords = new ArrayList<ChartTitleFormatRecord>();
}
- public void processRecord(Record record) {
+ @Override
+ public void processRecord(Record record) {
if(record instanceof ChartTitleFormatRecord) {
chartTitleFormatRecords.add((ChartTitleFormatRecord)record);
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java b/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
index 4abebc866a..1016f6d25b 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
@@ -47,6 +47,7 @@ public class HSSFTestHelper {
return 1025;
}
+ @Override
public EscherDgRecord createDgRecord()
{
EscherDgRecord dg = new EscherDgRecord();
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java b/src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java
index c47fca7629..b1586f0f12 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java
@@ -42,7 +42,8 @@ public final class RecordInspector {
_list = new ArrayList<Record>(128);
}
- public void visitRecord(Record r) {
+ @Override
+ public void visitRecord(Record r) {
_list.add(r);
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java b/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
index 6dbd4bce87..724d26432a 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
@@ -30,6 +30,7 @@ public final class TestFontDetails extends TestCase {
private Properties properties;
private FontDetails fontDetails;
+ @Override
protected void setUp() {
properties = new Properties();
properties.setProperty("font.Arial.height", "13");
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
index 5dd80cbaf4..9e8c4a3ef0 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
@@ -375,9 +375,11 @@ public final class TestFormulaEvaluatorBugs {
return _countCacheMisses;
}
+ @Override
public void onCacheHit(int sheetIndex, int srcRowNum, int srcColNum, ValueEval result) {
_countCacheHits++;
}
+ @Override
public void onStartEvaluate(EvaluationCell cell, ICacheEntry entry) {
_countCacheMisses++;
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
index e594fdec96..48d07466cb 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
@@ -36,6 +36,7 @@ public final class TestHSSFConditionalFormatting extends BaseTestConditionalForm
public TestHSSFConditionalFormatting(){
super(HSSFITestDataProvider.instance);
}
+ @Override
protected void assertColour(String hexExpected, Color actual) {
assertNotNull("Colour must be given", actual);
if (actual instanceof HSSFColor) {
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
index 88caed9936..dd334b0183 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
@@ -47,6 +47,7 @@ public final class TestHSSFDataFormat extends BaseTestDataFormat {
/**
* [Bug 49928] formatCellValue returns incorrect value for \u00a3 formatted cells
*/
+ @Override
@Test
public void test49928() throws IOException {
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("49928.xls");
@@ -68,6 +69,7 @@ public final class TestHSSFDataFormat extends BaseTestDataFormat {
/**
* [Bug 58532] Handle formats that go numnum, numK, numM etc
*/
+ @Override
@Test
public void test58532() throws IOException {
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("FormatKM.xls");
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
index bd7ad3d2e8..53d799e953 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
@@ -128,6 +128,7 @@ public final class TestHSSFRow extends BaseTestRow {
workbook.close();
}
+ @Override
@Test
public void testRowHeight() throws IOException{
HSSFWorkbook workbook = new HSSFWorkbook();
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java b/src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java
index 658e781843..3401872146 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java
@@ -124,7 +124,8 @@ public final class TestSanityChecker {
final List<Record> records = Arrays.asList(recs);
try {
new Runnable() {
- public void run() {
+ @Override
+ public void run() {
c.checkRecordOrder(records, check);
}
}.run();
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
index b95c576a99..b310180b29 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
@@ -478,6 +478,7 @@ public final class TestWorkbook {
public int getCount() {
return _count;
}
+ @Override
public void visitRecord(Record r) {
if (r instanceof LabelSSTRecord) {
_count++;
diff --git a/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java b/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java
index 43ee429417..d8a78582f5 100644
--- a/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java
+++ b/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java
@@ -51,7 +51,8 @@ public final class TestBiff8DecryptingStream {
_initialValue = initialValue;
}
- public int read() {
+ @Override
+ public int read() {
return (_initialValue+_position++) & 0xFF;
}
}
diff --git a/src/testcases/org/apache/poi/poifs/eventfilesystem/Listener.java b/src/testcases/org/apache/poi/poifs/eventfilesystem/Listener.java
index a4c1a661e6..4b597c1719 100644
--- a/src/testcases/org/apache/poi/poifs/eventfilesystem/Listener.java
+++ b/src/testcases/org/apache/poi/poifs/eventfilesystem/Listener.java
@@ -37,6 +37,7 @@ class Listener
* @param event the POIFSReaderEvent
*/
+ @Override
public void processPOIFSReaderEvent(POIFSReaderEvent event)
{
}
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java b/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
index 717e6e9632..f04efbe9c0 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
@@ -105,6 +105,7 @@ public class ReaderWriter
* @param event the POIFSReaderEvent
*/
+ @Override
public void processPOIFSReaderEvent(final POIFSReaderEvent event)
{
DocumentInputStream istream = event.getStream();
@@ -167,6 +168,7 @@ public class ReaderWriter
* @param event the POIFSWriterEvent
*/
+ @Override
public void processPOIFSWriterEvent(final POIFSWriterEvent event)
{
try
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java b/src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java
index 769ffa62f4..01f668c45d 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/SlowInputStream.java
@@ -34,6 +34,7 @@ public class SlowInputStream extends FilterInputStream
super(in);
}
+ @Override
public int read(byte[] b, int off, int len) throws IOException {
return super.read(b, off, r.nextInt(len) + 1);
}
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
index 801935865c..6aebd7488d 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
@@ -42,7 +42,8 @@ public final class TestDocumentInputStream extends TestCase {
// any block size
private static final int _buffer_size = 6;
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception {
int blocks = (_workbook_size + 511) / 512;
_workbook_data = new byte[ 512 * blocks ];
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java b/src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java
index d659f1654f..22449e5c6c 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java
@@ -49,7 +49,8 @@ public final class TestEmptyDocument extends TestCase {
POIFSFileSystem fs = new POIFSFileSystem();
DirectoryEntry dir = fs.getRoot();
dir.createDocument("Foo", 0, new POIFSWriterListener() {
- public void processPOIFSWriterEvent(POIFSWriterEvent event) {
+ @Override
+ public void processPOIFSWriterEvent(POIFSWriterEvent event) {
_logger.log(POILogger.WARN, "written");
}
});
@@ -74,7 +75,8 @@ public final class TestEmptyDocument extends TestCase {
POIFSFileSystem fs = new POIFSFileSystem();
DirectoryEntry dir = fs.getRoot();
dir.createDocument("Bar", 1, new POIFSWriterListener() {
- public void processPOIFSWriterEvent(POIFSWriterEvent event) {
+ @Override
+ public void processPOIFSWriterEvent(POIFSWriterEvent event) {
try {
event.getStream().write(0);
} catch (IOException exception) {
@@ -83,7 +85,8 @@ public final class TestEmptyDocument extends TestCase {
}
});
dir.createDocument("Foo", 0, new POIFSWriterListener() {
- public void processPOIFSWriterEvent(POIFSWriterEvent event) {
+ @Override
+ public void processPOIFSWriterEvent(POIFSWriterEvent event) {
}
});
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java b/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
index 2f7c67f379..2bdcb0052c 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
@@ -38,6 +38,7 @@ public final class TestFileSystemBugs extends TestCase {
protected static POIDataSamples _ssSamples = POIDataSamples.getSpreadSheetInstance();
protected List<NPOIFSFileSystem> openedFSs;
+ @Override
protected void tearDown() throws Exception {
if (openedFSs != null && !openedFSs.isEmpty()) {
for (NPOIFSFileSystem fs : openedFSs) {
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
index 2655b44140..779218f5bd 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
@@ -66,14 +66,16 @@ public final class TestPOIFSFileSystem extends TestCase {
_isClosed = false;
}
- public int read() throws IOException {
+ @Override
+ public int read() throws IOException {
int result = _is.read();
if(result >=0) {
checkRead(1);
}
return result;
}
- public int read(byte[] b, int off, int len) throws IOException {
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
int result = _is.read(b, off, len);
checkRead(result);
return result;
@@ -85,7 +87,8 @@ public final class TestPOIFSFileSystem extends TestCase {
throw new MyEx();
}
}
- public void close() throws IOException {
+ @Override
+ public void close() throws IOException {
_isClosed = true;
_is.close();
}
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java b/src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java
index 2c30d1b12d..09388c233e 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java
@@ -136,6 +136,7 @@ public final class TestPropertySorter extends TestCase {
*/
private static final Comparator<Property> OldCaseSensitivePropertyComparator = new Comparator<Property>() {
+ @Override
public int compare(Property o1, Property o2) {
String name1 = o1.getName();
String name2 = o2.getName();
diff --git a/src/testcases/org/apache/poi/poifs/property/LocalProperty.java b/src/testcases/org/apache/poi/poifs/property/LocalProperty.java
index e94a534ab3..f578129b68 100644
--- a/src/testcases/org/apache/poi/poifs/property/LocalProperty.java
+++ b/src/testcases/org/apache/poi/poifs/property/LocalProperty.java
@@ -40,6 +40,7 @@ class LocalProperty
* Method preWrite
*/
+ @Override
protected void preWrite()
{
}
@@ -50,6 +51,7 @@ class LocalProperty
* @return false
*/
+ @Override
public boolean isDirectory()
{
return false;
diff --git a/src/testcases/org/apache/poi/poifs/storage/LocalProperty.java b/src/testcases/org/apache/poi/poifs/storage/LocalProperty.java
index 020a9d3cce..13a1c52306 100644
--- a/src/testcases/org/apache/poi/poifs/storage/LocalProperty.java
+++ b/src/testcases/org/apache/poi/poifs/storage/LocalProperty.java
@@ -41,6 +41,7 @@ class LocalProperty
* do nothing
*/
+ @Override
protected void preWrite()
{
}
@@ -49,6 +50,7 @@ class LocalProperty
* @return false
*/
+ @Override
public boolean isDirectory()
{
return false;
diff --git a/src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java b/src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java
index 42a9d2c5f5..c9a849ba23 100644
--- a/src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java
+++ b/src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java
@@ -136,6 +136,7 @@ public final class LocalRawDataBlockList extends RawDataBlockList {
*
* @return desired block
*/
+ @Override
public ListManagedBlock remove(final int index)
throws IOException
{
@@ -165,6 +166,7 @@ public final class LocalRawDataBlockList extends RawDataBlockList {
* @param index the index of the specified block; if the index is
* out of range, that's ok
*/
+ @Override
public void zap(final int index)
{
ensureArrayExists();
@@ -182,6 +184,7 @@ public final class LocalRawDataBlockList extends RawDataBlockList {
}
}
+ @Override
public int blockCount() {
return _list.size();
}
diff --git a/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java b/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java
index 349d62f091..a7af8af8f8 100644
--- a/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java
+++ b/src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java
@@ -210,7 +210,8 @@ public final class TestRawDataBlock extends TestCase {
return true;
}
- public int read() {
+ @Override
+ public int read() {
if(pos >= data.length) {
return -1;
}
@@ -226,7 +227,8 @@ public final class TestRawDataBlock extends TestCase {
* size, whichever is lower.
* Quite often will simply claim to have no data
*/
- public int read(byte[] b, int off, int len) {
+ @Override
+ public int read(byte[] b, int off, int len) {
// Keep the length within the chunk size
if(len > chunkSize) {
len = chunkSize;
@@ -252,7 +254,8 @@ public final class TestRawDataBlock extends TestCase {
return len;
}
- public int read(byte[] b) {
+ @Override
+ public int read(byte[] b) {
return read(b, 0, b.length);
}
}
diff --git a/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java b/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
index 24c6f7f91b..43a4083830 100644
--- a/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
+++ b/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
@@ -39,6 +39,7 @@ public class TestPresetGeometries {
for(String name : shapes.keySet()) {
CustomGeometry geom = shapes.get(name);
Context ctx = new Context(geom, new Rectangle2D.Double(0, 0, 100, 100), new IAdjustableShape() {
+ @Override
public Guide getAdjustValue(String presetName) {
return null;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java b/src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java
index b0d4b27f8b..764201594f 100644
--- a/src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java
+++ b/src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java
@@ -48,6 +48,7 @@ public abstract class BaseTestExternalFunctions {
//
}
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
if (args.length != 1 || !(args[0] instanceof StringEval)) {
return ErrorEval.VALUE_INVALID;
@@ -62,6 +63,7 @@ public abstract class BaseTestExternalFunctions {
//
}
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
if (args.length != 1 || !(args[0] instanceof StringEval)) {
return ErrorEval.VALUE_INVALID;
diff --git a/src/testcases/org/apache/poi/ss/formula/EvaluationListener.java b/src/testcases/org/apache/poi/ss/formula/EvaluationListener.java
index f8217764aa..babbbf62c6 100644
--- a/src/testcases/org/apache/poi/ss/formula/EvaluationListener.java
+++ b/src/testcases/org/apache/poi/ss/formula/EvaluationListener.java
@@ -27,32 +27,41 @@ import org.apache.poi.ss.formula.eval.ValueEval;
* @author Josh Micich
*/
public abstract class EvaluationListener implements IEvaluationListener {
- public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) {
+ @Override
+ public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) {
// do nothing
}
- public void onReadPlainValue(int sheetIndex, int rowIndex, int columnIndex, ICacheEntry entry) {
+ @Override
+ public void onReadPlainValue(int sheetIndex, int rowIndex, int columnIndex, ICacheEntry entry) {
// do nothing
}
- public void onStartEvaluate(EvaluationCell cell, ICacheEntry entry) {
+ @Override
+ public void onStartEvaluate(EvaluationCell cell, ICacheEntry entry) {
// do nothing
}
- public void onEndEvaluate(ICacheEntry entry, ValueEval result) {
+ @Override
+ public void onEndEvaluate(ICacheEntry entry, ValueEval result) {
// do nothing
}
- public void onClearWholeCache() {
+ @Override
+ public void onClearWholeCache() {
// do nothing
}
- public void onClearCachedValue(ICacheEntry entry) {
+ @Override
+ public void onClearCachedValue(ICacheEntry entry) {
// do nothing
}
- public void onChangeFromBlankValue(int sheetIndex, int rowIndex, int columnIndex,
+ @Override
+ public void onChangeFromBlankValue(int sheetIndex, int rowIndex, int columnIndex,
EvaluationCell cell, ICacheEntry entry) {
// do nothing
}
- public void sortDependentCachedValues(ICacheEntry[] entries) {
+ @Override
+ public void sortDependentCachedValues(ICacheEntry[] entries) {
// do nothing
}
- public void onClearDependentCachedValue(ICacheEntry entry, int depth) {
+ @Override
+ public void onClearDependentCachedValue(ICacheEntry entry, int depth) {
// do nothing
}
}
diff --git a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
index 14e9805770..6d87012b2c 100644
--- a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
+++ b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
@@ -67,7 +67,8 @@ public class TestEvaluationCache extends TestCase {
private EvaluationCell getCell(ICacheEntry a) {
return _formulaCellsByCacheEntry.get(a);
}
- public int compare(ICacheEntry oa, ICacheEntry ob) {
+ @Override
+ public int compare(ICacheEntry oa, ICacheEntry ob) {
EvaluationCell a = getCell(oa);
EvaluationCell b = getCell(ob);
int cmp;
@@ -99,24 +100,29 @@ public class TestEvaluationCache extends TestCase {
_formulaCellsByCacheEntry = new HashMap<ICacheEntry,EvaluationCell>();
_plainCellLocsByCacheEntry = new HashMap<ICacheEntry, Loc>();
}
- public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) {
+ @Override
+ public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) {
log("hit", rowIndex, columnIndex, result);
}
- public void onReadPlainValue(int sheetIndex, int rowIndex, int columnIndex, ICacheEntry entry) {
+ @Override
+ public void onReadPlainValue(int sheetIndex, int rowIndex, int columnIndex, ICacheEntry entry) {
Loc loc = new Loc(0, sheetIndex, rowIndex, columnIndex);
_plainCellLocsByCacheEntry.put(entry, loc);
log("value", rowIndex, columnIndex, entry.getValue());
}
- public void onStartEvaluate(EvaluationCell cell, ICacheEntry entry) {
+ @Override
+ public void onStartEvaluate(EvaluationCell cell, ICacheEntry entry) {
_formulaCellsByCacheEntry.put(entry, cell);
HSSFCell hc = _book.getSheetAt(0).getRow(cell.getRowIndex()).getCell(cell.getColumnIndex());
log("start", cell.getRowIndex(), cell.getColumnIndex(), FormulaExtractor.getPtgs(hc));
}
- public void onEndEvaluate(ICacheEntry entry, ValueEval result) {
+ @Override
+ public void onEndEvaluate(ICacheEntry entry, ValueEval result) {
EvaluationCell cell = _formulaCellsByCacheEntry.get(entry);
log("end", cell.getRowIndex(), cell.getColumnIndex(), result);
}
- public void onClearCachedValue(ICacheEntry entry) {
+ @Override
+ public void onClearCachedValue(ICacheEntry entry) {
int rowIndex;
int columnIndex;
EvaluationCell cell = _formulaCellsByCacheEntry.get(entry);
@@ -133,15 +139,18 @@ public class TestEvaluationCache extends TestCase {
}
log("clear", rowIndex, columnIndex, entry.getValue());
}
- public void sortDependentCachedValues(ICacheEntry[] entries) {
+ @Override
+ public void sortDependentCachedValues(ICacheEntry[] entries) {
Arrays.sort(entries, new FormulaCellCacheEntryComparer(_formulaCellsByCacheEntry));
}
- public void onClearDependentCachedValue(ICacheEntry entry, int depth) {
+ @Override
+ public void onClearDependentCachedValue(ICacheEntry entry, int depth) {
EvaluationCell cell = _formulaCellsByCacheEntry.get(entry);
log("clear" + depth, cell.getRowIndex(), cell.getColumnIndex(), entry.getValue());
}
- public void onChangeFromBlankValue(int sheetIndex, int rowIndex, int columnIndex,
+ @Override
+ public void onChangeFromBlankValue(int sheetIndex, int rowIndex, int columnIndex,
EvaluationCell cell, ICacheEntry entry) {
log("changeFromBlank", rowIndex, columnIndex, entry.getValue());
if (entry.getValue() == null) { // hack to tell the difference between formula and plain value
diff --git a/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java b/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java
index b6d118e89b..f816b6b413 100644
--- a/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java
+++ b/src/testcases/org/apache/poi/ss/formula/TestFunctionRegistry.java
@@ -52,6 +52,7 @@ public class TestFunctionRegistry extends TestCase {
}
FunctionEval.registerFunction("FISHER", new Function() {
+ @Override
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
return ErrorEval.NA;
}
@@ -69,6 +70,7 @@ public class TestFunctionRegistry extends TestCase {
}
AnalysisToolPak.registerFunction("CUBEMEMBERPROPERTY", new FreeRefFunction() {
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
return ErrorEval.NUM_ERROR;
}
@@ -80,6 +82,7 @@ public class TestFunctionRegistry extends TestCase {
public void testExceptions() {
Function func = new Function() {
+ @Override
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
return ErrorEval.NA;
}
@@ -106,6 +109,7 @@ public class TestFunctionRegistry extends TestCase {
}
FreeRefFunction atpFunc = new FreeRefFunction() {
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
return ErrorEval.NUM_ERROR;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java b/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java
index 9df80a9d7a..f92204d872 100644
--- a/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java
+++ b/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java
@@ -107,14 +107,17 @@ public class TestNetworkdaysFunction extends TestCase {
return getRelativeValue(-1, relativeRowIndex, relativeColumnIndex);
}
+ @Override
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
return null;
}
+ @Override
public TwoDEval getColumn(int columnIndex) {
return null;
}
+ @Override
public TwoDEval getRow(int rowIndex) {
return null;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java
index 02af969a2b..bbd6e56aad 100644
--- a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java
+++ b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java
@@ -196,14 +196,17 @@ public class TestWorkdayFunction {
return getRelativeValue(-1, relativeRowIndex, relativeColumnIndex);
}
+ @Override
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
return null;
}
+ @Override
public TwoDEval getColumn(int columnIndex) {
return null;
}
+ @Override
public TwoDEval getRow(int rowIndex) {
return null;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java b/src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java
index 30500b19a9..7a153e597d 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java
@@ -42,7 +42,8 @@ public final class TestExternalFunction extends TestCase {
//
}
- public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
+ @Override
+ public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
if (args.length != 1 || !(args[0] instanceof StringEval)) {
return ErrorEval.VALUE_INVALID;
}
@@ -56,7 +57,8 @@ public final class TestExternalFunction extends TestCase {
//
}
- public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
+ @Override
+ public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
if (args.length != 1 || !(args[0] instanceof StringEval)) {
return ErrorEval.VALUE_INVALID;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
index b1b66c00da..9db99b1e56 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
@@ -136,7 +136,8 @@ public final class TestMultiSheetEval extends TestCase {
}
- protected void setUp() {
+ @Override
+ protected void setUp() {
if (workbook == null) {
workbook = HSSFTestDataSamples.openSampleWorkbook(SS.FILENAME);
sheet = workbook.getSheet( SS.TEST_SHEET_NAME );
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
index 7493ffd087..6a64436604 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
@@ -75,10 +75,12 @@ public final class TestRangeEval extends TestCase {
public MockRefEval(int rowIndex, int columnIndex) {
super(-1, -1, rowIndex, columnIndex);
}
- public ValueEval getInnerValueEval(int sheetIndex) {
+ @Override
+ public ValueEval getInnerValueEval(int sheetIndex) {
throw new RuntimeException("not expected to be called during this test");
}
- public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx,
+ @Override
+ public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx,
int relLastColIx) {
AreaI area = new OffsetArea(getRow(), getColumn(),
relFirstRowIx, relLastRowIx, relFirstColIx, relLastColIx);
@@ -94,27 +96,32 @@ public final class TestRangeEval extends TestCase {
private MockAreaEval(int firstRow, int firstColumn, int lastRow, int lastColumn) {
super(firstRow, firstColumn, lastRow, lastColumn);
}
- public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
+ @Override
+ public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
throw new RuntimeException("not expected to be called during this test");
}
+ @Override
public ValueEval getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex) {
throw new RuntimeException("not expected to be called during this test");
}
- public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx,
+ @Override
+ public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx,
int relLastColIx) {
AreaI area = new OffsetArea(getFirstRow(), getFirstColumn(),
relFirstRowIx, relLastRowIx, relFirstColIx, relLastColIx);
return new MockAreaEval(area);
}
- public TwoDEval getRow(int rowIndex) {
+ @Override
+ public TwoDEval getRow(int rowIndex) {
if (rowIndex >= getHeight()) {
throw new IllegalArgumentException("Invalid rowIndex " + rowIndex
+ ". Allowable range is (0.." + getHeight() + ").");
}
return new MockAreaEval(rowIndex, getFirstColumn(), rowIndex, getLastColumn());
}
- public TwoDEval getColumn(int columnIndex) {
+ @Override
+ public TwoDEval getColumn(int columnIndex) {
if (columnIndex >= getWidth()) {
throw new IllegalArgumentException("Invalid columnIndex " + columnIndex
+ ". Allowable range is (0.." + getWidth() + ").");
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/forked/TestForkedEvaluator.java b/src/testcases/org/apache/poi/ss/formula/eval/forked/TestForkedEvaluator.java
index ea1f97b729..e00dbafd32 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/forked/TestForkedEvaluator.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/forked/TestForkedEvaluator.java
@@ -69,7 +69,8 @@ public class TestForkedEvaluator {
// The stability classifier is useful to reduce memory consumption of caching logic
IStabilityClassifier stabilityClassifier = new IStabilityClassifier() {
- public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
+ @Override
+ public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
return sheetIndex == 1;
}
};
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/AbstractNumericTestCase.java b/src/testcases/org/apache/poi/ss/formula/functions/AbstractNumericTestCase.java
index c5453ea39a..cc8b5c52d3 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/AbstractNumericTestCase.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/AbstractNumericTestCase.java
@@ -31,9 +31,11 @@ public abstract class AbstractNumericTestCase extends TestCase {
public static final double POS_ZERO = 1E-4;
public static final double DIFF_TOLERANCE_FACTOR = 1E-8;
+ @Override
public void setUp() {
}
+ @Override
public void tearDown() {
}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java b/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
index 4d755ebabd..dfe8e53e9a 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java
@@ -88,9 +88,11 @@ public final class EvalFactory {
super(firstRow, firstColumn, lastRow, lastColumn);
_values = values;
}
- public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
+ @Override
+ public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
return getRelativeValue(-1, relativeRowIndex, relativeColumnIndex);
}
+ @Override
public ValueEval getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex) {
if (relativeRowIndex < 0 || relativeRowIndex >=getHeight()) {
throw new IllegalArgumentException("row index out of range");
@@ -102,7 +104,8 @@ public final class EvalFactory {
int oneDimensionalIndex = relativeRowIndex * width + relativeColumnIndex;
return _values[oneDimensionalIndex];
}
- public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
+ @Override
+ public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
if (relFirstRowIx < 0 || relFirstColIx < 0
|| relLastRowIx >= getHeight() || relLastColIx >= getWidth()) {
throw new RuntimeException("Operation not implemented on this mock object");
@@ -133,7 +136,8 @@ public final class EvalFactory {
}
return result;
}
- public TwoDEval getRow(int rowIndex) {
+ @Override
+ public TwoDEval getRow(int rowIndex) {
if (rowIndex >= getHeight()) {
throw new IllegalArgumentException("Invalid rowIndex " + rowIndex
+ ". Allowable range is (0.." + getHeight() + ").");
@@ -144,7 +148,8 @@ public final class EvalFactory {
}
return new MockAreaEval(rowIndex, getFirstColumn(), rowIndex, getLastColumn(), values);
}
- public TwoDEval getColumn(int columnIndex) {
+ @Override
+ public TwoDEval getColumn(int columnIndex) {
if (columnIndex >= getWidth()) {
throw new IllegalArgumentException("Invalid columnIndex " + columnIndex
+ ". Allowable range is (0.." + getWidth() + ").");
@@ -167,10 +172,12 @@ public final class EvalFactory {
super(-1, -1, ptg.getRow(), ptg.getColumn());
_value = value;
}
- public ValueEval getInnerValueEval(int sheetIndex) {
+ @Override
+ public ValueEval getInnerValueEval(int sheetIndex) {
return _value;
}
- public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
+ @Override
+ public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {
throw new RuntimeException("Operation not implemented on this mock object");
}
}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java b/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java
index 0f3fff9a98..134975e209 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java
@@ -92,6 +92,7 @@ public final class TestBin2Dec extends TestCase {
HSSFEvaluationWorkbook workbook = HSSFEvaluationWorkbook.create(wb);
WorkbookEvaluator workbookEvaluator = new WorkbookEvaluator(workbook, new IStabilityClassifier() {
+ @Override
public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
return true;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java b/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
index 337ad8518f..c7c33ad9b2 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
@@ -35,6 +35,7 @@ public final class TestCalendarFieldFunction extends TestCase {
private HSSFCell cell11;
private HSSFFormulaEvaluator evaluator;
+ @Override
public void setUp() {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java b/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
index 0051f72e7c..45241f6afc 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
@@ -35,6 +35,7 @@ public final class TestDate extends TestCase {
private HSSFCell cell11;
private HSSFFormulaEvaluator evaluator;
+ @Override
public void setUp() {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java b/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java
index 0000b64b28..c12dbe9e02 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java
@@ -112,6 +112,7 @@ public final class TestDec2Bin extends TestCase {
HSSFEvaluationWorkbook workbook = HSSFEvaluationWorkbook.create(wb);
WorkbookEvaluator workbookEvaluator = new WorkbookEvaluator(workbook, new IStabilityClassifier() {
+ @Override
public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
return true;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java b/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
index e9b6c44e6a..6084d652d8 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
@@ -137,6 +137,7 @@ public final class TestDec2Hex extends TestCase {
HSSFEvaluationWorkbook workbook = HSSFEvaluationWorkbook.create(wb);
WorkbookEvaluator workbookEvaluator = new WorkbookEvaluator(workbook, new IStabilityClassifier() {
+ @Override
public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
return true;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java b/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java
index a3b971a357..b1bcb2f857 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java
@@ -90,6 +90,7 @@ public final class TestHex2Dec extends TestCase {
HSSFEvaluationWorkbook workbook = HSSFEvaluationWorkbook.create(wb);
WorkbookEvaluator workbookEvaluator = new WorkbookEvaluator(workbook, new IStabilityClassifier() {
+ @Override
public boolean isCellFinal(int sheetIndex, int rowIndex, int columnIndex) {
return true;
}
diff --git a/src/testcases/org/apache/poi/ss/formula/udf/BaseTestUDFFinder.java b/src/testcases/org/apache/poi/ss/formula/udf/BaseTestUDFFinder.java
index 32d7202d94..ab3aa987c7 100644
--- a/src/testcases/org/apache/poi/ss/formula/udf/BaseTestUDFFinder.java
+++ b/src/testcases/org/apache/poi/ss/formula/udf/BaseTestUDFFinder.java
@@ -26,6 +26,7 @@ public class BaseTestUDFFinder {
protected UDFFinder _instance;
protected static final FreeRefFunction NotImplemented = new FreeRefFunction() {
+ @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
throw new RuntimeException("not implemented");
}
diff --git a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
index 91c204da32..29bc3cd8a7 100644
--- a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
+++ b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
@@ -217,6 +217,7 @@ public class BaseTestCellUtil {
* @throws IOException
*
*/
+ @Deprecated
@SuppressWarnings("deprecated")
@Test
public void setAlignment() throws IOException {
@@ -369,6 +370,7 @@ public class BaseTestCellUtil {
* @deprecated Replaced by {@link #setFillForegroundColorBeforeFillBackgroundColorEnum()}
* @since POI 3.15 beta 3
*/
+ @Deprecated
// bug 55555
@Test
public void setFillForegroundColorBeforeFillBackgroundColor() throws IOException {
diff --git a/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java b/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java
index 471f36e7ec..3664aec712 100644
--- a/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java
+++ b/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java
@@ -57,7 +57,8 @@ public class TestCellWalk extends TestCase {
private int cellsVisited = 0;
private long ordinalNumberSum = 0L;
- public void onCell(Cell cell, CellWalkContext ctx) {
+ @Override
+ public void onCell(Cell cell, CellWalkContext ctx) {
++cellsVisited;
ordinalNumberSum += ctx.getOrdinalNumber();
}
diff --git a/src/testcases/org/apache/poi/util/LocalTestNode.java b/src/testcases/org/apache/poi/util/LocalTestNode.java
index 6eaaed5901..fd56c143cd 100644
--- a/src/testcases/org/apache/poi/util/LocalTestNode.java
+++ b/src/testcases/org/apache/poi/util/LocalTestNode.java
@@ -78,6 +78,7 @@ class LocalTestNode
* @param o
*/
+ @Override
public int compareTo(Object o)
{
LocalTestNode other = ( LocalTestNode ) o;
@@ -98,6 +99,7 @@ class LocalTestNode
* @return true if equal
*/
+ @Override
public boolean equals(Object o)
{
if (o == null)
@@ -117,6 +119,7 @@ class LocalTestNode
/**
* @return hash code
*/
+ @Override
public int hashCode()
{
return getKey().hashCode() ^ getValue().hashCode();