Add model for FileChannel.lock() returning not null

Reviewed By: jvillard

Differential Revision: D2631231

fb-gh-sync-id: e5a3476
master
Cristiano Calcagno 9 years ago committed by facebook-github-bot-7
parent 9466aeaef3
commit 9177ba8d20

@ -9,7 +9,9 @@
package java.nio.channels;
import com.facebook.infer.models.InferBuiltins;
import java.nio.channels.spi.AbstractInterruptibleChannel;
import java.nio.channels.FileLock;
public abstract class FileChannel extends AbstractInterruptibleChannel {
@ -23,4 +25,12 @@ public abstract class FileChannel extends AbstractInterruptibleChannel {
private String displayName;
}
private native FileLock getFileLock();
FileLock lock() {
FileLock f = getFileLock();
InferBuiltins.assume(f != null);
return f;
}
}

Loading…
Cancel
Save