IDEA-123948 Constant condition and exceptions: false positive on MappedByteBuffer.getInt

This commit is contained in:
peter
2014-04-18 22:37:31 +02:00
parent 0fd86dea1f
commit 29fec2258a
4 changed files with 47 additions and 2 deletions
@@ -0,0 +1,14 @@
import java.nio.MappedByteBuffer;
class Test
{
public static int triggerBug(MappedByteBuffer buffer)
{
int a = buffer.getInt();
int b = buffer.getInt();
if(a == 0 && b == 1)
return 0;
else
return 1;
}
}