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 2020/06/18 15:54:45 UTC
[ofbiz-framework] branch release18.12 updated: Fixed:
getEntityRefData service has a weird issue (OFBIZ-11401)
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 1e5ffa6 Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
1e5ffa6 is described below
commit 1e5ffa6e4c5cbf1dacf8d6d8602d1a6d497e4f5a
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Thu Jun 18 17:34:18 2020 +0200
Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
It's reproductible on trunk demo though only visible in log, UI shows no issue
R17 and R18 are also affected, R16 is OK.
Ankush: This stacktrace should be coming for all entities where
default-resource-name is defined on entity definition but no property exist in
defined resource for key EntityDescription.entityname and FieldDescription.field.
As we want to have these entity labels as much as possible, we can simply print
warning about the missing entity descriptions and field descriptions for
readability purpose instead of printing huge exceptions stacktrace.
Thanks: Ankush Upadhyay and Pierre Smits for the help
Conflicts handled by hand (swallowing exceptions is lazy and bad :p)
---
.../java/org/apache/ofbiz/webtools/WebToolsServices.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
index 473b899..5efb468 100644
--- a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
+++ b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java
@@ -663,7 +663,9 @@ public class WebToolsServices {
if (bundle != null) {
try {
entityDescription = bundle.getString("EntityDescription." + entity.getEntityName());
- } catch (Exception exception) {}
+ } catch (Exception exception) {
+ Debug.logWarning("EntityDescription for entity " + entity.getEntityName() + " is missing", MODULE);
+ }
}
if (UtilValidate.isEmpty(entityDescription)) {
entityDescription = entity.getDescription();
@@ -682,7 +684,10 @@ public class WebToolsServices {
if (bundle != null) {
try {
fieldDescription = bundle.getString("FieldDescription." + entity.getEntityName() + "." + field.getName());
- } catch (Exception exception) {}
+ } catch (Exception exception) {
+ Debug.logWarning("FieldDescription for entity.field " + entity.getEntityName() + "."
+ + field.getName() + " is missing", MODULE);
+ }
}
if (UtilValidate.isEmpty(fieldDescription)) {
fieldDescription = field.getDescription();
@@ -690,7 +695,9 @@ public class WebToolsServices {
if (UtilValidate.isEmpty(fieldDescription) && bundle != null) {
try {
fieldDescription = bundle.getString("FieldDescription." + field.getName());
- } catch (Exception exception) {}
+ } catch (Exception exception) {
+ Debug.logWarning("FieldDescription for field " + field.getName() + " is missing", MODULE);
+ }
}
if (UtilValidate.isEmpty(fieldDescription)) {
fieldDescription = ModelUtil.javaNameToDbName(field.getName()).toLowerCase();