mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 02:15:59 +07:00
47 lines
1.2 KiB
Java
47 lines
1.2 KiB
Java
class Test {
|
|
int[] mIndex = null;
|
|
int mSize = 0;
|
|
|
|
void indexValues() {
|
|
float loadFactor = mIndex == null ? 1.f : ((float) mSize) / ((float) mIndex.length);
|
|
|
|
if (loadFactor < 0.25f || 0.75f <= loadFactor) {
|
|
mIndex = new int[mSize * 2];
|
|
}
|
|
|
|
mIndex[0] = -1;
|
|
}
|
|
|
|
void bar() {
|
|
int time = 99;
|
|
String str = <warning descr="Condition 'time < 0' is always 'false'">time < 0</warning> ? "" : "";
|
|
String str1 = <warning descr="Condition 'time <= 0' is always 'false'">time <= 0</warning> ? "" : "";
|
|
String str2 = <warning descr="Condition 'time >= 100' is always 'false'">time >= 100</warning> ? "" : "";
|
|
}
|
|
|
|
void forLoop() {
|
|
int target = 3;
|
|
for (int current = 0; <warning descr="Condition 'current < target' is always 'true'">current < target</warning>; ) {
|
|
current = 0;
|
|
}
|
|
}
|
|
|
|
void doLoop() {
|
|
int current;
|
|
int target = 3;
|
|
do
|
|
{
|
|
current = 0;
|
|
} while (<warning descr="Condition 'current < target' is always 'true'">current < target</warning>);
|
|
}
|
|
|
|
void whileLoop() {
|
|
int current = 0;
|
|
int target = 3;
|
|
while (<warning descr="Condition 'current < target' is always 'true'">current < target</warning>)
|
|
{
|
|
current = 0;
|
|
}
|
|
}
|
|
|
|
} |