blob: f223bbb215a55a33cdcca5f502df4f7e99d6f3a4 [file] [log] [blame]
import java.util.Arrays;
import org.checkerframework.checker.nullness.qual.Nullable;
public class CopyOfArray {
protected void makeCopy(Object[] args, int i) {
Object[] copyExact1 = Arrays.copyOf(args, args.length);
@Nullable Object[] copyExact2 = Arrays.copyOf(args, args.length);
// :: error: (assignment)
Object[] copyInexact1 = Arrays.copyOf(args, i);
@Nullable Object[] copyInexact2 = Arrays.copyOf(args, i);
}
}