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

Comments
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.
2011-07-13