mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 07:32:21 +07:00
GitOrigin-RevId: 8c29e3469c062b9125a3fe8f8e45d96a9390c67e
17 lines
490 B
Java
17 lines
490 B
Java
import java.util.*;
|
|
|
|
public class StringConcat {
|
|
void test(String s1, String s2) {
|
|
if (s1.equals("foo") && s2.equals("bar")) {
|
|
String res = s1 + s2;
|
|
if (<warning descr="Condition 'res.equals(\"foobar\")' is always 'true'">res.equals("foobar")</warning>) {
|
|
|
|
}
|
|
}
|
|
if (s1.startsWith("foo") && s2.startsWith("bar")) {
|
|
String res = s1 + s2;
|
|
if (<warning descr="Condition 'res.length() < 6' is always 'false'">res.length() < 6</warning>) {}
|
|
}
|
|
}
|
|
}
|