You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2022/09/28 15:54:05 UTC
[ofbiz-framework] 01/02: Fixed: [FB] Package org.apache.ofbiz.service (OFBIZ-9638)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit d40dda87fdc78a2f1c0e340f93ff79cf4164172c
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed Sep 28 17:48:54 2022 +0200
Fixed: [FB] Package org.apache.ofbiz.service (OFBIZ-9638)
I'm not sure how this error, found in stable demo log, can happen and I don't
want to dig deeper, so using a simple check.
2022-09-28 14:41:36,969 |7.0.0.1-18009-exec-7 |ScriptUtil
|W| Error running script at location
[component://webtools/groovyScripts/service/Services.groovy]:
java.lang.NullPointerException
java.lang.NullPointerException: null
at org.apache.ofbiz.service.RunningService.getEndStamp(RunningService.java:63)
I fixed both cases (end and start) but it seems it's only end that's the pb.
So I guess setEndStamp is not called sometimes in ServiceDispatcher::runSync
Note that it seems nothing bad happens except a trace in log
---
.../src/main/java/org/apache/ofbiz/service/RunningService.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/RunningService.java b/framework/service/src/main/java/org/apache/ofbiz/service/RunningService.java
index 33fc150650..7c285a8048 100644
--- a/framework/service/src/main/java/org/apache/ofbiz/service/RunningService.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/RunningService.java
@@ -72,7 +72,7 @@ public class RunningService {
* @return the start stamp
*/
public Timestamp getStartStamp() {
- return (Timestamp) this.startStamp.clone();
+ return (startStamp != null) ? (Timestamp) this.startStamp.clone() : null;
}
/**
@@ -80,7 +80,7 @@ public class RunningService {
* @return the end stamp
*/
public Timestamp getEndStamp() {
- return (Timestamp) this.endStamp.clone();
+ return (endStamp != null) ? (Timestamp) this.endStamp.clone() : null;
}
/**