diff --git a/src/java/org/apache/poi/util/FontMetricsDumper.java b/src/java/org/apache/poi/util/FontMetricsDumper.java index 96676954a..10818c1ad 100644 --- a/src/java/org/apache/poi/util/FontMetricsDumper.java +++ b/src/java/org/apache/poi/util/FontMetricsDumper.java @@ -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 { diff --git a/src/java/org/apache/poi/util/LocaleUtil.java b/src/java/org/apache/poi/util/LocaleUtil.java index d402be58c..d7b4fcba5 100644 --- a/src/java/org/apache/poi/util/LocaleUtil.java +++ b/src/java/org/apache/poi/util/LocaleUtil.java @@ -50,7 +50,7 @@ public class LocaleUtil { private static final ThreadLocal userTimeZone = new ThreadLocal() { @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 userLocale = new ThreadLocal() { @Override - @SuppressForbidden + @SuppressForbidden("implementation around default locales in POI") protected Locale initialValue() { return Locale.getDefault(); } diff --git a/src/java/org/apache/poi/util/SuppressForbidden.java b/src/java/org/apache/poi/util/SuppressForbidden.java index 81891e0c6..c2b765704 100644 --- a/src/java/org/apache/poi/util/SuppressForbidden.java +++ b/src/java/org/apache/poi/util/SuppressForbidden.java @@ -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 ""; }