moving tests to CE

This commit is contained in:
Dmitry Jemerov
2009-09-25 21:08:51 +04:00
parent 19e9b897aa
commit 3f622aa4ab
7 changed files with 6 additions and 0 deletions
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Test.java</file>
<line>13</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Redundant array creation</problem_class>
<description>Redundant array creation for calling varargs method</description>
</problem>
<problem>
<file>Test.java</file>
<line>14</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Redundant array creation</problem_class>
<description>Redundant array creation for calling varargs method</description>
</problem>
</problems>
@@ -0,0 +1,16 @@
public class IntentionTest {
public IntentionTest() {}
public void method( Object ... args ) {
for (int i = 0; i < args.length; i++) {
System.out.println("args["+i+"] = " + args[i]);
}
}
public void main(String[] args) {
String[] params = new String[]{ "0", "1" };
method(new Object[]{params});
method(new Object[]{"2", params});
method(new Object[]{params, params});
}
}