Hi Gary, Thank you for pointing it out. I will remove the tag of 'affects version'.
Regards Dapeng -----Original Message----- From: Gary Gregory [mailto:garydgreg...@gmail.com] Sent: Thursday, April 28, 2016 1:03 PM To: Commons Developers List Subject: Re: [jira] [Updated] (CRYPTO-31) Make fields final wherever possible I do not think tickets should be marked as affects 1.0.0 since that version is not released. Gary On Apr 27, 2016 8:33 PM, "Dapeng Sun (JIRA)" <j...@apache.org> wrote: > > [ > https://issues.apache.org/jira/browse/CRYPTO-31?page=com.atlassian.jir > a.plugin.system.issuetabpanels:all-tabpanel > ] > > Dapeng Sun updated CRYPTO-31: > ----------------------------- > Affects Version/s: 1.0.0 > > > Make fields final wherever possible > > ----------------------------------- > > > > Key: CRYPTO-31 > > URL: https://issues.apache.org/jira/browse/CRYPTO-31 > > Project: Commons Crypto > > Issue Type: Improvement > > Components: Stream > > Affects Versions: 1.0.0 > > Reporter: Sebb > > Assignee: Ferdinand Xu > > Priority: Minor > > Fix For: 1.0.0 > > > > > > Final fields are automatically thread safe if the object itself is > > not > modified. > > Whereas non-final fields are not necessarily thread-safe even if > > they > are not mutated - this is because of the Java memory model. > > There are several non-final fields that are not mutated once created. > They should be made final to improve thread-safety. This is > particularly important for static fields since they are more likely to > be used by multiple threads. > > Note: such changes will not affect the public API if the fields are > private or package-protected. > > The fields include: > > JavaSecureRandom.instance > > OpensslSecureRandom.fallback > > OpensslSecureRandom.nativeEnabled > > ChannelInput.channel > > StreamInput.buf - since no point creating an instance if it is not > > going > to be used for reading, might as well create the buffer up front > > StreamOutput.bufferSize > > StreamOutput.buf - as for StreamInput StreamOutput.out - should also > > be private static NativeCodeLoader.nativeCodeLoaded static > > OSInfo.archMapping static ReflectionUtils.classLoader > > > > -- > This message was sent by Atlassian JIRA > (v6.3.4#6332) >