]> source.dussan.org Git - poi.git/commitdiff
findbugs: fix SF_SWITCH_NO_DEFAULT warnings
authorJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 06:38:53 +0000 (06:38 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 13 Jun 2016 06:38:53 +0000 (06:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748090 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
src/java/org/apache/poi/ss/util/AreaReference.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java

index dbefaabe5c713b3d9d1c7fa244fd207385c37564..1f3175121c927c86dad567814ad9714f096c35de 100644 (file)
@@ -78,6 +78,8 @@ public class HSSFHyperlink implements Hyperlink {
             case LINK_DOCUMENT:
                 record.newDocumentLink();
                 break;
+            default:
+                throw new IllegalArgumentException("Invalid type: " + type);
         }
     }
 
index f0463384883fa75f374b68c1009d70d4416b35ad..6d2e4530bf1b306abb7f747cddd660b0725c46eb 100644 (file)
@@ -355,10 +355,11 @@ public class AreaReference {
                         }
                         delimiterPos = i;
                     }
+                    // fall through
                 default:
-                    continue;
+                    continue; //continue the for-loop
                 case SPECIAL_NAME_DELIMITER:
-                    // fall through
+                    break;
             }
             if(!insideDelimitedName) {
                 insideDelimitedName = true;
index 7ef52c1a7d9e2eeb5471a96ffebcf20b13d77874..cf1b419902e9c49a04c1fa38146f86a5cf4b933f 100644 (file)
@@ -779,6 +779,10 @@ public class SXSSFCell implements Cell {
                     current=new HyperlinkProperty(value);
                     break;
                 }
+                default:
+                {
+                    throw new IllegalArgumentException("Invalid type: " + type);
+                }
             }
             if(previous!=null)
             {