Add reason message to @SuppressForbidden
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ccce28aae4
commit
66ce32aee1
@ -29,7 +29,7 @@ import java.util.Properties;
|
||||
@SuppressWarnings("deprecation")
|
||||
public class FontMetricsDumper
|
||||
{
|
||||
@SuppressForbidden
|
||||
@SuppressForbidden("command line tool")
|
||||
public static void main( String[] args ) throws IOException
|
||||
{
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class LocaleUtil {
|
||||
|
||||
private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<TimeZone>() {
|
||||
@Override
|
||||
@SuppressForbidden
|
||||
@SuppressForbidden("implementation around default locales in POI")
|
||||
protected TimeZone initialValue() {
|
||||
return TimeZone.getDefault();
|
||||
}
|
||||
@ -58,7 +58,7 @@ public class LocaleUtil {
|
||||
|
||||
private static final ThreadLocal<Locale> userLocale = new ThreadLocal<Locale>() {
|
||||
@Override
|
||||
@SuppressForbidden
|
||||
@SuppressForbidden("implementation around default locales in POI")
|
||||
protected Locale initialValue() {
|
||||
return Locale.getDefault();
|
||||
}
|
||||
|
@ -22,11 +22,12 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Marking class for elements to be ignored by the forbidden apis check
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
public @interface SuppressForbidden {
|
||||
|
||||
/** A reason for suppressing should always be given. */
|
||||
String value() default "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user