summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call')
-rw-r--r--plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/IgnoreResultOfCall.java10
-rw-r--r--plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/ignore_result_of_call/expected.xml9
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 &lt;code&gt;Object.equals()&lt;/code&gt; is ignored #loc</description>
+ </problem>
+</problems> \ No newline at end of file