You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Ralf Saier (JIRA)" <ji...@apache.org> on 2015/02/05 11:22:34 UTC

[jira] [Created] (BATIK-1107) CleanerThread may be started more than once

Ralf Saier created BATIK-1107:
---------------------------------

             Summary: CleanerThread may be started more than once
                 Key: BATIK-1107
                 URL: https://issues.apache.org/jira/browse/BATIK-1107
             Project: Batik
          Issue Type: Bug
    Affects Versions: 1.7, trunk
            Reporter: Ralf Saier


Due to wrong synchronized block in CleanerThread.getReferenceQueue, the Thread may be started more than once.
wrong:
        if ( queue == null ) {
            synchronized (CleanerThread.class) {
                queue = new ReferenceQueue();
                thread = new CleanerThread();
            }
        }
 
correct:
        synchronized (CleanerThread.class) {
            if ( queue == null ) {
                queue = new ReferenceQueue();
                thread = new CleanerThread();
            }
        }
 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org