FIX: Function Call Is Not Executed When Used as Expression in Empty IF BlockID: Q214531
|
The expression in the IF statement of an empty IF block is not executed.
This is a bug in the Just In Time (JIT) compiler where the empty IF block is optimized out. As a result, it does not execute the expression in the IF statement.
Try one of the following to work around this problem:
Q163637 INFO: Availability of Current Build of Microsoft VM
Q154580 Description of the Just-In-Time Compiler
This bug has been fixed in Microsoft virtual machine version 3154 or higher.
public class ifop
{
private static boolean runme()
{
System.out.println("runme got executed!");
return(true);
}
public static void main(String[] args)
{
System.out.println("before call to runme");
if (runme())
{
// do nothing
}
System.out.println("after call to runme");
}
}
For additional information about Microsoft virtual machine, please see the following article in the Microsoft Knowledge Base:
Q163638 HOWTO: Automatically Update the Microsoft VMFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words:
Keywords : kbJavaVM kbJIT kbGrpJava
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 28, 1999