Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-02 Thread Rishi Solanki
Thanks! Rishi Solanki Sr. Manager, Enterprise Software Development HotWax Systems Pvt. Ltd. Direct: +91-9893287847 http://www.hotwaxsystems.com On Thu, Mar 2, 2017 at 3:10 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: > > > Le 02/03/2017 à 08:00, Rishi Solanki a écrit : > >> Thank

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-02 Thread Jacques Le Roux
Le 02/03/2017 à 08:00, Rishi Solanki a écrit : Thank you Wei, Jacques for your reply. What I was proposing to change method of WidgetWorker.getDelegator() method. I see whenever any form render the fields and requires delegator then it always tries to get delegator from WidgetWorker's

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-02 Thread Jacques Le Roux
Thanks Wei, Right, that's it. My patch does 1 and 2. 3 is another beast to tame... Jacques Le 02/03/2017 à 03:32, Wei Zhang a écrit : I think we need to do 3 things. 1. Catch GenericEntityException in EntityUtilProperties.getSystemPropertyValue() 2. Create a new Delegator if it is null in

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-01 Thread Rishi Solanki
Thank you Wei, Jacques for your reply. What I was proposing to change method of WidgetWorker.getDelegator() method. I see whenever any form render the fields and requires delegator then it always tries to get delegator from WidgetWorker's mentioned method. Please refer MacroFormRenederer class as

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-01 Thread Wei Zhang
I think we need to do 3 things. 1. Catch GenericEntityException in EntityUtilProperties.getSystemPropertyValue() 2. Create a new Delegator if it is null in EntityUtilProperties.getSystemPropertyValue() 3. Find out how to get a delegator instance in

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-03-01 Thread Jacques Le Roux
Thanks Rishi, Yes, good idea! What do you suggest we use for delegatorName? I guess "default"? Also for OFBIZ-9230 it should be rather -- Index:

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-02-28 Thread Rishi Solanki
+1 for using the GenericEntityException, we did similar effort in OFBIZ-7539. Also agree on Jacques concern that, we should also fix the NPE for delegator coming from HtmlFormMacroLibrary.ftl. So I think for now the fix provided in the mentioned ticket is fine OFBIZ-9230 and we should also use

Re: Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-02-28 Thread Jacques Le Roux
Thanks Wei, Please All, refer to OFBIZ-9230 to see how I temporarily handled the issue. I also agree that using GenericEntityException is better than just a permissive Exception But I believe we should rather fix the underlying issue I reported there. So I was hesitant to agree with Wei

Should not catch Exception in EntityUtilProperties.getSystemPropertyValue()

2017-02-27 Thread Wei Zhang
Hi, I found there is a try/catch block to catch Exception in EntityUtilProperties.getSystemPropertyValue(). Which will catche a NPE (delegator is null) when this method is called in framework/widget/templates/HtmlFormMacroLibrary.ftl but we only get a waring message in the log file. So I think