bug 59790: add @Removal annotations to deprecated methods

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760624 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-09-14 03:51:45 +00:00
parent f09c49e7ef
commit a41058d6c7
3 changed files with 11 additions and 3 deletions

View File

@ -17,8 +17,6 @@
package org.apache.poi.hssf.model; package org.apache.poi.hssf.model;
import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.util.Internal;
import org.apache.poi.hssf.usermodel.HSSFEvaluationWorkbook; import org.apache.poi.hssf.usermodel.HSSFEvaluationWorkbook;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.formula.FormulaParseException; import org.apache.poi.ss.formula.FormulaParseException;
@ -26,6 +24,9 @@ import org.apache.poi.ss.formula.FormulaParser;
import org.apache.poi.ss.formula.FormulaParsingWorkbook; import org.apache.poi.ss.formula.FormulaParsingWorkbook;
import org.apache.poi.ss.formula.FormulaRenderer; import org.apache.poi.ss.formula.FormulaRenderer;
import org.apache.poi.ss.formula.FormulaType; import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
/** /**
* HSSF wrapper for the {@link FormulaParser} and {@link FormulaRenderer} * HSSF wrapper for the {@link FormulaParser} and {@link FormulaRenderer}
@ -61,6 +62,7 @@ public final class HSSFFormulaParser {
* *
* @deprecated POI 3.15 beta 3. Use {@link #parse(String, HSSFWorkbook, FormulaType)} instead. * @deprecated POI 3.15 beta 3. Use {@link #parse(String, HSSFWorkbook, FormulaType)} instead.
*/ */
@Removal(version="3.17")
public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType) throws FormulaParseException { public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType) throws FormulaParseException {
return parse(formula, workbook, FormulaType.forInt(formulaType)); return parse(formula, workbook, FormulaType.forInt(formulaType));
} }
@ -87,6 +89,7 @@ public final class HSSFFormulaParser {
* @throws FormulaParseException if the formula has incorrect syntax or is otherwise invalid * @throws FormulaParseException if the formula has incorrect syntax or is otherwise invalid
* @deprecated POI 3.15 beta 3. Use {@link #parse(String, HSSFWorkbook, FormulaType, int)} instead. * @deprecated POI 3.15 beta 3. Use {@link #parse(String, HSSFWorkbook, FormulaType, int)} instead.
*/ */
@Removal(version="3.17")
public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType, int sheetIndex) throws FormulaParseException { public static Ptg[] parse(String formula, HSSFWorkbook workbook, int formulaType, int sheetIndex) throws FormulaParseException {
return parse(formula, workbook, FormulaType.forInt(formulaType), sheetIndex); return parse(formula, workbook, FormulaType.forInt(formulaType), sheetIndex);
} }

View File

@ -35,6 +35,7 @@ import org.apache.poi.ss.usermodel.CellValue;
import org.apache.poi.ss.usermodel.FormulaEvaluator; import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
/** /**
* Evaluates formula cells.<p/> * Evaluates formula cells.<p/>

View File

@ -28,6 +28,7 @@ import org.apache.poi.ss.formula.ptg.Ptg;
import org.apache.poi.ss.formula.ptg.RangePtg; import org.apache.poi.ss.formula.ptg.RangePtg;
import org.apache.poi.ss.formula.ptg.UnionPtg; import org.apache.poi.ss.formula.ptg.UnionPtg;
import org.apache.poi.ss.formula.ptg.ValueOperatorPtg; import org.apache.poi.ss.formula.ptg.ValueOperatorPtg;
import org.apache.poi.util.Removal;
/** /**
* This class performs 'operand class' transformation. Non-base tokens are classified into three * This class performs 'operand class' transformation. Non-base tokens are classified into three
@ -59,7 +60,10 @@ final class OperandClassTransformer {
private final FormulaType _formulaType; private final FormulaType _formulaType;
/** @deprecated POI 3.15 beta 3. */ /**
* @deprecated POI 3.15 beta 3. Use {@code OperandClassTransformer(FormulaType)} instead.
*/
@Removal(version="3.17")
public OperandClassTransformer(int formulaType) { public OperandClassTransformer(int formulaType) {
this(FormulaType.forInt(formulaType)); this(FormulaType.forInt(formulaType));
} }