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 254362 - Freemaker template in 8.1 now adds date into ${time}
Summary: Freemaker template in 8.1 now adds date into ${time}
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 08:46 UTC by brettryan
Modified: 2015-10-12 01:03 UTC (History)
0 users

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 brettryan 2015-08-14 08:46:03 UTC
I've just installed 8.1 and now found that all my templates are invalid.

I would normally have:

    <#assign licensePrefix = " * ">
    <#assign dateFormat = "MMM d yyyy, HH:mm">
    <#assign currentTime = "${date} ${time}">
    /*
    ${licensePrefix}${nameAndExt}    ${currentTime?datetime?string(dateFormat)}
    ${licensePrefix?replace(" +$", "", "r")}
    <#include "${project.licensePath}">
     */

    <#if package?? && package != "">
    package ${package};

    </#if>

    /**
     *
     * @author  ${user}
     */
    public class ${name} {

    }

This will now fail as $time} previously only contained the time, now it contains the date and time.

Is this a bug or an intentionally change? Personally I feel a new var of ${datetime} should be added that reflexts both the date and time if necessary.
Comment 1 Martin Entlicher 2015-09-30 07:31:20 UTC
Fixed by changeset:   292755:e5163e0adea4
http://hg.netbeans.org/core-main/rev/e5163e0adea4
http://hg.netbeans.org/core-main/rev/0332d7c37c1d
Comment 2 Quality Engineering 2015-10-01 05:02:16 UTC
Integrated into 'main-silver', will be available in build *201510010328* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e5163e0adea4
User: mentlicher@netbeans.org
Log: #254362: Put the time only into ${time} and proper string into {dateTime}.
Comment 3 brettryan 2015-10-12 01:03:52 UTC
Thanks man, all good now :)