Author: mbrohl
Date: Sun Dec 17 13:44:14 2017
New Revision: 1818485
URL:
http://svn.apache.org/viewvc?rev=1818485&view=revLog:
Improved: General refactoring and code improvements, package
org.apache.ofbiz.service.semaphore.
(OFBIZ-9945)
Thanks Dennis Balkir for reporting and providing the patch.
Modified:
ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/semaphore/ServiceSemaphore.java
Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/semaphore/ServiceSemaphore.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/semaphore/ServiceSemaphore.java?rev=1818485&r1=1818484&r2=1818485&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/semaphore/ServiceSemaphore.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/semaphore/ServiceSemaphore.java Sun Dec 17 13:44:14 2017
@@ -61,7 +61,9 @@ public class ServiceSemaphore {
}
public void acquire() throws SemaphoreWaitException, SemaphoreFailException {
- if (mode == SEMAPHORE_MODE_NONE) return;
+ if (mode == SEMAPHORE_MODE_NONE) {
+ return;
+ }
lockTime = UtilDateTime.nowTimestamp();
@@ -71,7 +73,9 @@ public class ServiceSemaphore {
}
public synchronized void release() throws SemaphoreFailException {
- if (mode == SEMAPHORE_MODE_NONE) return;
+ if (mode == SEMAPHORE_MODE_NONE) {
+ return;
+ }
// remove the lock file
if (lock != null) {