diff options
Diffstat (limited to 'plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call')
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/IgnoreResultOfCall.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/IgnoreResultOfCall.java new file mode 100644 index 000000000000..6dbce04ce831 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/IgnoreResultOfCall.java @@ -0,0 +1,10 @@ +package com.siyeh.igtest.bugs.ignore_result_of_call; + +class IgnoreResultOfCall { + + void foo(Object o, String s) { + o.equals(s); + o.equals() + } + +}
\ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/expected.xml new file mode 100644 index 000000000000..7f64be4f9ef0 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/expected.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<problems> + <problem> + <file>IgnoreResultOfCall.java</file> + <line>6</line> + <problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Result of method call ignored</problem_class> + <description>Result of <code>Object.equals()</code> is ignored #loc</description> + </problem> +</problems>
\ No newline at end of file |