RFR: (jaxp) 8003261 : static field is public but not final (original) (raw)
Tom Hawtin tom.hawtin at oracle.com
Tue Dec 18 17:49:44 UTC 2012
- Previous message: RFR: (jaxp) 8003261 : static field is public but not final
- Next message: RFR: (jaxp) 8003261 : static field is public but not final
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Not that it's particularly important, but it's /possible/ clients are relying on the non-compile time constant nature of this field causing it not to be inlined into client class files, rather than the ability to switch the version string. So it may be a good idea to add the final, but make it a non-compile time constant. We can also remove the duplication.
public static final String fVersion = getVersion();
Tom
On 18/12/2012 08:47, Joe Wang wrote:
Hi,
This is the 2nd of the three [findbug] issues. The field fVersion is simply made final. webrev: http://cr.openjdk.java.net/~joehw/jdk8/8003261/webrev/ Test: No new test needed. Thanks, Joe
- Previous message: RFR: (jaxp) 8003261 : static field is public but not final
- Next message: RFR: (jaxp) 8003261 : static field is public but not final
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]