From 3e7e7db27b896e8ebb629e9b789bd05241fecdbf Mon Sep 17 00:00:00 2001 From: Arun Patidar Date: Sat, 27 Aug 2016 07:56:48 +0000 Subject: [PATCH] Applied patch from jira issue - OFBIZ-7911 - Enforce noninstantiability to TransactionUtil class. Thanks Rishi Solanki and Pratik Kulshreshth for your contribution. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757962 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/ofbiz/entity/transaction/TransactionUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java index 2667264642..d0b05132a5 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java @@ -60,7 +60,7 @@ import org.apache.ofbiz.entity.jdbc.CursorConnection; *

Transaction Utility to help with some common transaction tasks *

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 Status { private static Map allThreadsTransactionBeginStack = Collections.synchronizedMap(new HashMap()); private static Map> allThreadsTransactionBeginStackSave = Collections.>synchronizedMap(new HashMap>()); + private TransactionUtil () {} public static V doNewTransaction(Callable callable, String ifErrorMessage, int timeout, boolean printException) throws GenericEntityException { return noTransaction(inTransaction(callable, ifErrorMessage, timeout, printException)).call(); }