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 4345 - static and private final abbrevs.
Summary: static and private final abbrevs.
Status: CLOSED INVALID
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: _ pkuzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-10-08 17:22 UTC by _ pkuzel
Modified: 2003-07-02 16: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 _ pkuzel 1999-10-08 17:22:04 UTC
There are abbrvs that combine final and private.

BUT private methods are automaticly final too!
No explicit marking them as final is needed.

I think that the same note applies on static.

[Mila] Here`s the list of the java abbrevs containing final:
    javaAbbrevMap.put("psf", "private static final ");
    javaAbbrevMap.put("psfi", "private static final int ");
    javaAbbrevMap.put("psfs", "private static final String ");
    javaAbbrevMap.put("psfb", "private static final boolean ");
    javaAbbrevMap.put("Psf", "public static final ");
    javaAbbrevMap.put("Psfi", "public static final int ");
    javaAbbrevMap.put("Psfs", "public static final String ");
    javaAbbrevMap.put("Psfb", "public static final boolean ");
The "private static final" has sense for the constants because making them only "private static" wouldn`t allow the compiler to substitute a constant in the resulting class as the value of the variabl
e could change during the class lifetime and they would be in fact changeable which is not desired for the constants.
Comment 1 Quality Engineering 2003-07-02 15:56:54 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.
Comment 2 Quality Engineering 2003-07-02 16:03:35 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.