Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Michael Brohl-3
During a migration I found that this bugfix was not backported to the
17.12 release branch.

Should I do it now?

Regards,

Michael Brohl

ecomify GmbH - www.ecomify.de


Am 03.04.18 um 15:06 schrieb [hidden email]:

> Author: mbrohl
> Date: Tue Apr  3 13:06:28 2018
> New Revision: 1828233
>
> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
> Log:
> Fixed: Prevent possible NullPointerException.
>
> Modified:
>      ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>
> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
> ==============================================================================
> --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java (original)
> +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java Tue Apr  3 13:06:28 2018
> @@ -210,8 +210,11 @@ public class FinAccountServices {
>               Timestamp now = UtilDateTime.nowTimestamp();
>  
>               // now use our values
> -            String finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
> -            inContext.put("finAccountCode", finAccountCode);
> +            String finAccountCode = null;
> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
> +                finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
> +                inContext.put("finAccountCode", finAccountCode);
> +            }
>  
>               // with pin codes, the account code becomes the ID and the pin becomes the code
>               if ("Y".equalsIgnoreCase(requirePinCode)) {
>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Pierre Smits-3
What is the relating JIRA ticket? I could not get it from the commit log.

Best regards,

Pierre Smits

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
*Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
since 2008*
Apache Steve <https://steve.apache.org>, committer


On Tue, Feb 4, 2020 at 12:23 PM Michael Brohl <[hidden email]>
wrote:

> During a migration I found that this bugfix was not backported to the
> 17.12 release branch.
>
> Should I do it now?
>
> Regards,
>
> Michael Brohl
>
> ecomify GmbH - www.ecomify.de
>
>
> Am 03.04.18 um 15:06 schrieb [hidden email]:
> > Author: mbrohl
> > Date: Tue Apr  3 13:06:28 2018
> > New Revision: 1828233
> >
> > URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
> > Log:
> > Fixed: Prevent possible NullPointerException.
> >
> > Modified:
> >
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >
> > Modified:
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> > URL:
> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
> >
> ==============================================================================
> > ---
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> (original)
> > +++
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> Tue Apr  3 13:06:28 2018
> > @@ -210,8 +210,11 @@ public class FinAccountServices {
> >               Timestamp now = UtilDateTime.nowTimestamp();
> >
> >               // now use our values
> > -            String finAccountCode =
> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> delegator);
> > -            inContext.put("finAccountCode", finAccountCode);
> > +            String finAccountCode = null;
> > +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
> > +                finAccountCode =
> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> delegator);
> > +                inContext.put("finAccountCode", finAccountCode);
> > +            }
> >
> >               // with pin codes, the account code becomes the ID and the
> pin becomes the code
> >               if ("Y".equalsIgnoreCase(requirePinCode)) {
> >
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Gil Portenseigne
In reply to this post by Michael Brohl-3
+1 for the fix.

On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:

> During a migration I found that this bugfix was not backported to the 17.12
> release branch.
>
> Should I do it now?
>
> Regards,
>
> Michael Brohl
>
> ecomify GmbH - www.ecomify.de
>
>
> Am 03.04.18 um 15:06 schrieb [hidden email]:
> > Author: mbrohl
> > Date: Tue Apr  3 13:06:28 2018
> > New Revision: 1828233
> >
> > URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
> > Log:
> > Fixed: Prevent possible NullPointerException.
> >
> > Modified:
> >      ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >
> > Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> > URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
> > ==============================================================================
> > --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java (original)
> > +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java Tue Apr  3 13:06:28 2018
> > @@ -210,8 +210,11 @@ public class FinAccountServices {
> >               Timestamp now = UtilDateTime.nowTimestamp();
> >               // now use our values
> > -            String finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
> > -            inContext.put("finAccountCode", finAccountCode);
> > +            String finAccountCode = null;
> > +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
> > +                finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
> > +                inContext.put("finAccountCode", finAccountCode);
> > +            }
> >               // with pin codes, the account code becomes the ID and the pin becomes the code
> >               if ("Y".equalsIgnoreCase(requirePinCode)) {
> >
> >
>


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Michael Brohl-3
Hi all,

thanks for the feedbacks. I created a Jira at
https://issues.apache.org/jira/browse/OFBIZ-11341

I noticed that this is also present in the 16.11 release branch. Should
it be backported there also?

If not, do we have a standard way to provide fixes for old releases
which might not be released anymore? One way could be to provide the
patch in Jira.

Thanks,

Michael


Am 04.02.20 um 20:32 schrieb Gil Portenseigne:

> +1 for the fix.
>
> On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:
>> During a migration I found that this bugfix was not backported to the 17.12
>> release branch.
>>
>> Should I do it now?
>>
>> Regards,
>>
>> Michael Brohl
>>
>> ecomify GmbH - www.ecomify.de
>>
>>
>> Am 03.04.18 um 15:06 schrieb [hidden email]:
>>> Author: mbrohl
>>> Date: Tue Apr  3 13:06:28 2018
>>> New Revision: 1828233
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
>>> Log:
>>> Fixed: Prevent possible NullPointerException.
>>>
>>> Modified:
>>>       ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
>>> ==============================================================================
>>> --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java (original)
>>> +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java Tue Apr  3 13:06:28 2018
>>> @@ -210,8 +210,11 @@ public class FinAccountServices {
>>>                Timestamp now = UtilDateTime.nowTimestamp();
>>>                // now use our values
>>> -            String finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
>>> -            inContext.put("finAccountCode", finAccountCode);
>>> +            String finAccountCode = null;
>>> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
>>> +                finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
>>> +                inContext.put("finAccountCode", finAccountCode);
>>> +            }
>>>                // with pin codes, the account code becomes the ID and the pin becomes the code
>>>                if ("Y".equalsIgnoreCase(requirePinCode)) {
>>>
>>>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Jacques Le Roux
Administrator
Hi Michael,

I have just backported it in R16. I think a patch in Jira with an explznation there would be also helpful

Thanks

Jacques

Le 06/02/2020 à 08:57, Michael Brohl a écrit :

> Hi all,
>
> thanks for the feedbacks. I created a Jira at https://issues.apache.org/jira/browse/OFBIZ-11341
>
> I noticed that this is also present in the 16.11 release branch. Should it be backported there also?
>
> If not, do we have a standard way to provide fixes for old releases which might not be released anymore? One way could be to provide the patch in Jira.
>
> Thanks,
>
> Michael
>
>
> Am 04.02.20 um 20:32 schrieb Gil Portenseigne:
>> +1 for the fix.
>>
>> On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:
>>> During a migration I found that this bugfix was not backported to the 17.12
>>> release branch.
>>>
>>> Should I do it now?
>>>
>>> Regards,
>>>
>>> Michael Brohl
>>>
>>> ecomify GmbH - www.ecomify.de
>>>
>>>
>>> Am 03.04.18 um 15:06 schrieb [hidden email]:
>>>> Author: mbrohl
>>>> Date: Tue Apr  3 13:06:28 2018
>>>> New Revision: 1828233
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
>>>> Log:
>>>> Fixed: Prevent possible NullPointerException.
>>>>
>>>> Modified:
>>>> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>>>
>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
>>>> ==============================================================================
>>>> --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java (original)
>>>> +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java Tue Apr  3
>>>> 13:06:28 2018
>>>> @@ -210,8 +210,11 @@ public class FinAccountServices {
>>>>                Timestamp now = UtilDateTime.nowTimestamp();
>>>>                // now use our values
>>>> -            String finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
>>>> -            inContext.put("finAccountCode", finAccountCode);
>>>> +            String finAccountCode = null;
>>>> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
>>>> +                finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
>>>> +                inContext.put("finAccountCode", finAccountCode);
>>>> +            }
>>>>                // with pin codes, the account code becomes the ID and the pin becomes the code
>>>>                if ("Y".equalsIgnoreCase(requirePinCode)) {
>>>>
>>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Pierre Smits-3
IMO, getting patches (either through files attached or through commits)  in
a branch in a repo is a decision in the hands of the individual community
member.

How the project deals with that to ensure that its adopters stay happy is
another issue. The project may say: we're happy with our committer
incorporating those changes into branches of our official repository, but
we're not going to put out releases from that  discontinued - branch
anymore. As a result from moving on.

Best regards,

Pierre Smits

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
*Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
since 2008*
Apache Steve <https://steve.apache.org>, committer


On Sat, Feb 8, 2020 at 11:07 AM Jacques Le Roux <
[hidden email]> wrote:

> Hi Michael,
>
> I have just backported it in R16. I think a patch in Jira with an
> explznation there would be also helpful
>
> Thanks
>
> Jacques
>
> Le 06/02/2020 à 08:57, Michael Brohl a écrit :
> > Hi all,
> >
> > thanks for the feedbacks. I created a Jira at
> https://issues.apache.org/jira/browse/OFBIZ-11341
> >
> > I noticed that this is also present in the 16.11 release branch. Should
> it be backported there also?
> >
> > If not, do we have a standard way to provide fixes for old releases
> which might not be released anymore? One way could be to provide the patch
> in Jira.
> >
> > Thanks,
> >
> > Michael
> >
> >
> > Am 04.02.20 um 20:32 schrieb Gil Portenseigne:
> >> +1 for the fix.
> >>
> >> On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:
> >>> During a migration I found that this bugfix was not backported to the
> 17.12
> >>> release branch.
> >>>
> >>> Should I do it now?
> >>>
> >>> Regards,
> >>>
> >>> Michael Brohl
> >>>
> >>> ecomify GmbH - www.ecomify.de
> >>>
> >>>
> >>> Am 03.04.18 um 15:06 schrieb [hidden email]:
> >>>> Author: mbrohl
> >>>> Date: Tue Apr  3 13:06:28 2018
> >>>> New Revision: 1828233
> >>>>
> >>>> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
> >>>> Log:
> >>>> Fixed: Prevent possible NullPointerException.
> >>>>
> >>>> Modified:
> >>>>
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >>>>
> >>>> Modified:
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >>>> URL:
> >>>>
> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
> >>>>
> ==============================================================================
> >>>> ---
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> (original)
> >>>> +++
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> Tue Apr  3
> >>>> 13:06:28 2018
> >>>> @@ -210,8 +210,11 @@ public class FinAccountServices {
> >>>>                Timestamp now = UtilDateTime.nowTimestamp();
> >>>>                // now use our values
> >>>> -            String finAccountCode =
> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> delegator);
> >>>> -            inContext.put("finAccountCode", finAccountCode);
> >>>> +            String finAccountCode = null;
> >>>> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
> >>>> +                finAccountCode =
> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> delegator);
> >>>> +                inContext.put("finAccountCode", finAccountCode);
> >>>> +            }
> >>>>                // with pin codes, the account code becomes the ID and
> the pin becomes the code
> >>>>                if ("Y".equalsIgnoreCase(requirePinCode)) {
> >>>>
> >>>>
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Jacques Le Roux
Administrator
Yes, that's it. I think we already agreed upon (somehow) that. It's not written prominently anywhere, just in  the deep of this ML, like this message
will be one day. How to find it back is another story...

Jacques

Le 08/02/2020 à 12:10, Pierre Smits a écrit :

> IMO, getting patches (either through files attached or through commits)  in
> a branch in a repo is a decision in the hands of the individual community
> member.
>
> How the project deals with that to ensure that its adopters stay happy is
> another issue. The project may say: we're happy with our committer
> incorporating those changes into branches of our official repository, but
> we're not going to put out releases from that  discontinued - branch
> anymore. As a result from moving on.
>
> Best regards,
>
> Pierre Smits
>
> *Apache Trafodion <https://trafodion.apache.org>, Vice President*
> *Apache Directory <https://directory.apache.org>, PMC Member*
> Apache Incubator <https://incubator.apache.org>, committer
> *Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
> since 2008*
> Apache Steve <https://steve.apache.org>, committer
>
>
> On Sat, Feb 8, 2020 at 11:07 AM Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Michael,
>>
>> I have just backported it in R16. I think a patch in Jira with an
>> explznation there would be also helpful
>>
>> Thanks
>>
>> Jacques
>>
>> Le 06/02/2020 à 08:57, Michael Brohl a écrit :
>>> Hi all,
>>>
>>> thanks for the feedbacks. I created a Jira at
>> https://issues.apache.org/jira/browse/OFBIZ-11341
>>> I noticed that this is also present in the 16.11 release branch. Should
>> it be backported there also?
>>> If not, do we have a standard way to provide fixes for old releases
>> which might not be released anymore? One way could be to provide the patch
>> in Jira.
>>> Thanks,
>>>
>>> Michael
>>>
>>>
>>> Am 04.02.20 um 20:32 schrieb Gil Portenseigne:
>>>> +1 for the fix.
>>>>
>>>> On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:
>>>>> During a migration I found that this bugfix was not backported to the
>> 17.12
>>>>> release branch.
>>>>>
>>>>> Should I do it now?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Michael Brohl
>>>>>
>>>>> ecomify GmbH - www.ecomify.de
>>>>>
>>>>>
>>>>> Am 03.04.18 um 15:06 schrieb [hidden email]:
>>>>>> Author: mbrohl
>>>>>> Date: Tue Apr  3 13:06:28 2018
>>>>>> New Revision: 1828233
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
>>>>>> Log:
>>>>>> Fixed: Prevent possible NullPointerException.
>>>>>>
>>>>>> Modified:
>>>>>>
>> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>>>>> Modified:
>> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>>>>>> URL:
>>>>>>
>> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
>> ==============================================================================
>>>>>> ---
>> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>> (original)
>>>>>> +++
>> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
>> Tue Apr  3
>>>>>> 13:06:28 2018
>>>>>> @@ -210,8 +210,11 @@ public class FinAccountServices {
>>>>>>                 Timestamp now = UtilDateTime.nowTimestamp();
>>>>>>                 // now use our values
>>>>>> -            String finAccountCode =
>> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
>> delegator);
>>>>>> -            inContext.put("finAccountCode", finAccountCode);
>>>>>> +            String finAccountCode = null;
>>>>>> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
>>>>>> +                finAccountCode =
>> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
>> delegator);
>>>>>> +                inContext.put("finAccountCode", finAccountCode);
>>>>>> +            }
>>>>>>                 // with pin codes, the account code becomes the ID and
>> the pin becomes the code
>>>>>>                 if ("Y".equalsIgnoreCase(requirePinCode)) {
>>>>>>
>>>>>>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1828233 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Pierre Smits-3
Jacques,

I guess that we have difficulties finding aspects where there is consensus,
is because the viewpoint of many participating in the project is like
'having it in the ml is good enough'. It is not!

When there is a consensus on something (or the outcome of a vote is known),
it should be noted in a maintained page. A simple overviews of such
resolutions could suffice (with a reference to the underlying thread(s).

Best regards,

Pierre Smits

*Apache Trafodion <https://trafodion.apache.org>, Vice President*
*Apache Directory <https://directory.apache.org>, PMC Member*
Apache Incubator <https://incubator.apache.org>, committer
*Apache OFBiz <https://ofbiz.apache.org>, contributor (without privileges)
since 2008*
Apache Steve <https://steve.apache.org>, committer


On Sat, Feb 8, 2020 at 1:46 PM Jacques Le Roux <[hidden email]>
wrote:

> Yes, that's it. I think we already agreed upon (somehow) that. It's not
> written prominently anywhere, just in  the deep of this ML, like this
> message
> will be one day. How to find it back is another story...
>
> Jacques
>
> Le 08/02/2020 à 12:10, Pierre Smits a écrit :
> > IMO, getting patches (either through files attached or through commits)
> in
> > a branch in a repo is a decision in the hands of the individual community
> > member.
> >
> > How the project deals with that to ensure that its adopters stay happy is
> > another issue. The project may say: we're happy with our committer
> > incorporating those changes into branches of our official repository, but
> > we're not going to put out releases from that  discontinued - branch
> > anymore. As a result from moving on.
> >
> > Best regards,
> >
> > Pierre Smits
> >
> > *Apache Trafodion <https://trafodion.apache.org>, Vice President*
> > *Apache Directory <https://directory.apache.org>, PMC Member*
> > Apache Incubator <https://incubator.apache.org>, committer
> > *Apache OFBiz <https://ofbiz.apache.org>, contributor (without
> privileges)
> > since 2008*
> > Apache Steve <https://steve.apache.org>, committer
> >
> >
> > On Sat, Feb 8, 2020 at 11:07 AM Jacques Le Roux <
> > [hidden email]> wrote:
> >
> >> Hi Michael,
> >>
> >> I have just backported it in R16. I think a patch in Jira with an
> >> explznation there would be also helpful
> >>
> >> Thanks
> >>
> >> Jacques
> >>
> >> Le 06/02/2020 à 08:57, Michael Brohl a écrit :
> >>> Hi all,
> >>>
> >>> thanks for the feedbacks. I created a Jira at
> >> https://issues.apache.org/jira/browse/OFBIZ-11341
> >>> I noticed that this is also present in the 16.11 release branch. Should
> >> it be backported there also?
> >>> If not, do we have a standard way to provide fixes for old releases
> >> which might not be released anymore? One way could be to provide the
> patch
> >> in Jira.
> >>> Thanks,
> >>>
> >>> Michael
> >>>
> >>>
> >>> Am 04.02.20 um 20:32 schrieb Gil Portenseigne:
> >>>> +1 for the fix.
> >>>>
> >>>> On Tue, Feb 04, 2020 at 12:22:48PM +0100, Michael Brohl wrote:
> >>>>> During a migration I found that this bugfix was not backported to the
> >> 17.12
> >>>>> release branch.
> >>>>>
> >>>>> Should I do it now?
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Michael Brohl
> >>>>>
> >>>>> ecomify GmbH - www.ecomify.de
> >>>>>
> >>>>>
> >>>>> Am 03.04.18 um 15:06 schrieb [hidden email]:
> >>>>>> Author: mbrohl
> >>>>>> Date: Tue Apr  3 13:06:28 2018
> >>>>>> New Revision: 1828233
> >>>>>>
> >>>>>> URL: http://svn.apache.org/viewvc?rev=1828233&view=rev
> >>>>>> Log:
> >>>>>> Fixed: Prevent possible NullPointerException.
> >>>>>>
> >>>>>> Modified:
> >>>>>>
> >>
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >>>>>> Modified:
> >>
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >>>>>> URL:
> >>>>>>
> >>
> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1828233&r1=1828232&r2=1828233&view=diff
> >>
> ==============================================================================
> >>>>>> ---
> >>
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >> (original)
> >>>>>> +++
> >>
> ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
> >> Tue Apr  3
> >>>>>> 13:06:28 2018
> >>>>>> @@ -210,8 +210,11 @@ public class FinAccountServices {
> >>>>>>                 Timestamp now = UtilDateTime.nowTimestamp();
> >>>>>>                 // now use our values
> >>>>>> -            String finAccountCode =
> >> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> >> delegator);
> >>>>>> -            inContext.put("finAccountCode", finAccountCode);
> >>>>>> +            String finAccountCode = null;
> >>>>>> +            if (UtilValidate.isNotEmpty(accountCodeLength)) {
> >>>>>> +                finAccountCode =
> >> FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(),
> >> delegator);
> >>>>>> +                inContext.put("finAccountCode", finAccountCode);
> >>>>>> +            }
> >>>>>>                 // with pin codes, the account code becomes the ID
> and
> >> the pin becomes the code
> >>>>>>                 if ("Y".equalsIgnoreCase(requirePinCode)) {
> >>>>>>
> >>>>>>
>