]> source.dussan.org Git - poi.git/commitdiff
declare methods throw runtime exceptions for IDE hints
authorJaven O'Neal <onealj@apache.org>
Wed, 14 Sep 2016 21:32:34 +0000 (21:32 +0000)
committerJaven O'Neal <onealj@apache.org>
Wed, 14 Sep 2016 21:32:34 +0000 (21:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760784 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/usermodel/FormulaError.java

index 583ca06d9c6e7f53a3e4021421235a865a39f4fc..fa102299e8a9b7eeec9dcd3ecae8171e39fb839d 100644 (file)
@@ -166,19 +166,19 @@ public enum FormulaError {
         return false;
     }
 
-    public static FormulaError forInt(byte type){
+    public static FormulaError forInt(byte type) throws IllegalArgumentException {
         FormulaError err = bmap.get(type);
         if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
         return err;
     }
-    public static FormulaError forInt(int type){
+    public static FormulaError forInt(int type) throws IllegalArgumentException {
         FormulaError err = imap.get(type);
         if(err == null) err = bmap.get((byte)type);
         if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
         return err;
     }
 
-    public static FormulaError forString(String code){
+    public static FormulaError forString(String code) throws IllegalArgumentException {
         FormulaError err = smap.get(code);
         if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);
         return err;