JDK-7066365 : junit test failed: AWTAppletLifecycleTest
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.
It's caused by:
So I think we can guard for null - as we do it before too.
CodeSource returned by cls.getProtectionDomain().getCodeSource() can be null when running in Junit - and when it's null, newPolicy.getPermissions(cs) will throw NullPointerException.
A null check on CodeSource (variable cs) and then return false for null case will fix the problem.