You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2020/06/27 12:47:17 UTC
svn commit: r1879266 - in /poi/trunk/src:
java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/usermodel/
ooxml/java/org/apache/poi/xssf/streaming/
ooxml/java/org/apache/poi/xssf/usermodel/
ooxml/testcases/org/apache/poi/xssf/streaming/
Author: fanningpj
Date: Sat Jun 27 12:47:17 2020
New Revision: 1879266
URL: http://svn.apache.org/viewvc?rev=1879266&view=rev
Log:
remove some deprecated methods from Cell
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/CellBase.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java Sat Jun 27 12:47:17 2020
@@ -652,6 +652,7 @@ public class HSSFCell extends CellBase {
+ " " + (isFormulaCell ? "formula " : "") + "cell";
return new IllegalStateException(msg);
}
+
private static void checkFormulaCachedValueType(CellType expectedTypeCode, FormulaRecord fr) {
CellType cachedValueType = fr.getCachedResultTypeEnum();
if (cachedValueType != expectedTypeCode) {
@@ -1178,22 +1179,6 @@ public class HSSFCell extends CellBase {
return ((FormulaRecordAggregate)_record).getFormulaRecord().getCachedResultTypeEnum();
}
- /**
- * Only valid for formula cells
- * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
- * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
- * on the cached value of the formula
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCachedFormulaResultType</code>
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version="4.2")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
-
void setCellArrayFormula(CellRangeAddress range) {
int row = _record.getRow();
short col = _record.getColumn();
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java Sat Jun 27 12:47:17 2020
@@ -113,24 +113,6 @@ public interface Cell {
CellType getCellType();
/**
- * Return the cell type. Tables in an array formula return
- * {@link CellType#FORMULA} for all cells, even though the formula is only defined
- * in the OOXML file for the top left cell of the array.
- * <p>
- * NOTE: POI does not support data table formulas.
- * Cells in a data table appear to POI as plain cells typed from their cached value.
- *
- * @return the cell type
- * @since POI 3.15 beta 3
- * @deprecated will be removed in 4.2
- * Use <code>getCellType()</code>
- * Was renamed to <code>getCellType()</code> when we made the CellType enum transition in POI 4.0. See bug 59791.
- */
- @Deprecated
- @Removal(version="4.2")
- CellType getCellTypeEnum();
-
- /**
* Only valid for formula cells
*
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
@@ -140,19 +122,6 @@ public interface Cell {
CellType getCachedFormulaResultType();
/**
- * Only valid for formula cells
- * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
- * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
- * on the cached value of the formula
- * @since POI 3.15 beta 3
- * @deprecated will be removed in 4.2
- * Will be renamed to <code>getCachedFormulaResultType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- CellType getCachedFormulaResultTypeEnum();
-
- /**
* Set a numeric value for the cell.
*
* @param value the numeric value to set this cell to. For formulas we'll set the
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/CellBase.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/CellBase.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/CellBase.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/CellBase.java Sat Jun 27 12:47:17 2020
@@ -127,16 +127,6 @@ public abstract class CellBase implement
}
/**
- * {@inheritDoc}
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public final CellType getCellTypeEnum() {
- return getCellType();
- }
-
- /**
* Implementation-specific setting the formula. Formula is not null.
* Shall not change the value.
* @param formula
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java Sat Jun 27 12:47:17 2020
@@ -150,21 +150,6 @@ public class SXSSFCell extends CellBase
}
/**
- * Only valid for formula cells
- * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
- * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
- * on the cached value of the formula
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCachedFormulaResultType</code> instead
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
-
- /**
* {@inheritDoc}
*/
@Override
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Sat Jun 27 12:47:17 2020
@@ -697,22 +697,6 @@ public final class XSSFCell extends Cell
return getBaseCellType(false);
}
-
- /**
- * Only valid for formula cells
- * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
- * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
- * on the cached value of the formula
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCachedFormulaResultType</code> instead
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
/**
* Detect cell type based on the "t" attribute of the CTCell bean
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java?rev=1879266&r1=1879265&r2=1879266&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java Sat Jun 27 12:47:17 2020
@@ -95,23 +95,6 @@ public class TestSXSSFCell extends BaseT
}
}
- @Test
- public void getCellTypeEnumDelegatesToGetCellType() {
- SXSSFCell instance = spy(new SXSSFCell(null, CellType.BLANK));
- CellType result = instance.getCellType();
- verify(instance).getCellType();
- assertEquals(CellType.BLANK, result);
- }
-
- @Test
- public void getCachedFormulaResultTypeEnum_delegatesTo_getCachedFormulaResultType() {
- SXSSFCell instance = spy(new SXSSFCell(null, CellType.BLANK));
- instance.setCellFormula("");
- //noinspection deprecation
- instance.getCachedFormulaResultTypeEnum();
- verify(instance).getCachedFormulaResultType();
- }
-
@Test(expected = IllegalStateException.class)
public void getCachedFormulaResultType_throwsISE_whenNotAFormulaCell() {
SXSSFCell instance = new SXSSFCell(null, CellType.BLANK);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org