diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index 10734219a6..b1cf8a4845 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -418,18 +418,6 @@ public class HSSFCell extends CellBase { { return _cellType; } - - /** - * get the cells type (numeric, formula or string) - * @since POI 3.15 beta 3 - */ - @Deprecated - @Removal(version = "4.2") - @Override - public CellType getCellTypeEnum() - { - return getCellType(); - } /** * set a numeric value for the cell diff --git a/src/java/org/apache/poi/ss/usermodel/Cell.java b/src/java/org/apache/poi/ss/usermodel/Cell.java index 4f344ba8e9..533f21a92f 100644 --- a/src/java/org/apache/poi/ss/usermodel/Cell.java +++ b/src/java/org/apache/poi/ss/usermodel/Cell.java @@ -111,10 +111,16 @@ public interface Cell { CellType getCellType(); /** - * Return the cell type. + * 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. + *
+ * 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
* Will be renamed to getCellType() when we make the CellType enum transition in POI 4.0. See bug 59791.
*/
@Deprecated
diff --git a/src/java/org/apache/poi/ss/usermodel/CellBase.java b/src/java/org/apache/poi/ss/usermodel/CellBase.java
index 14d0555f80..46fa21f3f4 100644
--- a/src/java/org/apache/poi/ss/usermodel/CellBase.java
+++ b/src/java/org/apache/poi/ss/usermodel/CellBase.java
@@ -21,6 +21,7 @@ import org.apache.poi.ss.formula.FormulaParseException;
import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.util.Removal;
/**
* Common implementation-independent logic shared by all implementations of {@link Cell}.
@@ -125,6 +126,16 @@ public abstract class CellBase implements Cell {
setCellFormulaImpl(formula);
}
+ /**
+ * {@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.
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
index 54b8236f72..be01f3ef54 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
@@ -128,21 +128,6 @@ public class SXSSFCell extends CellBase {
return _value.getType();
}
- /**
- * Return the cell type.
- *
- * @return the cell type
- * @since POI 3.15 beta 3
- * @deprecated use getCellType instead
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCellTypeEnum()
- {
- return getCellType();
- }
-
/**
* Only valid for formula cells
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
index f49121982d..42c34da85a 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
@@ -712,25 +712,6 @@ public final class XSSFCell extends CellBase {
return getBaseCellType(true);
}
- /**
- * 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.
- *
- * 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 use getCellType instead
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCellTypeEnum() {
- return getCellType();
- }
-
/**
* Only valid for formula cells
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},