United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7066365 junit test failed: AWTAppletLifecycleTest
JDK-7066365 : junit test failed: AWTAppletLifecycleTest

Details
Type:
Bug
Submit Date:
2011-07-13
Status:
Resolved
Updated Date:
2011-09-22
Project Name:
JDK
Resolved Date:
2011-08-17
Component:
deploy
OS:
windows
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b03)

Related Reports
Backport:

Sub Tasks

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
SUGGESTED FIX

http://jfxsrc.us.oracle.com/javafx/client/7-client/deploy/deploy/javafx/client/7-client/deploy/deploy/rev/06f11f9aa79e
                                     
2011-07-13



Hardware and Software, Engineered to Work Together