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 116034 - License templates: assumption about support for block comments
Summary: License templates: assumption about support for block comments
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@ide
URL:
Keywords: UMBRELLA
Depends on: 116035 116037
Blocks:
  Show dependency tree
 
Reported: 2007-09-19 16:30 UTC by Marian Petras
Modified: 2007-09-21 16:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2007-09-19 16:30:49 UTC
Both license files (CDDL and "default license") have format

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

that is, they require 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 I 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-21 16:59:43 UTC
Both issues (issue #116035, issue #116037) are now fixed. So I mark this issue as FIXED, too.