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:
Uwe Schindler 2015-11-08 23:44:24 +00:00
parent ccce28aae4
commit 66ce32aee1
3 changed files with 6 additions and 5 deletions

View File

@ -29,7 +29,7 @@ import java.util.Properties;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class FontMetricsDumper public class FontMetricsDumper
{ {
@SuppressForbidden @SuppressForbidden("command line tool")
public static void main( String[] args ) throws IOException public static void main( String[] args ) throws IOException
{ {

View File

@ -50,7 +50,7 @@ public class LocaleUtil {
private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<TimeZone>() { private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<TimeZone>() {
@Override @Override
@SuppressForbidden @SuppressForbidden("implementation around default locales in POI")
protected TimeZone initialValue() { protected TimeZone initialValue() {
return TimeZone.getDefault(); return TimeZone.getDefault();
} }
@ -58,7 +58,7 @@ public class LocaleUtil {
private static final ThreadLocal<Locale> userLocale = new ThreadLocal<Locale>() { private static final ThreadLocal<Locale> userLocale = new ThreadLocal<Locale>() {
@Override @Override
@SuppressForbidden @SuppressForbidden("implementation around default locales in POI")
protected Locale initialValue() { protected Locale initialValue() {
return Locale.getDefault(); return Locale.getDefault();
} }

View File

@ -22,11 +22,12 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/* /**
* Marking class for elements to be ignored by the forbidden apis check * Marking class for elements to be ignored by the forbidden apis check
*/ */
@Retention(RetentionPolicy.CLASS) @Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.TYPE}) @Target({ElementType.METHOD, ElementType.TYPE})
public @interface SuppressForbidden { public @interface SuppressForbidden {
/** A reason for suppressing should always be given. */
String value() default "";
} }