This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 1550c15d92 Fixed: [FB] Package org.apache.ofbiz.service (OFBIZ-9638)
1550c15d92 is described below

commit 1550c15d92ba924133707a12044135f8c5c52b04
Author: Jacques Le Roux <jacques.le.r...@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 43eca07d89..9eb9ade1f0 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
@@ -56,11 +56,11 @@ public class RunningService {
     }
 
     public Timestamp getStartStamp() {
-        return (Timestamp) this.startStamp.clone();
+        return (startStamp != null) ? (Timestamp) this.startStamp.clone() : 
null;
     }
 
     public Timestamp getEndStamp() {
-        return (Timestamp) this.endStamp.clone();
+        return (endStamp != null) ? (Timestamp) this.endStamp.clone() : null;
     }
 
     public void setEndStamp() {

Reply via email to