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 12089 - Suggest new token for *.java templates: __RANDOM_LONG__
Summary: Suggest new token for *.java templates: __RANDOM_LONG__
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-10 14:35 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-05-10 14:35:37 UTC
I suggest that Java templates have a new magic token, __RANDOM_LONG__, which
would evaluate to a randomly selected long value, e.g. "-3875567542167L". The
purpose of this would be so that you could place in templates:

public SomeBean implements Serializable {

    private static final long serialVersionUID = __RANDOM_LONG__;

}

Now newly created beans would have a usable serial version already defined when
they were made. It is not enough to hardcode the value into the template,
because it needs to be different each time the template is instantiated.
Comment 1 Jan Chalupa 2001-11-27 12:49:52 UTC
Target milestone -> 3.3.1.
Comment 2 Svata Dedic 2002-05-21 17:48:50 UTC
Cleaning up before 4.0 planning
Comment 3 Jesse Glick 2002-06-25 04:58:26 UTC
Now that I think about it, this feature is probably unnecessary.
SVUID's can initially be any arbitrary number, they need not be
random; e.g. template could just use 1L. Specific SVUIDs are used only
to keep compatibility after accidentally making one release without an
SVUID, after which you need to use serialver tool anyway. So feel free
to mark this issue WONTFIX.
Comment 4 Marek Grummich 2002-07-19 17:28:37 UTC
Target milestone was changed from not determined to TBD
Comment 5 Jesse Glick 2002-09-30 05:41:01 UTC
No purpose, I guess.