svn commit: r1757962 - /ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1757962 - /ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java

Arun Patidar-4
Author: arunpatidar
Date: Sat Aug 27 07:56:48 2016
New Revision: 1757962

URL: http://svn.apache.org/viewvc?rev=1757962&view=rev
Log:
Applied patch from jira issue - OFBIZ-7911 - Enforce noninstantiability to TransactionUtil class. Thanks Rishi Solanki and Pratik Kulshreshth for your contribution.

Modified:
    ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java

Modified: ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java?rev=1757962&r1=1757961&r2=1757962&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java Sat Aug 27 07:56:48 2016
@@ -60,7 +60,7 @@ import org.apache.ofbiz.entity.jdbc.Curs
  * <p>Transaction Utility to help with some common transaction tasks
  * <p>Provides a wrapper around the transaction objects to allow for changes in underlying implementations in the future.
  */
-public class TransactionUtil implements Status {
+public final class TransactionUtil implements Status {
     // Debug module name
     public static final String module = TransactionUtil.class.getName();
 
@@ -79,6 +79,7 @@ public class TransactionUtil implements
     private static Map<Long, Exception> allThreadsTransactionBeginStack = Collections.<Long, Exception>synchronizedMap(new HashMap<Long, Exception>());
     private static Map<Long, List<Exception>> allThreadsTransactionBeginStackSave = Collections.<Long, List<Exception>>synchronizedMap(new HashMap<Long, List<Exception>>());
 
+    private TransactionUtil () {}
     public static <V> V doNewTransaction(Callable<V> callable, String ifErrorMessage, int timeout, boolean printException) throws GenericEntityException {
         return noTransaction(inTransaction(callable, ifErrorMessage, timeout, printException)).call();
     }