This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206096

Summary: The DefaultOutlineCellRenderer code checks for a System property which breaks unsigned applets.
Product: platform Reporter: romeom
Component: Outline&TreeTableAssignee: Martin Entlicher <mentlicher>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic
Priority: P2    
Version: 7.0.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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.