View by Classes

Findings - Overview

warning Method uses instanceof on multiple types to arbitrate logic (Findbugs)

Further info on the wiki.

This method uses the instanceof operator in a series of if/else statements to differentiate blocks of code based on type. If these types are related by inheritance, it is cleaner to just define a method in the base class, and use overridden methods in these classes.

1org.jcoderz.phoenix.sqlparser.SqlToXml
Method org.jcoderz.phoenix.sqlparser.SqlToXml.transformSqlToXml() uses instanceof on multiple types to arbitrate logic [74]
1org.jcoderz.phoenix.report.PmdFindingType
Method org.jcoderz.phoenix.report.PmdFindingType.addRulesetFindings(Unmarshaller, InputStream) uses instanceof on multiple types to arbitrate logic [136]
1org.jcoderz.phoenix.sqlparser.SqlParser
Method org.jcoderz.phoenix.sqlparser.SqlParser.parse() uses instanceof on multiple types to arbitrate logic [204]
1org.jcoderz.phoenix.report.FindBugsReportReader
Method org.jcoderz.phoenix.report.FindBugsReportReader.getItems() uses instanceof on multiple types to arbitrate logic [125]
1org.jcoderz.phoenix.report.Java2Html
Method org.jcoderz.phoenix.report.Java2Html.fileNameForOrder(Comparator) uses instanceof on multiple types to arbitrate logic [2291]