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 116035 - CDDL license: assumption about support for block comments
Summary: CDDL license: assumption about support for block comments
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks: 116034
  Show dependency tree
 
Reported: 2007-09-19 16:35 UTC by Marian Petras
Modified: 2007-09-19 19:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
suggested patch (1.01 KB, patch)
2007-09-19 16:36 UTC, Marian Petras
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2007-09-19 16:35:23 UTC
The CDDL license template has format

   ${licenseFirst}
   ...
   ...
   ${licenselast}   

that is, it requires that FreeMarker variables "licenseFirst" and "licenseLast" are defined.

I believe this format was made with an idea of block comments (in Java, HTML, JSP, etc.) in mind. However, not all
languages and file formats support block comments - for example, .properties files do not support block comments. So
what value should be set to "licenseFirst" and "licenseLast"? Empty string! But that leads to empty lines in place of
${licenseFirst} and ${licenseLast}. I suggest that the license templates are changed such that "licenseFirst" and
"licenseLast" are not required:

   <#if licenseFirst??>
   ${licenseFirst}
   </#if>
   ...
   ...
   <#if licenseLast??>
   ${licenseLast}
   </#if>

This should be made into NetBeans 6.0 (until people develop their own license files based on the default ones).
Comment 1 Marian Petras 2007-09-19 16:36:45 UTC
Created attachment 49085 [details]
suggested patch
Comment 2 Jesse Glick 2007-09-19 19:00:14 UTC
Looks fine. If it works, feel free to commit it.
Comment 3 Marian Petras 2007-09-19 19:50:23 UTC
Committed (to the trunk).

Modified file:
    apisupport/project/src/org/netbeans/modules/apisupport/project/ui/resources/license-cddl-netbeans-sun.txt   (1.4)

Diff:
http://deadlock.netbeans.org/fisheye/browse/netbeans/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/resources/license-cddl-netbeans-sun.txt?r1=1.3&r2=1.4