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 32555 - IDE help cannot be viewed when -fontsize startup parameter is used.
Summary: IDE help cannot be viewed when -fontsize startup parameter is used.
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-02 11:28 UTC by Marek Fukala
Modified: 2008-12-22 15:57 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The NPE (2.27 KB, text/plain)
2003-04-02 11:31 UTC, Marek Fukala
Details
binary patch file (9.69 KB, application/octet-stream)
2003-04-02 15:25 UTC, _ tboudreau
Details
Diff of the changes (2.53 KB, patch)
2003-04-02 15:27 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2003-04-02 11:28:32 UTC
[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.
Comment 1 Marek Fukala 2003-04-02 11:31:30 UTC
Created attachment 9655 [details]
The NPE
Comment 2 _ ttran 2003-04-02 12:54:15 UTC
strange.  OS?  Is it reproducible?
Comment 3 Marek Fukala 2003-04-02 13:04:49 UTC
OS: Windows XP (with display dpi set to 145% of normal size)

It's 100% reproducible.
Comment 4 Marek Fukala 2003-04-02 13:06:54 UTC
OS has been set.
Comment 5 Marian Mirilovic 2003-04-02 13:27:45 UTC
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 ?
Comment 6 _ tboudreau 2003-04-02 14:30:59 UTC
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 
Comment 7 Marian Mirilovic 2003-04-02 14:44:13 UTC
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.

Comment 8 _ tboudreau 2003-04-02 15:25:53 UTC
Created attachment 9664 [details]
binary patch file
Comment 9 _ tboudreau 2003-04-02 15:27:28 UTC
Created attachment 9665 [details]
Diff of the changes
Comment 10 Marian Mirilovic 2003-04-02 15:36:49 UTC
patch verified
Comment 11 Jesse Glick 2003-04-02 17:44:35 UTC
Please include the reference # for the JDK bug here.
Comment 12 _ ttran 2003-04-03 08:05:45 UTC
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.
Comment 13 _ tboudreau 2003-04-03 10:56:03 UTC
Fix merged to release35 branch.

Bugtraq 4841502 created re problem in JavaHelp.
Comment 14 Marian Mirilovic 2003-04-07 09:10:04 UTC
verified in [s1s5](030406)