Add defauilt case
This commit is contained in:
1 parent
ff263e29a0
commit
f20a51e5ae
1 file changed
+4
-1
+4
-1
@@ -44,7 +44,6 @@ import net.sourceforge.pmd.lang.java.types.TypeTestUtil;
|
||||
*/
|
||||
public class InsufficientStringBufferDeclarationRule extends AbstractJavaRulechainRule {
|
||||
|
||||
|
||||
private static final int DEFAULT_BUFFER_SIZE = 16;
|
||||
|
||||
public InsufficientStringBufferDeclarationRule() {
|
||||
@@ -270,6 +269,10 @@ public class InsufficientStringBufferDeclarationRule extends AbstractJavaRulecha
|
||||
case DIV:
|
||||
data.setValue(data.getValue() / temp.getValue());
|
||||
break;
|
||||
|
||||
default:
|
||||
data.setValue(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user