diff options
Diffstat (limited to 'plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java')
-rw-r--r-- | plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java index 626d4508e731..a72f297e483c 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/ResultSetIndexZeroInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2012 Dave Griffith, Bas Leijdekkers + * Copyright 2003-2014 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,11 +87,11 @@ public class ResultSetIndexZeroInspection extends BaseInspection { final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (resultSet) { if (TypeUtils.expressionHasTypeOrSubtype(qualifier, "java.sql.ResultSet")) { - registerError(argument, Boolean.valueOf(resultSet)); + registerError(argument, Boolean.TRUE); } - } else { + } else if (arguments.length > 1) { if (TypeUtils.expressionHasTypeOrSubtype(qualifier, "java.sql.PreparedStatement")) { - registerError(argument, Boolean.valueOf(resultSet)); + registerError(argument, Boolean.FALSE); } } } |