Author: onealj Date: Sun Jul 17 11:56:13 2016 New Revision: 1753062 URL: http://svn.apache.org/viewvc?rev=1753062&view=rev Log: bug 59873: add @Internal and @Deprecated decorators to HyperlinkType enum
Modified: poi/trunk/src/java/org/apache/poi/common/usermodel/HyperlinkType.java poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java Modified: poi/trunk/src/java/org/apache/poi/common/usermodel/HyperlinkType.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/common/usermodel/HyperlinkType.java?rev=1753062&r1=1753061&r2=1753062&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/common/usermodel/HyperlinkType.java (original) +++ poi/trunk/src/java/org/apache/poi/common/usermodel/HyperlinkType.java Sun Jul 17 11:56:13 2016 @@ -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) { Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java?rev=1753062&r1=1753061&r2=1753062&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java Sun Jul 17 11:56:13 2016 @@ -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(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org