aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-12-06 16:53:14 +0000
committerPJ Fanning <fanningpj@apache.org>2020-12-06 16:53:14 +0000
commit373b2d1fa52d6b57f5e3e46acb1f798f33263c52 (patch)
treeb9e75c3f1a75c93eeb317cdf9a65cd53afc7dc5a /src
parentbb52df5d007b8585be518522bd4b55feb106639f (diff)
downloadpoi-373b2d1fa52d6b57f5e3e46acb1f798f33263c52.tar.gz
poi-373b2d1fa52d6b57f5e3e46acb1f798f33263c52.zip
remove some deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884158 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/common/usermodel/Hyperlink.java1
-rw-r--r--src/java/org/apache/poi/common/usermodel/HyperlinkType.java30
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java1
4 files changed, 1 insertions, 32 deletions
diff --git a/src/java/org/apache/poi/common/usermodel/Hyperlink.java b/src/java/org/apache/poi/common/usermodel/Hyperlink.java
index d7a24a3711..0673ab3950 100644
--- a/src/java/org/apache/poi/common/usermodel/Hyperlink.java
+++ b/src/java/org/apache/poi/common/usermodel/Hyperlink.java
@@ -55,7 +55,6 @@ public interface Hyperlink {
* Return the type of this hyperlink
*
* @return the type of this hyperlink
- * @see HyperlinkType#forInt(int)
*/
public HyperlinkType getType();
}
diff --git a/src/java/org/apache/poi/common/usermodel/HyperlinkType.java b/src/java/org/apache/poi/common/usermodel/HyperlinkType.java
index af86c3e824..74fa7b6e5f 100644
--- a/src/java/org/apache/poi/common/usermodel/HyperlinkType.java
+++ b/src/java/org/apache/poi/common/usermodel/HyperlinkType.java
@@ -16,9 +16,6 @@
==================================================================== */
package org.apache.poi.common.usermodel;
-import java.util.HashMap;
-import java.util.Map;
-
import org.apache.poi.util.Internal;
/**
@@ -70,38 +67,13 @@ public enum HyperlinkType {
this.code = code;
}
- private static final Map<Integer, HyperlinkType> map = new HashMap<>();
- static {
- for (HyperlinkType type : values()) {
- map.put(type.getCode(), type);
- }
- }
-
/**
* @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() {
+ 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) {
- throw new IllegalArgumentException("Invalid type: " + code);
- }
- return type;
- }
}
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
index 358c72807f..1b51235bc8 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
@@ -257,7 +257,6 @@ public class HSSFHyperlink implements Hyperlink {
* Return the type of this hyperlink
*
* @return the type of this hyperlink
- * @see HyperlinkType#forInt
*/
@Override
public HyperlinkType getType() {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
index f5dddf607b..1d13e688c5 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
@@ -155,7 +155,6 @@ public class XSSFHyperlink implements Hyperlink {
* Return the type of this hyperlink
*
* @return the type of this hyperlink
- * @see HyperlinkType#forInt
*/
@Override
public HyperlinkType getType() {