Bug 206096 - The DefaultOutlineCellRenderer code checks for a System property which breaks unsigned applets.
The DefaultOutlineCellRenderer code checks for a System property which breaks...
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Outline&TreeTable
7.0.1
PC Windows 7
: P2 (vote)
: 7.1.1
Assigned To: Martin Entlicher
issues@platform
71patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-07 15:59 UTC by romeom
Modified: 2012-02-27 13:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description romeom 2011-12-07 15:59:18 UTC
The DefaultOutlineCellRenderer is making a check for the System property, nb.useSwingHtmlRendering, which causes an AccessControlException from an unsigned applet.  Out application is successfully using an older version of the outline jar.  The Manifest inside says the version is:
OpenIDE-Module-Implementation-Version: 200906241340
OpenIDE-Module-Specification-Version: 1.4.1

Upon attempting to upgrade to the version of the jar packaged with Netbeans 7.0.1, the AccessControlException began happening.  It also happens with the jar from version 7.1 as well.


The following is the stacktrace from a simple unsigned applet example (the code does nothing more than instantiate the DefaultOutlineCellRenderer):

Exception in thread "thread applet-PropertyTestApplet.class-1" java.lang.ExceptionInInitializerError
	at PropertyTestApplet.init(PropertyTestApplet.java:6)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission nb.useSwingHtmlRendering read)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
	at java.lang.System.getProperty(Unknown Source)
	at java.lang.Boolean.getBoolean(Unknown Source)
	at org.netbeans.swing.outline.DefaultOutlineCellRenderer.<clinit>(DefaultOutlineCellRenderer.java:89)
	... 3 more



JVM version being used:
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)
Comment 1 Martin Entlicher 2011-12-08 13:31:37 UTC
It's fixed by changeset:   208605:d7a5471edf3f
http://hg.netbeans.org/main/rev/d7a5471edf3f

I'm making this a candidate for 7.1 patch.
Comment 2 Quality Engineering 2011-12-09 12:10:10 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/d7a5471edf3f
User: mentlicher@netbeans.org
Log: #206096 Catch the SecurityException that can be thrown while reading system properties, or accessing class loaders.
Comment 3 Martin Entlicher 2012-01-31 13:48:36 UTC
Just catch (SecurityException se) is added, it should not cause any problem in patch1.
Comment 4 Martin Entlicher 2012-01-31 14:33:44 UTC
Fix transplanted to release71_fixes branch: changeset: 218586:7616e1f4dc8d
http://hg.netbeans.org/releases/rev/7616e1f4dc8d

Increased specification version by changeset:   218587:50816e61e6b9
http://hg.netbeans.org/releases/rev/50816e61e6b9
Comment 5 Jiri Kovalsky 2012-02-16 14:17:25 UTC
Martine, how can I reliably reproduce the problem in 7.1? Thanks.
Comment 6 Martin Entlicher 2012-02-16 15:16:30 UTC
Well, I didn't try to reproduce the problem. romeom, could you please verify that it works fine for you now.

It's not possible to verify this inside NetBeans IDE. You'd have to take the platform/modules/org-netbeans-swing-outline.jar and create some applet application, that uses the Outline.
Comment 7 Jiri Kovalsky 2012-02-27 13:21:15 UTC
I have not encountered any such exception during my 7.1.1 testing thus marking bug as verified.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo