Skip to content

Commit

Permalink
Merge pull request #160 from DevFactory/release/remove-dead-stores-fix-1
Browse files Browse the repository at this point in the history
Dead stores should be removed
  • Loading branch information
ryaneberly committed May 2, 2016
2 parents 3df45fc + 851e3f1 commit 35b7a7a
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/cflint/CFLint.java
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ protected void reportRule(final Element elem, final Object expression, final Con
if(configuration == null){
throw new NullPointerException("Configuration is null");
}
PluginInfoRule ruleInfo = null;
PluginInfoRule ruleInfo;
if("PLUGIN_ERROR".equals(msgcode)){
ruleInfo = new PluginInfoRule();
PluginMessage msgInfo = new PluginMessage("PLUGIN_ERROR");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cflint/HTMLOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void output(final BugList bugList, final Writer writer, final boolean sho

// 2. Use the TransformerFactory to process the stylesheet Source and
// generate a Transformer.
javax.xml.transform.Transformer transformer = null;
javax.xml.transform.Transformer transformer;
//System.out.println("Using html style:" + htmlStyle);
try {
final InputStream is = getClass().getResourceAsStream("/findbugs/" + htmlStyle);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cflint/JSONOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void output(final BugList bugList, final Writer writer, final boolean sho
for (final Entry<String, List<BugInfo>> bugEntry : bugList.getBugList().entrySet()) {
final Iterator<BugInfo> iterator = bugEntry.getValue().iterator();
BugInfo bugInfo = iterator.hasNext() ? iterator.next() : null;
BugInfo prevbugInfo = null;
BugInfo prevbugInfo;

while (bugInfo != null) {
String severity = bugEntry.getValue().get(0).getSeverity();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cflint/XMLOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void output(final BugList bugList, final Writer writer, final boolean sho
for (final Entry<String, List<BugInfo>> bugEntry : bugList.getBugList().entrySet()) {
final Iterator<BugInfo> iterator = bugEntry.getValue().iterator();
BugInfo bugInfo = iterator.hasNext() ? iterator.next() : null;
BugInfo prevbugInfo = null;
BugInfo prevbugInfo;

while (bugInfo != null) {
String severity = bugEntry.getValue().get(0).getSeverity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public void expression(final CFScriptStatement expression, final Context context
String decompile = function.Decompile(1);
final int begLine = function.getLine();
String[] lines = decompile.split("\\n");
CFCompoundStatement body = (CFCompoundStatement) function.getBody();

checkSize(context, begLine, lines.length, bugs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class SimpleComplexityChecker extends CFLintScannerAdapter {

@Override
public void expression(final CFScriptStatement expression, final Context context, final BugList bugs) {
CFFuncDeclStatement function = null;
CFFuncDeclStatement function;

if (expression instanceof CFFuncDeclStatement) {
function = (CFFuncDeclStatement) expression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public void expression(final CFScriptStatement expression, final Context context
alreadyTooMany = false;
}
else if (expression instanceof CFFuncDeclStatement) {
final CFFuncDeclStatement function = (CFFuncDeclStatement) expression;

if (!trivalFunction(context.getFunctionName())) {
functionCount++;
Expand Down

0 comments on commit 35b7a7a

Please sign in to comment.