JDK-7066365 : junit test failed: AWTAppletLifecycleTest
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 7-client
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2011-07-13
  • Updated: 2013-09-12
  • Resolved: 2011-08-17
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.

To download the current JDK release, click here.
7u2 b03Fixed 8Fixed
junit test failed: AWTAppletLifecycleTest

EVALUATION It's caused by: http://sa.sfbay.sun.com/projects/deployment_data/7-client/7047909.0/src/plugin/share/classes/sun/plugin2/applet/Plugin2Manager.java.sdiff.html 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.