Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Something Like A Bug

class MyException extends Exception
{
    private static final long serialVersionUID = 1L;
}

public class UnusedTest
{
    static boolean b = false;

    static void method() throws MyException
    {
        if (b)
        {
            throw new MyException();
        }
    }

    public static void main(String[] args)
    {
        Object o = null;
        try
        {
            while (true)
            {
                method();
                o = new Object();
                b = true;
            }
        }
        catch (MyException e)
        {
        }
        if (o != null)
        {
            System.out.println("After catch!");
        }
    }
}

The jdt version of my eclipse is 3.6.0.v_A58. When I compile this code
in eclipse, there is no output,but when I using javac ,it generates the
correct output! 



Back to the top