mirror of https://github.com/apache/poi.git
bug 59873: add @Internal and @Deprecated decorators to HyperlinkType enum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753062 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0b38d2c11
commit
5d0b2fa59f
|
@ -49,7 +49,23 @@ public enum HyperlinkType {
|
|||
*/
|
||||
FILE(4);
|
||||
|
||||
|
||||
/** @deprecated POI 3.15 beta 3 */
|
||||
@Internal(since="3.15 beta 3")
|
||||
@Deprecated
|
||||
private final int code;
|
||||
|
||||
/**
|
||||
* The codes don't have any real meaning.
|
||||
* There bytes that are read in and written out from HSSF, HSLF, XSSF, and XSLF are different
|
||||
* that the codes here.
|
||||
* These codes only exist to assist in transitioning from using ints to enums.
|
||||
*
|
||||
* @param code
|
||||
* @deprecated POI 3.15 beta 3
|
||||
*/
|
||||
@Internal(since="3.15 beta 3")
|
||||
@Deprecated
|
||||
private HyperlinkType(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
@ -61,10 +77,26 @@ public enum HyperlinkType {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated POI 3.15 beta 3
|
||||
*
|
||||
* @return the old integer code for a HyperlinkType enum
|
||||
*/
|
||||
@Internal(since="3.15 beta 3")
|
||||
@Deprecated
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated POI 3.15 beta 3
|
||||
*
|
||||
* @param code the old integer code
|
||||
* @return the corresponding HyperlinkEnum, if it exists
|
||||
* @throws IllegalArgumentException if {@code code} is not a valid HyperlinkType.
|
||||
*/
|
||||
@Internal(since="3.15 beta 3")
|
||||
@Deprecated
|
||||
public static HyperlinkType forInt(int code) {
|
||||
HyperlinkType type = map.get(code);
|
||||
if (type == null) {
|
||||
|
|
|
@ -213,7 +213,9 @@ public class BaseTestCellUtil {
|
|||
* @deprecated by {@link #setAlignmentEnum()}
|
||||
*
|
||||
* @throws IOException
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecated")
|
||||
@Test
|
||||
public void setAlignment() throws IOException {
|
||||
Workbook wb = _testDataProvider.createWorkbook();
|
||||
|
|
Loading…
Reference in New Issue