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.
[030331, jdk1.4.0_02] How to reproduce: 1) start IDE with startup option -fontsize (for example size 14). 2) try to open a help => The attached exception appers.
Created attachment 9655 [details] The NPE
strange. OS? Is it reproducible?
OS: Windows XP (with display dpi set to 145% of normal size) It's 100% reproducible.
OS has been set.
It's OS independent, I have changed it, and yes it's 100% reproducible. In my opinion we need a fix for 3.5 release. Marek: What do you think ?
Looks like a bug in JavaHelp: /** * Subclassed to only accept the font if it is not a FontUIResource. */ public void setFont(Font font) { if(font instanceof FontUIResource) font = null; if (font != null) { title.setFont(font); } super.setFont(font); } The result of this code is that it will call JPanel.setFont (null). There is nothing in the docs for JComponent (where super.setFont() is implemented) stating that null is a legal value here. I can't fathom why one would disallow normal Font objects - FontUIResource does nothing exciting whatsoever, and is just a lazy loading mechanism for UIManager. A JDK bug should be filed, though. Fixed in trunk, org.netbeans.core.Main.java 1.160
Thanks Tim for evaluation. In my opinion it will be good have this fix in 3.5 release, if not javahelp doesn't work for another than default font size.
Created attachment 9664 [details] binary patch file
Created attachment 9665 [details] Diff of the changes
patch verified
Please include the reference # for the JDK bug here.
the diff looks fine to me, approved for 3.5. Tim: in the trunk code please add a comment explaining why you're doing what you're doing and refer to this bug.
Fix merged to release35 branch. Bugtraq 4841502 created re problem in JavaHelp.
verified in [s1s5](030406)