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 227512

Summary: ProductInformationPanel does not add license file text to Help > About dialog.
Product: platform Reporter: pjdm
Component: -- Other --Assignee: Stanislav Aubrecht <saubrecht>
Status: VERIFIED FIXED    
Severity: normal CC: anebuzelsky, mmirilovic
Priority: P2    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description pjdm 2013-03-15 10:11:44 UTC
I use About/Licenses in a layer.xml to add license text. This works in 7.2 but not in 7.3.

In 7.2, ProductInformationPanel.getCopyrightText() uses the following line of code to add curLicense to the copyright text.

                        sw.write("<br>" + MessageFormat.format( // NOI18N
                            NbBundle.getBundle(ProductInformationPanel.class).getString("LBL_AddOnCopyright"), // NOI18N
                            new Object[] { curLicense }));
 
In 7.3, this line has been changed to

                        sw.write("<br>" + MessageFormat.format( // NOI18N
                            NbBundle.getMessage(ProductInformationPanel.class, "LBL_AddOnCopyright", FONT_SIZE), // NOI18N
                            new Object[] { curLicense }));
 
This adds FONT_SIZE to the copyright text, resulting in "12" being displayed in the Help > About dialog instead of the contents of the About/Licenses file. If FONT_SIZE is replaced by curLicense, the outer call to MessageFormat.format() is redundant.

Please revert this change or fix the call to NbBundle.getMessage().

Note that this is not a trivial problem: depending on the license(s) used, it may be necessary to display relevant license text. This error means that the application is in violation of such licenses.
Comment 1 pjdm 2013-03-16 08:08:40 UTC
Associated with this is the change in the relevant Bundle.properties from:

LBL_AddOnCopyright=<div style="font-size: 12pt; font-family: Verdana, 'Verdana CE',  Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">\
    {0} </div>

to

LBL_AddOnCopyright=<div style="font-size: {1}pt; font-family: Verdana, 'Verdana CE',  Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">\
    {0} </div>

in particular the change from "12pt" to "{1}pt". Since FONT_SIZE is the zeroth argument, it goes where the text should be.
Comment 2 Antonin Nebuzelsky 2013-03-20 11:43:06 UTC
Thanks for reporting.

Stando, caused in your fix of issue 219379.

Should be backported to 7.3.1.
Comment 3 Stanislav Aubrecht 2013-04-04 09:48:12 UTC
core-main fec6121850f2
Comment 4 Tomas Danek 2013-05-02 13:00:58 UTC
verified in Product Version: NetBeans IDE Dev (Build 201304292301)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b12
System: Mac OS X version 10.8.3 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/dev
Cache directory: /Users/tomas/Library/Caches/NetBeans/dev

please backport.
Comment 5 Stanislav Aubrecht 2013-05-06 09:49:27 UTC
backported to release73 branch as dbc2b63a55ec
Comment 6 Quality Engineering 2013-05-07 00:19:00 UTC
Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/dbc2b63a55ec
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #227512  - backport of fec6121850f2
Comment 7 Tomas Danek 2013-05-13 11:43:47 UTC
v. in 7.3.1

Product Version: NetBeans IDE 7.3.1 (Build 201305102200)
Java: 1.6.0_43; Java HotSpot(TM) Client VM 20.14-b01
Runtime: Java(TM) SE Runtime Environment 1.6.0_43-b01
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Users\tester\AppData\Roaming\NetBeans\7.3.1dev
Cache directory: C:\Users\tester\AppData\Local\NetBeans\Cache\7.3.1dev