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/02/08 10:04:45 UTC

svn commit: r1873777 - in /ofbiz/branches/release16.11: ./ applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Author: jleroux
Date: Sat Feb  8 10:04:45 2020
New Revision: 1873777

URL: http://svn.apache.org/viewvc?rev=1873777&view=rev
Log:
"Applied fix from trunk framework for revision: 1828233" 
------------------------------------------------------------------------
r1828233 | mbrohl | 2018-04-03 15:06:28 +0200 (mar. 03 avr. 2018) | 1 ligne

Fixed: Prevent possible NullPointerException.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release16.11/   (props changed)
    ofbiz/branches/release16.11/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java

Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
  Merged /ofbiz/ofbiz-framework/trunk:r1828233

Modified: ofbiz/branches/release16.11/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1873777&r1=1873776&r2=1873777&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java (original)
+++ ofbiz/branches/release16.11/applications/accounting/src/main/java/org/apache/ofbiz/accounting/finaccount/FinAccountServices.java Sat Feb  8 10:04:45 2020
@@ -204,8 +204,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)) {