aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2014-12-28 09:06:12 +0000
committerDominik Stadler <centic@apache.org>2014-12-28 09:06:12 +0000
commitca12a2116332340fc4c268f5ec1f87808e4e07d7 (patch)
tree41e4542f85879bf5475ac6d5d6bbd3567c2fe75c /src/testcases/org/apache/poi/hssf
parent29f23904bb408061a23366086b5ba3a50cece897 (diff)
downloadpoi-ca12a2116332340fc4c268f5ec1f87808e4e07d7.tar.gz
poi-ca12a2116332340fc4c268f5ec1f87808e4e07d7.zip
Fix Eclipse warnings, unnecessary casts, use generics, static access...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648156 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java7
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java b/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
index 1d71ca5c6f..b3bfc534ed 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
@@ -45,6 +45,9 @@ import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.DataValidation.ErrorStyle;
+import org.apache.poi.ss.usermodel.DataValidationConstraint.OperatorType;
import org.apache.poi.ss.util.CellRangeAddressList;
/**
@@ -149,11 +152,11 @@ public final class TestDataValidation extends BaseTestDataValidation {
int dvRow = 0;
Sheet sheet = wb.getSheetAt(0);
DataValidationHelper dataValidationHelper = sheet.getDataValidationHelper();
- DataValidationConstraint dc = dataValidationHelper.createIntegerConstraint(OP.EQUAL, "42", null);
+ DataValidationConstraint dc = dataValidationHelper.createIntegerConstraint(OperatorType.EQUAL, "42", null);
DataValidation dv = dataValidationHelper.createValidation(dc,new CellRangeAddressList(dvRow, dvRow, 0, 0));
dv.setEmptyCellAllowed(false);
- dv.setErrorStyle(ES.STOP);
+ dv.setErrorStyle(ErrorStyle.STOP);
dv.setShowPromptBox(true);
dv.createErrorBox("Xxx", "Yyy");
dv.setSuppressDropDownArrow(true);
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
index c9ce13fca3..7fdb4bd752 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
@@ -31,6 +31,7 @@ import org.apache.poi.hssf.record.LabelSSTRecord;
import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.Region;
import org.apache.poi.util.TempFile;
@@ -395,7 +396,7 @@ public final class TestWorkbook extends TestCase {
HSSFCell c = s.getRow(0).getCell(0);
int a = c.getCellType();
- assertEquals(a, c.CELL_TYPE_NUMERIC);
+ assertEquals(a, Cell.CELL_TYPE_NUMERIC);
}
/**