mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-12 19:06:35 +07:00
GitOrigin-RevId: ffe650569937af9fc97b48066b4d4f72962bd737
15 lines
495 B
Java
15 lines
495 B
Java
class DataFlowBug {
|
|
|
|
public int add2(Object left, Object right) {
|
|
if (left != null && !(left instanceof String)) {
|
|
return ((<warning descr="Casting 'left' to 'String' will produce 'ClassCastException' for any non-null value">String</warning>) left).length();
|
|
|
|
}
|
|
if (!(right instanceof String)) {
|
|
return ((<warning descr="Casting 'right' to 'String' will produce 'ClassCastException' for any non-null value">String</warning>) right).length();
|
|
|
|
}
|
|
return 2;
|
|
}
|
|
|
|
} |