]> source.dussan.org Git - poi.git/commitdiff
bug 59791: add deprecation warnings
authorJaven O'Neal <onealj@apache.org>
Wed, 14 Sep 2016 06:22:38 +0000 (06:22 +0000)
committerJaven O'Neal <onealj@apache.org>
Wed, 14 Sep 2016 06:22:38 +0000 (06:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760639 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java
src/java/org/apache/poi/ss/formula/EvaluationCell.java
src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
src/java/org/apache/poi/ss/usermodel/Cell.java
src/java/org/apache/poi/ss/usermodel/CreationHelper.java

index b432287401f9332ce75363b49bc68a077d3cae91..7154d7450411fc7904e4d0c73bd30edae0dead8f 100644 (file)
@@ -155,7 +155,6 @@ public class HSSFFormulaEvaluator 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
     @Override
     public CellType evaluateFormulaCellEnum(Cell cell) {
         if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
index fb0c4d68dee48a5d5aa2ba952b88aa68502ec748..7c459abb45c8273a9ed2e7b34a8b3bef71a4a9b2 100644 (file)
@@ -125,6 +125,7 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
      * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
      * @param cell The cell to evaluate
      * @return -1 for non-formula cells, or the type of the <em>formula result</em>
+     * @deprecated 3.15. Will return a {@link CellType} enum in the future.
      */
     @Override
     public int evaluateFormulaCell(Cell cell) {
index 3695fe28020409f2d3e4b2152f55d6d39a0792b2..a7e855c443d248c52e56aafcdb1708ee7d5696ab 100644 (file)
@@ -42,6 +42,7 @@ public interface 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.
         */
        int getCellType();
        /**
@@ -61,6 +62,7 @@ public interface 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.
         */
        int getCachedFormulaResultType();
        /**
index 0521e0889e9f0bee3d6e2e7b4804022a857530cf..db01b06403358dba0608f411d86f73e4d5154612 100644 (file)
@@ -108,6 +108,7 @@ final class ForkedEvaluationCell 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() {
@@ -118,7 +119,6 @@ final class ForkedEvaluationCell 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 _cellType;
@@ -160,6 +160,7 @@ final class ForkedEvaluationCell 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() {
@@ -170,7 +171,6 @@ final class ForkedEvaluationCell 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 _masterCell.getCachedFormulaResultTypeEnum();
index 48b74789a36460a6f00522074305d3d29e4f49a3..13d8608230a0351d652229fe2de32178d9926940 100644 (file)
@@ -167,6 +167,7 @@ public interface Cell {
      * For forwards compatibility, do not hard-code cell type literals in your code.
      *
      * @return the cell type
+     * @deprecated POI 3.15. Will return a {@link CellType} enum in the future.
      */
     int getCellType();
     
@@ -178,7 +179,6 @@ public interface Cell {
      * @deprecated POI 3.15 beta 3
      * Will be renamed to <code>getCellType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
      */
-    @Internal(since="POI 3.15 beta 3")
     @Removal(version="4.2")
     CellType getCellTypeEnum();
     
@@ -191,6 +191,7 @@ public interface 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.
      */
     int getCachedFormulaResultType();
 
@@ -203,7 +204,6 @@ public interface Cell {
      * @deprecated POI 3.15 beta 3
      * Will be renamed to <code>getCachedFormulaResultType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
      */
-    @Internal(since="POI 3.15 beta 3")
     CellType getCachedFormulaResultTypeEnum();
 
     /**
index 25e1cdaae8476e4e979d02b5d71a4ad4f0ca8e4a..53462c1d4e57b8b484d49ad089e9f167a94503d9 100644 (file)
 package org.apache.poi.ss.usermodel;
 
 import org.apache.poi.common.usermodel.HyperlinkType;
+import org.apache.poi.util.Removal;
 
 /**
  * An object that handles instantiating concrete
  *  classes of the various instances one needs for
  *  HSSF and XSSF.
- * Works around a major shortcoming in Java, where we
- *  can't have static methods on interfaces or abstract
+ * Works around a limitation in Java where we
+ *  cannot have static methods on interfaces or abstract
  *  classes.
  * This allows you to get the appropriate class for
  *  a given interface, without you having to worry
- *  about if you're dealing with HSSF or XSSF, despite
- *  Java being quite rubbish.
+ *  about if you're dealing with HSSF or XSSF.
  */
 public interface CreationHelper {
     /**
@@ -46,6 +46,7 @@ public interface CreationHelper {
      * Creates a new Hyperlink, of the given type
      * @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
      */
+    @Removal(version="3.17")
     @Deprecated
     Hyperlink createHyperlink(int type);