summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java')
-rw-r--r--plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java
new file mode 100644
index 000000000000..2548443e805b
--- /dev/null
+++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/nested_method_call/NestedMethodCall.java
@@ -0,0 +1,43 @@
+
+import java.util.ArrayList;
+
+public class NestedMethodCall extends ArrayList{
+ private int baz = bar(foo());
+
+ public NestedMethodCall(int initialCapacity) {
+ super(Math.abs(initialCapacity));
+ }
+
+ public NestedMethodCall() {
+ this(Math.abs(3));
+ }
+
+ public int foo()
+ {
+ return 3;
+ }
+ public int bar(int val)
+ {
+ return 3+val;
+ }
+
+ public int baz()
+ {
+ bar(Math.abs(3));
+ return bar(<warning descr="Nested method call 'foo()'">foo</warning>());
+ }
+
+ public int barangus()
+ {
+ return bar(<warning descr="Nested method call 'foo()'">foo</warning>()+3);
+ }
+
+ private int value = 1;
+ public int getValue() {
+ return value;
+ }
+
+ public int apex() {
+ return bar(getValue());
+ }
+}