Fixed: Related to the issue OFBIZ-6401Connect OFBiz to a read only database
Escape null pointer exception stack trace when the helper return no value git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -254,7 +254,10 @@ public class VisitHandler {
|
||||
// looks like we have an ID that doesn't exist in our database, so we'll create a new one
|
||||
visitor = delegator.makeValue("Visitor");
|
||||
visitor = delegator.createSetNextSeqId(visitor);
|
||||
if (Debug.infoOn()) Debug.logInfo("The visitorId [" + cookieVisitorId + "] found in cookie was invalid, creating new Visitor with ID [" + visitor.getString("visitorId") + "]", module);
|
||||
if (Debug.infoOn()) {
|
||||
String visitorId = visitor != null ? visitor.getString("visitorId") : "empty visitor";
|
||||
Debug.logInfo("The visitorId [" + cookieVisitorId + "] found in cookie was invalid, creating new Visitor with ID [" + visitorId + "]", module);
|
||||
}
|
||||
}
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, "Error finding visitor with ID from cookie: " + cookieVisitorId, module);
|
||||
|
||||
Reference in New Issue
Block a user