mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
The object may be only shallowly unmodifiable GitOrigin-RevId: 41c0a0b46fc80169ff334d6337d9f8708e689448
20 lines
465 B
Java
20 lines
465 B
Java
import java.util.Arrays;
|
|
|
|
class Test {
|
|
void test(int[] dest) {
|
|
int[] array = {1, 2, 3, 4, 5};
|
|
System.out.println(Arrays.toString(array));
|
|
System.arraycopy(array, 0, dest, 0, 5);
|
|
// Analysis cannot see this, unfortunately
|
|
if (array[3] == 4) {
|
|
}
|
|
}
|
|
|
|
void test2(int[] dest) {
|
|
int[] array = {1, 2, 3, 4, 5};
|
|
System.out.println(Arrays.toString(array));
|
|
System.arraycopy(dest, 0, array, 0, 5);
|
|
if (array[3] == 4) {
|
|
}
|
|
}
|
|
} |