Browse Source

remove some deprecated code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884158 13f79535-47bb-0310-9956-ffa450edef68
tags/before_ooxml_3rd_edition
PJ Fanning 3 years ago
parent
commit
373b2d1fa5

+ 0
- 1
src/java/org/apache/poi/common/usermodel/Hyperlink.java View File

@@ -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();
}

+ 1
- 29
src/java/org/apache/poi/common/usermodel/HyperlinkType.java View File

@@ -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;
}
}

+ 0
- 1
src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java View File

@@ -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() {

+ 0
- 1
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java View File

@@ -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() {

Loading…
Cancel
Save