commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (VFS-374) Incorrect lazy initialization of static field org.apache.commons.vfs2.util.Messages.resources in org.apache.commons.vfs2.util.Messages.findMessage(String)
Date Tue, 01 Nov 2011 02:36:32 GMT

     [ https://issues.apache.org/jira/browse/VFS-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary D. Gregory resolved VFS-374.
---------------------------------

    Resolution: Fixed

Committed revision 1195775.
                
> Incorrect lazy initialization of static field org.apache.commons.vfs2.util.Messages.resources
in org.apache.commons.vfs2.util.Messages.findMessage(String)
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: VFS-374
>                 URL: https://issues.apache.org/jira/browse/VFS-374
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
> Maven home: C:\Java\apache-maven-3.0.3\bin\..
> Java version: 1.6.0_29, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_29\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Gary D. Gregory
>             Fix For: Nightly Builds
>
>
> FindBugs Eclipse plugin reports:
> Bug: Incorrect lazy initialization of static field org.apache.commons.vfs2.util.Messages.resources
in org.apache.commons.vfs2.util.Messages.findMessage(String)
> This method contains an unsynchronized lazy initialization of a non-volatile static field.
Because the compiler or processor may reorder instructions, threads are not guaranteed to
see a completely initialized object, if the method can be called by multiple threads. You
can make the field volatile to correct the problem. For more information, see the Java Memory
Model web site. 
> Confidence: Normal, Rank: Troubling (14)
> Pattern: LI_LAZY_INIT_STATIC 
> Type: LI, Category: MT_CORRECTNESS (Multithreaded correctness)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message