You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2012/06/09 05:44:44 UTC

svn commit: r1348314 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java

Author: tfischer
Date: Sat Jun  9 03:44:43 2012
New Revision: 1348314

URL: http://svn.apache.org/viewvc?rev=1348314&view=rev
Log:
fix synchronization issue found by findbugs

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java?rev=1348314&r1=1348313&r2=1348314&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java Sat Jun  9 03:44:43 2012
@@ -100,7 +100,7 @@ public final class Torque
      *
      * @return Our singleton.
      */
-    public static TorqueInstance getInstance()
+    public static synchronized TorqueInstance getInstance()
     {
         if (torqueSingleton == null)
         {



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


Re: svn commit: r1348314 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java

Posted by Thomas Fox <Th...@seitenbau.net>.

Thomas Vandahl wrote:

>On 09.06.12 05:44, tfischer@apache.org wrote:
> -    public static TorqueInstance getInstance()
> +    public static synchronized TorqueInstance getInstance()

Yikes. This is tough. Are you absolutely sure this is necessary?

No, thinking again about it, it is not necessary from a practical point of
view.
I was mislead by the synchronized setter of TorqueInstance.
I have removed the synchronization from both the getter and the setter
(r1348578).

   Thanks for noting,

        Thomas


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


Re: svn commit: r1348314 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java

Posted by Thomas Vandahl <tv...@apache.org>.
On 09.06.12 05:44, tfischer@apache.org wrote:
> -    public static TorqueInstance getInstance()
> +    public static synchronized TorqueInstance getInstance()

Yikes. This is tough. Are you absolutely sure this is necessary?

Bye, Thomas.


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