From f71ae8036d555757eb397de5452f86c79a1e6501 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Wed, 14 Sep 2016 06:42:20 +0000 Subject: [PATCH] bug 59791: add deprecation and removal annotations git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760641 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/usermodel/HSSFCell.java | 4 ++-- .../org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java | 4 ++-- .../apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java | 2 -- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java | 3 ++- .../org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index 44427fce7..cfe998e05 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -446,6 +446,7 @@ public class HSSFCell implements Cell { * * Will return {@link CellType} in a future version of POI. * For forwards compatibility, do not hard-code cell type literals in your code. + * @deprecated 3.15. Will be return a {@link CellType} enum in the future. */ @Override public int getCellType() @@ -459,7 +460,6 @@ public class HSSFCell implements Cell { * @deprecated POI 3.15 beta 3 * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCellTypeEnum() { @@ -1154,6 +1154,7 @@ public class HSSFCell implements Cell { * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * on the cached value of the formula + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCachedFormulaResultType() { @@ -1169,7 +1170,6 @@ public class HSSFCell implements Cell { * @deprecated POI 3.15 beta 3 * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCachedFormulaResultTypeEnum() { if (_cellType != CellType.FORMULA) { diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java index b524cc149..1771b2e35 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java @@ -55,6 +55,7 @@ final class HSSFEvaluationCell implements EvaluationCell { * For forwards compatibility, do not hard-code cell type literals in your code. * * @return cell type + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCellType() { @@ -65,7 +66,6 @@ final class HSSFEvaluationCell implements EvaluationCell { * @deprecated POI 3.15 beta 3. * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCellTypeEnum() { return _cell.getCellTypeEnum(); @@ -99,6 +99,7 @@ final class HSSFEvaluationCell implements EvaluationCell { * For forwards compatibility, do not hard-code cell type literals in your code. * * @return cell type of cached formula result + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCachedFormulaResultType() { @@ -109,7 +110,6 @@ final class HSSFEvaluationCell implements EvaluationCell { * @deprecated POI 3.15 beta 3. * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCachedFormulaResultTypeEnum() { return _cell.getCachedFormulaResultTypeEnum(); diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java index 726ae87e4..e5bd1a27c 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java @@ -28,7 +28,6 @@ import org.apache.poi.ss.formula.eval.ValueEval; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellValue; -import org.apache.poi.util.Internal; /** * Internal POI use only - parent of XSSF and SXSSF formula evaluators @@ -69,7 +68,6 @@ public abstract class BaseXSSFFormulaEvaluator extends BaseFormulaEvaluator { * @since POI 3.15 beta 3 * @deprecated POI 3.15 beta 3. Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") public CellType evaluateFormulaCellEnum(Cell cell) { if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) { return CellType._NONE; 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 4aa2f037e..7d2d6d25b 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java @@ -668,6 +668,7 @@ public final class XSSFCell implements Cell { * For forwards compatibility, do not hard-code cell type literals in your code. * * @return the cell type + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCellType() { @@ -699,6 +700,7 @@ public final class XSSFCell implements Cell { * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * on the cached value of the formula + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCachedFormulaResultType() { @@ -714,7 +716,6 @@ public final class XSSFCell implements Cell { * @deprecated POI 3.15 beta 3 * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCachedFormulaResultTypeEnum() { if (! isFormulaCell()) { diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java index e85b58017..129052e79 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java @@ -58,6 +58,7 @@ final class XSSFEvaluationCell implements EvaluationCell { * For forwards compatibility, do not hard-code cell type literals in your code. * * @return cell type + * @deprecated 3.15. Will return a {@link CellType} enum in the future. */ @Override public int getCellType() { @@ -68,7 +69,6 @@ final class XSSFEvaluationCell implements EvaluationCell { * @deprecated POI 3.15 beta 3. * Will be deleted when we make the CellType enum transition. See bug 59791. */ - @Internal(since="POI 3.15 beta 3") @Override public CellType getCellTypeEnum() { return _cell.getCellTypeEnum();