mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make IG test light
This commit is contained in:
+4
-4
@@ -5,14 +5,14 @@ public class StringConcatenationInsideStringBufferAppend {
|
||||
private String s;
|
||||
|
||||
void foo(StringBuffer buffer) {
|
||||
buffer.append("asdf" + s + "asdf");
|
||||
buffer.append("asdf" + s);
|
||||
buffer.<warning descr="String concatenation as argument to 'StringBuffer.append()' call">append</warning>("asdf" + s + "asdf");
|
||||
buffer.<warning descr="String concatenation as argument to 'StringBuffer.append()' call">append</warning>("asdf" + s);
|
||||
buffer.append("asdf" + "asdf");
|
||||
}
|
||||
|
||||
void bar(StringBuilder builder) {
|
||||
builder.append("asdf" + s + "asdf");
|
||||
builder.append("asdf" + s);
|
||||
builder.<warning descr="String concatenation as argument to 'StringBuilder.append()' call">append</warning>("asdf" + s + "asdf");
|
||||
builder.<warning descr="String concatenation as argument to 'StringBuilder.append()' call">append</warning>("asdf" + s);
|
||||
builder.append("asdf" + "asdf");
|
||||
}
|
||||
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>StringConcatenationInsideStringBufferAppend.java</file>
|
||||
<line>8</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">String concatenation as argument to 'StringBuffer.append()' call</problem_class>
|
||||
<description>String concatenation as argument to <code>StringBuffer.append()</code> call #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>StringConcatenationInsideStringBufferAppend.java</file>
|
||||
<line>9</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">String concatenation as argument to 'StringBuffer.append()' call</problem_class>
|
||||
<description>String concatenation as argument to <code>StringBuffer.append()</code> call #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>StringConcatenationInsideStringBufferAppend.java</file>
|
||||
<line>14</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">String concatenation as argument to 'StringBuffer.append()' call</problem_class>
|
||||
<description>String concatenation as argument to <code>StringBuilder.append()</code> call #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>StringConcatenationInsideStringBufferAppend.java</file>
|
||||
<line>15</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">String concatenation as argument to 'StringBuffer.append()' call</problem_class>
|
||||
<description>String concatenation as argument to <code>StringBuilder.append()</code> call #loc</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
+12
-5
@@ -1,11 +1,18 @@
|
||||
package com.siyeh.ig.performance;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.siyeh.ig.LightInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class StringConcatenationInsideStringBufferAppendInspectionTest extends IGInspectionTestCase {
|
||||
public class StringConcatenationInsideStringBufferAppendInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
doTest("com/siyeh/igtest/performance/string_concatenation_inside_string_buffer_append",
|
||||
new StringConcatenationInsideStringBufferAppendInspection());
|
||||
public void testStringConcatenationInsideStringBufferAppend() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
return new StringConcatenationInsideStringBufferAppendInspection();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user