Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: 1. Set Java Compiler | Errors/Warnings | Null pointer access = ERROR (either workspace or project-specific settings) 2. Write the following class public class Test { public static void main(String[] args) throws Throwable{ Throwable t = null; throw t; } } ACTUAL BEHAVIOUR: The source code pass compilation without errors. If run, it throws a NullPointerException. EXPECTED BEHAVIOUR: The compiler should have signaled an error "Null pointer access: The variable t can only be null at this location" at the line where t is thrown.
Created attachment 77975 [details] Suggested fix + test cases ThrowStatement imitates what MessageSend does. Currently under test.
All JDT Core tests pass. Kent, would you please review the patch?
Released for 3.4 M2.
Verified for 3.4M2 using I20070917-1800