Re: (ofbiz-framework) branch trunk updated: Fixed: PartyFinancialHistory shows parentTypeId of invoice, not invoiceTypeId (OFBIZ-13068)

2024-05-30 Thread Jacques Le Roux

Hi Deepak,

Yes you are right, /parentPaymentType/ is useless and cache on InvoiceType 
would be better.

The idea is we get no information on the invoice type with the previous (old) situation. With other columns, we already know it's an invoice as can be 
seen at

https://demo-trunk.ofbiz.apache.org/partymgr/control/PartyFinancialHistory?partyId=AcctBigSupplier
But I then missed to remove useless parentInvoiceType DB retrievings. I'll 
remove them.

In "Invoices not yet (fully) applied", I'll also re-add the invoice description 
list as it was present before.

Finally , there is no need for changes in ListInvoicesApplPayments form.

I'll improve all that.

Thanks for your review and help, much appreciated.

Jacques

Le 30/05/2024 à 12:01, Deepak Dixit a écrit :

Hi Jacques,

I didn't get the logic behind this commit.
{code}
 
+            
+            
+            
+        



+            
         


{code}


Why are we fetching parentPaymentType?
As we are using paymentType.description for display, same as other fields as 
well.
This is not used anywhere in the code. Ideally we should use the cache as well, 
as type data does not change.

Please correct me if I am missing something!!
It'd be good to revert this commit.

Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org <http://ofbiz.apache.org>


On Thu, May 30, 2024 at 3:03 PM  wrote:

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6718c4645d Fixed: PartyFinancialHistory shows parentTypeId of 
invoice, not invoiceTypeId (OFBIZ-13068)
6718c4645d is described below

commit 6718c4645dba7195317de3084cf2a24116f7dfdc
    Author: Jacques Le Roux 
AuthorDate: Thu May 30 11:33:08 2024 +0200

    Fixed: PartyFinancialHistory shows parentTypeId of invoice, not 
invoiceTypeId (OFBIZ-13068)

    This fixes an old bug (at least 8 years)
---
 applications/party/widget/partymgr/PartyForms.xml | 36 
+++
 1 file changed, 23 insertions(+), 13 deletions(-)

diff --git a/applications/party/widget/partymgr/PartyForms.xml 
b/applications/party/widget/partymgr/PartyForms.xml
index 7ba6d88410..4eaa195d72 100644
--- a/applications/party/widget/partymgr/PartyForms.xml
+++ b/applications/party/widget/partymgr/PartyForms.xml
@@ -1099,6 +1099,9 @@ under the License.
             
             
             
+            
+            
+            
         
         
             
@@ -1107,7 +1110,9 @@ under the License.
                 
             
         
-        
+        
+            
+        
         
         
         
@@ -1131,15 +1136,18 @@ under the License.
             
             
         
+        
+            
+            
+            
+        
         
-            
-                
-                    
-                
-            
+            
+                
+            
         
-        
-            
+        
+            
         
         
         
@@ -1153,6 +1161,11 @@ under the License.
             
             
         
+        
+            
+            
+            
+        
         
         
             
@@ -1162,11 +1175,8 @@ under the License.
             
         
         
-        
-            
-        
-        
-            
+        
+            
         
         
         


Re: (ofbiz-framework) branch trunk updated: Improved: FACILITY- Move from hard-coded menu location to parameterized (OFBIZ-12976) (#758)

2024-04-18 Thread Jacques Le Roux

Hi,

Just FYI: I inadvertently pushed /webapp/common-theme/js/package-lock.json 
which was part of Pierre's PR. It uses lockfileVersion 3.

So it was build with npm 9* which is "Backwards compatible to npm v7." Actually it's also "Backwards compatible to v1 lockfiles as I experienced 
(using Win7 I stuck with Node.js v13.14.0 hence npm 8.1.0)


* https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json

Jacques

Le 17/04/2024 à 17:24, jler...@apache.org a écrit :

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repositoryhttps://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
  new 98d2b78bec Improved: FACILITY- Move from hard-coded menu location to 
parameterized (OFBIZ-12976) (#758)
98d2b78bec is described below

commit 98d2b78bece10ac2ddea7e75bcb66dd4aa7276fc
Author: Pierre Smits
AuthorDate: Wed Apr 17 17:24:49 2024 +0200

 Improved: FACILITY- Move from hard-coded menu location to parameterized 
(OFBIZ-12976) (#758)
 
 Improved: FACILITY- Move from hard-coded menu location to parameterized (OFBIZ-12976)
 
 Move the menu location in the various facility screens from hard-coded to parameterized.
 
 modified: CommonScreens.xml, FacilityGroupScreens.xml, FacilityScreens.xml

 changed location of various menus from hard-coded to parameterized
 
 modified:

 - FacilitiesMenus.xml: added menus re shipment
 - ShipmentScreens.xml: changed location of menus from hard-coded to 
parameterized
 
 Improved: Move the menu location in the various facility screens from hard-coded to parameterized. (OFBIZ-12976)
 
 removed: ShipmentMenus.xml

---
  .../product/widget/facility/FacilityMenus.xml  | 128 +
  .../facility/ShipmentGatewayConfigScreens.xml  |   2 +-
  .../product/widget/facility/ShipmentMenus.xml  | 152 -
  .../product/widget/facility/ShipmentScreens.xml|   4 +-
  .../webapp/common-theme/js/package-lock.json   |  81 ---
  5 files changed, 191 insertions(+), 176 deletions(-)

diff --git a/applications/product/widget/facility/FacilityMenus.xml 
b/applications/product/widget/facility/FacilityMenus.xml
index 2661f121fc..b97e881d06 100644
--- a/applications/product/widget/facility/FacilityMenus.xml
+++ b/applications/product/widget/facility/FacilityMenus.xml
@@ -318,5 +318,133 @@ under the License.
  
  
  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
  
  
diff --git 
a/applications/product/widget/facility/ShipmentGatewayConfigScreens.xml 
b/applications/product/widget/facility/ShipmentGatewayConfigScreens.xml
index 7b3f2a812e..2458d9f385 100644
--- a/applications/product/widget/facility/ShipmentGatewayConfigScreens.xml
+++ b/applications/product/widget/facility/ShipmentGatewayConfigScreens.xml
@@ -29,7 +29,7 @@ under the License.
  
  
  
-
+
  
  
  
diff --git 

Re: (ofbiz-framework) branch trunk updated: Improved: Agreement Roles - VIEW permissions (OFBIZ-12518) (#471)

2024-04-14 Thread Jacques Le Roux

Error in commit message, replace
Note that anyway even and admin could not create an agreement role, see https://issues.apache.org/jira/browse/OFBIZ-12518. I guess it's due to the 
change to entity-auto, did not dig deeper. by Note that anyway even and admin could not create an agreement role, see 
https://issues.apache.org/jira/browse/OFBIZ-13021. I guess it's due to the change to entity-auto, did not dig deeper.


Jacques

Le 14/04/2024 à 09:11, jler...@apache.org a écrit :

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repositoryhttps://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
  new f6a2af5be6 Improved: Agreement Roles - VIEW permissions (OFBIZ-12518) 
(#471)
f6a2af5be6 is described below

commit f6a2af5be6b3975d394352308d32368714d3621e
Author: Pierre Smits
AuthorDate: Sun Apr 14 09:11:45 2024 +0200

 Improved: Agreement Roles - VIEW permissions (OFBIZ-12518) (#471)
 
 * Improved: Agreement Roles - VIEW permissions (OFBIZ-12518)

 Currently, a user with only 'VIEW' permissions, as demonstrated in trunk 
demo with userId = auditor, accessing the Agreement Roles screen, sees editable 
fields and/or triggers (to requests) reserved for users with 'CREATE' or 
'UPDATE' permissions.
 
 To see/test:https://localhost:8443/accounting/control/EditAgreementRoles?agreementId=8000
 
 modified:

 - AgreementScreens.xml - restructured screen EditAgreementRoles to work 
with permissions
 - AgreementForms.xml - added grid AgreementRoles for users with VIEW 
permissions
 additional cleanup
 
 * Update AgreementForms.xml
 
 -
 
 Co-authored-by: Jacques Le Roux

 Respectively replaces labels CommonParty and CommonRole by PartyPartyId 
and PartyRoleTypeId
 
 Note that anyway even and admin could not create an agreement role, seehttps://issues.apache.org/jira/browse/OFBIZ-12518. I guess it's due to the change to entity-auto, did not dig deeper.

---
  applications/accounting/widget/AgreementForms.xml  | 25 ++--
  .../accounting/widget/AgreementScreens.xml | 34 +-
  2 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/applications/accounting/widget/AgreementForms.xml 
b/applications/accounting/widget/AgreementForms.xml
index 09332f065f..247d57bba4 100644
--- a/applications/accounting/widget/AgreementForms.xml
+++ b/applications/accounting/widget/AgreementForms.xml
@@ -729,18 +729,25 @@ under the License.
  
  
  
-
-
-
-
-
-
-
  
  
-
-
+
+
+
+
+
+
+
+
+
+
+
+
  
  
  
diff --git a/applications/accounting/widget/AgreementScreens.xml 
b/applications/accounting/widget/AgreementScreens.xml
index 4c3bf9d098..eb0095963d 100644
--- a/applications/accounting/widget/AgreementScreens.xml
+++ b/applications/accounting/widget/AgreementScreens.xml
@@ -873,21 +873,39 @@ under the License.
  
  
  
-
  
  
+
+
+
+
  
  
  
  
-
-
-
+
+
+
+
+
+
+
+
+
+
+
  
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
  
  
  


Re: [ofbiz-plugins] branch trunk updated: Improved: "auth" should be true for all the request url used for Application components

2020-03-16 Thread Jacques Le Roux

Hi Deepak,

Yes, I wondered about that too, but in which case/s do you think 
getAssociatedStateList can be requested w/o being authenticated?

Thanks

Jacques

Le 16/03/2020 à 06:49, Deepak Dixit a écrit :

Hi Jacques,

I think we can't make auth true for getAssociatedStateList, this will break the 
anon checkout flow.

Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org <http://ofbiz.apache.org>


On Sat, Mar 14, 2020 at 1:19 PM mailto:jler...@apache.org>> wrote:

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e72e134  Improved: "auth" should be true for all the request url 
used for Application components
e72e134 is described below

commit e72e1348c13f892cfbd3ffdb78f536c4e4aa6b68
    Author: Jacques Le Roux mailto:jacques.le.r...@les7arts.com>>
AuthorDate: Sat Mar 14 08:49:54 2020 +0100

    Improved: "auth" should be true for all the request url used for 
Application
    components

    (OFBIZ-4956)

    Currently there are some URLs present in application components with
    auth="false". So anyone can hit these URLs and access these resources 
without
    authorization.

    I think all the URLs should be secure with auth="true"

    Thanks: Amardeep Singh Jhajj for report and initial fix
---
 ecommerce/webapp/ecommerce/WEB-INF/controller.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecommerce/webapp/ecommerce/WEB-INF/controller.xml 
b/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
index 5f7031c..27a0383 100644
--- a/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
+++ b/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
@@ -1605,7 +1605,7 @@ under the License.
     

     
-        
+        
         
         
         



Re: [ofbiz-site] branch master updated: Publish did not work, keep it as simple as possible. I guess I should use " whoami: master" but it does not make much sense to me

2019-12-12 Thread Jacques Le Roux

Worked: remote: Publishing contents at https://ofbiz.apache.org/ ...
:)

Jacques

Le 12/12/2019 à 10:11, jler...@apache.org a écrit :

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ofbiz-site.git


The following commit(s) were added to refs/heads/master by this push:
  new e4ffb99  Publish did not work, keep it as simple as possible. I guess I should 
use "  whoami:  master" but it does not make much sense to me
e4ffb99 is described below

commit e4ffb9914563928d362d616e07d290da11cfddf2
Author: Jacques Le Roux 
AuthorDate: Thu Dec 12 10:11:50 2019 +0100

 Publish did not work, keep it as simple as possible.
 I guess I should use "  whoami:  master" but it does not make much sense 
to me
---
  .asf.yaml | 1 -
  1 file changed, 1 deletion(-)

diff --git a/.asf.yaml b/.asf.yaml
index d52521b..6de7e2b 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,4 +1,3 @@
  # Publishing profile for ofbiz-site.git:
  
  publish:

-  whoami:  ofbiz-site
\ No newline at end of file




Re: [ofbiz-plugins] branch trunk updated: Fixed: double forward slashes in ecommerce emails (OFBIZ-2618)

2019-11-10 Thread Jacques Le Roux
Too bad, because using Svn in Github here I changed the EOL to LF by hand. But I then crossed an issue with credential to use to commit to Git through 
svn. It's not a simple thing, you need to pass a token[1]. Somehow in the meantime "something happened" and my EOL conversion was lost, sorry for that.


Though it's unrelated this remind me that we need to do: 
https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings

I created OFBIZ-11279 for that. But that's not the only thing

[1] 
https://superuser.com/questions/1467546/tortoisesvn-asks-for-the-credentials-on-windows

Jacques

Le 09/11/2019 à 23:07, jler...@apache.org a écrit :

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
  new 35c1dac  Fixed: double forward slashes in ecommerce emails 
(OFBIZ-2618)
35c1dac is described below

commit 35c1dacdb17dc587326b4e65d7cd936bfdd638eb
Author: Jacques Le Roux 
AuthorDate: Sat Nov 9 23:07:31 2019 +0100

 Fixed: double forward slashes in ecommerce emails
 (OFBIZ-2618)
 
 I reopened this issue because while working on OFBIZ-9804 I found that

 since maybe r1052457 some baseEcommerceSecureUrl in screens like
 ContactListSubscribeEmail are not working anymore.
 While at it I remove the commented out lines
---
  ecommerce/widget/EmailContactListScreens.xml | 235 +--
  1 file changed, 115 insertions(+), 120 deletions(-)

diff --git a/ecommerce/widget/EmailContactListScreens.xml 
b/ecommerce/widget/EmailContactListScreens.xml
index 8e66bf3..63db78b 100644
--- a/ecommerce/widget/EmailContactListScreens.xml
+++ b/ecommerce/widget/EmailContactListScreens.xml
@@ -1,120 +1,115 @@
-
-
-
-http://www.w3.org/2001/XMLSchema-instance;
-xmlns="http://ofbiz.apache.org/Widget-Screen; 
xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen 
http://ofbiz.apache.org/dtds/widget-screen.xsd;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+http://www.w3.org/2001/XMLSchema-instance;
+xmlns="http://ofbiz.apache.org/Widget-Screen; 
xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen 
http://ofbiz.apache.org/dtds/widget-screen.xsd;>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+




Re: svn commit: r1865605 - in /ofbiz/branches/release16.11: README.md README.md.html gradle/init-gradle-wrapper.sh

2019-08-22 Thread Jacques Le Roux

Le 21/08/2019 à 10:05, jaco...@apache.org a écrit :

+
+MS Windows:
+`\gradle\init-gradle-wrapper.ps1`

Hi,

Just back and I have not much time yet.

I created init-gradle-wrapper.bat in OFBiz home because I'm unsure calling 
init-gradle-wrapper.ps1 directly like above will work on all Windows versions.

At least on my own (Windows 7 Pro Service Pack 1) it doesn't:

   C:\projectsASF\release16.11>\gradle\init-gradle-wrapper.ps1
   '\gradle\init-gradle-wrapper.ps1' n'est pas reconnu en tant que commande 
interne
   ou externe, un programme exécutable ou un fichier de commandes.

Calling gradle\init-gradle-wrapper.ps1 does not work either

So better use init-gradle-wrapper.bat ;)

Thanks

Jacques



Re: buildbot failure in on ofbizTrunkFrameworkPlugins

2019-05-31 Thread Jacques Le Roux

Checked locally another "not an issue"

Le 29/05/2019 à 22:07, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFrameworkPlugins 
while building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/828

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: downstream
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1860365
Blamelist: nmalin

BUILD FAILED: failed shell_4

Sincerely,
  -The Buildbot






Re: buildbot failure in on ofbizBranch17Framework

2019-05-29 Thread Jacques Le Roux

No problem locally, unfortunately another "Buildbot's hiccup"

Le 29/05/2019 à 19:08, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizBranch17Framework while 
building . Full details are available at:
 https://ci.apache.org/builders/ofbizBranch17Framework/builds/294

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: lares_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 
'onBranch17FrameworkCommit' triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release17.12] 1860359
Blamelist: jleroux

BUILD FAILED: failed shell_2

Sincerely,
  -The Buildbot






Re: svn commit: r1856609 - in /ofbiz/ofbiz-framework/trunk/applications/order: groovyScripts/test/OrderTests.groovy testdef/data/OrderTestData.xml

2019-04-12 Thread Jacques Le Roux

Hi Suraj,

Since this commit https://ci.apache.org/builders/ofbizTrunkFramework/builds/729 
the testAddRequirementTask test fails when done in trunk framework only.

https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/

See also https://ci.apache.org/builders/ofbizTrunkFramework?numbuilds=40

It works when the plugins are also there: 
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins?numbuilds=25

https://ci.apache.org/projects/ofbiz/logs/trunk/plugins/html/

I have no ideas why. Maybe some data issue (only in a plugin, maybe project, 
but not sure).

|Thanks|

|Jacques|

|
|

Le 30/03/2019 à 08:12, sur...@apache.org a écrit :

Author: surajk
Date: Sat Mar 30 07:12:25 2019
New Revision: 1856609

URL: http://svn.apache.org/viewvc?rev=1856609=rev
Log:
Added: Unit test case for service - CreateReturnAdjustment.
(OFBIZ-8857)
Thanks Avnindra Sharma for reporting, Pawan Verma for discussion and Vivek 
Singh Bisen for providing the updated patch.

Modified:
 
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
 
ofbiz/ofbiz-framework/trunk/applications/order/testdef/data/OrderTestData.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy?rev=1856609=1856608=1856609=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
 Sat Mar 30 07:12:25 2019
@@ -1,6 +1,7 @@
  import org.apache.ofbiz.entity.util.EntityQuery
  import org.apache.ofbiz.service.ServiceUtil
  import org.apache.ofbiz.testtools.GroovyScriptTestCase
+
  class OrderTests extends GroovyScriptTestCase {
  void testAddRequirementTask() {
  Map serviceCtx = [:]
@@ -10,4 +11,13 @@ class OrderTests extends GroovyScriptTes
  Map serviceResult = dispatcher.runSync("addRequirementTask", 
serviceCtx)
  assert ServiceUtil.isSuccess(serviceResult)
  }
-}
+void testCreateReturnAdjustment() {
+Map serviceCtx = [:]
+serviceCtx.amount = '2.'
+serviceCtx.returnId = '1009'
+serviceCtx.userLogin = 
EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 
'system').cache().queryOne()
+Map serviceResult = dispatcher.runSync('createReturnAdjustment', 
serviceCtx)
+assert ServiceUtil.isSuccess(serviceResult)
+assert serviceResult.returnAdjustmentId != null
+}
+}
\ No newline at end of file

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/testdef/data/OrderTestData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/testdef/data/OrderTestData.xml?rev=1856609=1856608=1856609=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/testdef/data/OrderTestData.xml 
(original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/testdef/data/OrderTestData.xml 
Sat Mar 30 07:12:25 2019
@@ -54,5 +54,6 @@ under the License.
  
  
  
+
  
  






Re: svn commit: r1854306 - /ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml

2019-03-12 Thread Jacques Le Roux

Agreed Deepak,

Makes sense, I 'll change that

Thanks

Jacques

Le 12/03/2019 à 10:07, Deepak Dixit a écrit :

Hi Jacques,

I think instead of adding space in uiLabel it would be food if we add space in 
the template

Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org 


On Mon, Feb 25, 2019 at 4:03 PM mailto:jler...@apache.org>> wrote:

Author: jleroux
Date: Mon Feb 25 10:33:53 2019
New Revision: 1854306

URL: http://svn.apache.org/viewvc?rev=1854306=rev
Log:
Improved: no functional change

A missing space before CommonBranch label made the word trunkbranch instead 
of
trunk branch.

I'll backport this

Modified:
ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml

Modified: 
ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml?rev=1854306=1854305=1854306=diff

==
--- ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml 
(original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/config/CommonUiLabels.xml 
Mon Feb 25 10:33:53 2019
@@ -1389,9 +1389,9 @@
         å›žå ±
     
     
-        branch
-        rama
-        branche
+         branch
+         rama
+         branche
     
     
         built on




Re: svn commit: r1849514 - /ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml

2018-12-22 Thread Jacques Le Roux

Hi Suraj,

Please put an explanation in your comments, I  just did it for you :)

Thanks

Jacques

Le 22/12/2018 à 05:55, sur...@apache.org a écrit :

Author: surajk
Date: Sat Dec 22 04:55:20 2018
New Revision: 1849514

URL: http://svn.apache.org/viewvc?rev=1849514=rev
Log:
Fixed: Incorrect PartyContactMechPurpose created while calling 
createUpdateBillingAddress service.
(OFBIZ-10588)

Modified:
 
ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml?rev=1849514=1849513=1849514=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml 
(original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml 
Sat Dec 22 04:55:20 2018
@@ -877,17 +877,17 @@ under the License.
  
  
  
-
+
  
  
  
  
  
  
-
+
  
  

-
+
  
  
  
@@ -895,7 +895,7 @@ under the License.
  
  
  
-
+
  
  
  
@@ -905,7 +905,7 @@ under the License.
  
  
  
-
+
  
  
  
@@ -919,7 +919,7 @@ under the License.
  
  
  
-
+
  
  
  
@@ -1013,7 +1013,7 @@ under the License.
  
  
  
-
+
  
  

  
@@ -1024,7 +1024,7 @@ under the License.
  
  
  
-
+
  
  
  
@@ -1056,17 +1056,17 @@ under the License.
  
  
  

-
+
  
  
  
  
  
  
-
+
  
  

-
+
  
  
  
@@ -1074,7 +1074,7 @@ under the License.
  
  
  
-
+
  
  
  
@@ -1084,7 +1084,7 @@ under the License.
  
  
  
-
+
  
  
  





Re: svn commit: r1836141 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java

2018-08-09 Thread Jacques Le Roux

Hi Taher,

It's actually OFBIZ-10484 ;)

Jacques


Le 18/07/2018 à 08:30, ta...@apache.org a écrit :

Author: taher
Date: Wed Jul 18 06:30:15 2018
New Revision: 1836141

URL: http://svn.apache.org/viewvc?rev=1836141=rev
Log:
Improved: sanitized the output of XML-RPC when errors are reported.
(OFBIZ-10848)

This is implemented by overriding the parent "execute" method with a more
sanitized output for clarity and enhanced security.

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1836141=1836140=1836141=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
 Wed Jul 18 06:30:15 2018
@@ -22,6 +22,7 @@ package org.apache.ofbiz.webapp.event;
  import static org.apache.ofbiz.base.util.UtilGenerics.checkMap;
  
  import java.io.BufferedReader;

+import java.io.ByteArrayOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
@@ -54,6 +55,7 @@ import org.apache.xmlrpc.XmlRpcRequest;
  import org.apache.xmlrpc.common.ServerStreamConnection;
  import org.apache.xmlrpc.common.XmlRpcHttpRequestConfig;
  import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl;
+import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig;
  import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping;
  import org.apache.xmlrpc.server.XmlRpcHttpServer;
  import org.apache.xmlrpc.server.XmlRpcHttpServerConfig;
@@ -209,6 +211,60 @@ public class XmlRpcEventHandler extends
  }
  }
  
+@Override

+public void execute(XmlRpcStreamRequestConfig pConfig,
+ServerStreamConnection pConnection) throws XmlRpcException {
+try {
+Object result = null;
+boolean foundError = false;
+
+try (InputStream istream = getInputStream(pConfig, pConnection)) {
+XmlRpcRequest request = getRequest(pConfig, istream);
+result = execute(request);
+} catch (Exception e) {
+Debug.logError(e, module);
+foundError = true;
+}
+
+ByteArrayOutputStream baos;
+OutputStream initialStream;
+if (isContentLengthRequired(pConfig)) {
+baos = new ByteArrayOutputStream();
+initialStream = baos;
+} else {
+baos = null;
+initialStream = pConnection.newOutputStream();
+}
+
+try (OutputStream ostream = getOutputStream(pConnection, pConfig, 
initialStream)) {
+if (!foundError) {
+writeResponse(pConfig, ostream, result);
+} else {
+writeError(pConfig, ostream, new Exception("Failed to read 
XML-RPC request. Please check logs for more information"));
+}
+}
+
+if (baos != null) {
+try (OutputStream dest = getOutputStream(pConfig, pConnection, 
baos.size())) {
+baos.writeTo(dest);
+}
+}
+
+pConnection.close();
+pConnection = null;
+} catch (IOException e) {
+throw new XmlRpcException("I/O error while processing request: " + 
e.getMessage(), e);
+} finally {
+if (pConnection != null) {
+try {
+pConnection.close();
+} catch (IOException e) {
+Debug.logError(e, "Unable to close stream connection");
+}
+}
+}
+}
+
  class ServiceRpcHandler extends AbstractReflectiveHandlerMapping 
implements XmlRpcHandler {
  
  public ServiceRpcHandler() {








Re: svn commit: r1837462 - in /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections: MapContext.java MapStack.java

2018-08-05 Thread Jacques Le Roux

This is rather OFBIZ-10485

Jacques


Le 05/08/2018 à 14:36, ta...@apache.org a écrit :

Author: taher
Date: Sun Aug  5 12:36:09 2018
New Revision: 1837462

URL: http://svn.apache.org/viewvc?rev=1837462=rev
Log:
Improved: Further refactor MapContext and MapStack
(OFBIZ-10484)

This commit applies multiple new refactoring enhancements as follows:
- rename stackList to contexts (the data structure holding the context Deque)
- refactor the size function to utilize streams to sum all keys
- Implement a function "entryStream()" that returns a stream of all keys in the
   correct sequential order and utilize this function in multiple functions for
   iterating over the keys including "containsValue", "values" and "entrySet".
   This implementation is necessary to avoid code repetition and ensure correct
   order with no duplicates
- Re-design the get functions of the context map to use a generic function with
   a functional interface "withMapContainingKey". The purpose of it is to avoid
   checking for nulls and instead use the "containsKey" function followed by the
   injected lambda expressions in both signatures of the get function

Thanks: Mathieu Lirzin for the patch and implementing suggested changes.

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapContext.java
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapStack.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapContext.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapContext.java?rev=1837462=1837461=1837462=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapContext.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapContext.java
 Sun Aug  5 12:36:09 2018
@@ -18,34 +18,41 @@
   
***/
  package org.apache.ofbiz.base.util.collections;
  
+import static java.util.stream.Collectors.collectingAndThen;

+import static java.util.stream.Collectors.toCollection;
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toSet;
+
  import java.util.Collection;
  import java.util.Collections;
  import java.util.Deque;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.LinkedList;
-import java.util.List;
  import java.util.Locale;
  import java.util.Map;
+import java.util.Objects;
  import java.util.Set;
-import java.util.stream.Collectors;
+import java.util.function.Function;
+import java.util.stream.Stream;
  
  import org.apache.ofbiz.base.util.UtilGenerics;
  
-

  /**
- * Map Stack
+ * Map Context
   *
+ * Provide a combined view for a collection of maps which are organized in a 
deque.
+ * All write operations affect only the head of the deque.
   */
  public class MapContext implements Map, LocalizedMap {
  
  public static final String module = MapContext.class.getName();
  
-protected Deque> stackList = new LinkedList<>();

+protected Deque> contexts = new LinkedList<>();
  
  /** Puts a new Map on the top of the stack */

  public void push() {
-stackList.addFirst(new HashMap());
+contexts.addFirst(new HashMap());
  }
  
  /** Puts an existing Map on the top of the stack (top meaning will override lower layers on the stack) */

@@ -53,7 +60,7 @@ public class MapContext implements
  if (existingMap == null) {
  throw new IllegalArgumentException("Error: cannot push null existing 
Map onto a MapContext");
  }
-stackList.addFirst(existingMap);
+contexts.addFirst(existingMap);
  }
  
  /** Puts an existing Map on the BOTTOM of the stack (bottom meaning will be overriden by lower layers on the stack, ie everything else already there) */

@@ -61,13 +68,13 @@ public class MapContext implements
  if (existingMap == null) {
  throw new IllegalArgumentException("Error: cannot add null existing 
Map to bottom of a MapContext");
  }
-stackList.addLast(existingMap);
+contexts.addLast(existingMap);
  }
  
  /** Remove and returns the Map from the top of the stack; if there is only one Map on the stack it returns null and does not remove it */

  public Map pop() {
  // always leave at least one Map in the List, ie never pop off the 
last Map
-return stackList.size() > 1 ? stackList.removeFirst() : null;
+return contexts.size() > 1 ? contexts.removeFirst() : null;
  }
  
  /* (non-Javadoc)

@@ -75,10 +82,11 @@ public class MapContext implements
   */
  @Override
  

Re: buildbot failure in on ofbizTrunkFramework

2018-05-27 Thread Jacques Le Roux

We have a small problem here. The failure is

widgettests


	testFopMacroLibrary 	Failure 	Response contentType isn't good : text/html;charset=UTF-8 expected:<[application/pdf];charset=UTF-8> but 
was:<[text/html];charset=UTF-8>


|junit.framework.ComparisonFailure: Response contentType isn't good : text/html;charset=UTF-8 expected:<[application/pdf];charset=UTF-8> but 
was:<[text/html];charset=UTF-8>

at 
org.apache.ofbiz.widget.test.WidgetMacroLibraryTests.teestFopMacroLibrary(WidgetMacroLibraryTests.java:125)
at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:89)
at 
org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148)
at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73)
at 
org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupConttrolPanel.java:218)
at 
org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:71)
at org.apache.ofbiz.base.staart.Start.main(Start.java:85)|


If I revert locally r1832307 (done for OFBIZ-9846) the test passes. But I don't see yet from where the issue is. As it's not preventing to create PDF 
(tested with an order PDF) I prefer to not revert yet but rather try find the reason and fix it in the Jira with the help of Aditya


Jacques

Le 26/05/2018 à 14:49, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFramework while 
building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFramework/builds/244

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1832307
Blamelist: jleroux

BUILD FAILED: failed shell_2

Sincerely,
  -The Buildbot








Re: svn commit: r1827510 - /ofbiz/tools/rat-excludes.txt

2018-04-01 Thread Jacques Le Roux

Hi Michael,

Any chances?

BTW I have added a line to check the the RAT output into the *Release* Management Guide for OFBiz 
<https://cwiki.apache.org/confluence/display/OFBIZ/Release+Management+Guide+for+OFBiz?src=search>in wiki


So it's not a big deal, but better not accumulate such cases.

Thanks

Jacques


Le 22/03/2018 à 18:08, Jacques Le Roux a écrit :
Oops, that's not that all which is required. We have already covered the *.adoc files by putting ASL2 license headers in them, we don't want to 
exclude/hide the next which will come.


What is needed is to exclude is docs/asciidoc/images/OFBiz-Logo.svg

Please check https://ci.apache.org/projects/ofbiz/rat-output.html

Thanks

Jacques


Le 22/03/2018 à 16:27, mbr...@apache.org a écrit :

Author: mbrohl
Date: Thu Mar 22 15:27:20 2018
New Revision: 1827510

URL: http://svn.apache.org/viewvc?rev=1827510=rev
Log:
Added exclude for *.adoc files

Modified:
 ofbiz/tools/rat-excludes.txt

Modified: ofbiz/tools/rat-excludes.txt
URL: 
http://svn.apache.org/viewvc/ofbiz/tools/rat-excludes.txt?rev=1827510=1827509=1827510=diff
==
--- ofbiz/tools/rat-excludes.txt (original)
+++ ofbiz/tools/rat-excludes.txt Thu Mar 22 15:27:20 2018
@@ -39,6 +39,7 @@ README.md
  .*gitignore
  .*hgignore
  **/*.md
+**/*.adoc
  **/robots.txt
    **/docbook/**










Re: svn commit: r1827510 - /ofbiz/tools/rat-excludes.txt

2018-03-22 Thread Jacques Le Roux
Oops, that's not that all which is required. We have already covered the *.adoc files by putting ASL2 license headers in them, we don't want to 
exclude/hide the next which will come.


What is needed is to exclude is docs/asciidoc/images/OFBiz-Logo.svg

Please check https://ci.apache.org/projects/ofbiz/rat-output.html

Thanks

Jacques


Le 22/03/2018 à 16:27, mbr...@apache.org a écrit :

Author: mbrohl
Date: Thu Mar 22 15:27:20 2018
New Revision: 1827510

URL: http://svn.apache.org/viewvc?rev=1827510=rev
Log:
Added exclude for *.adoc files

Modified:
 ofbiz/tools/rat-excludes.txt

Modified: ofbiz/tools/rat-excludes.txt
URL: 
http://svn.apache.org/viewvc/ofbiz/tools/rat-excludes.txt?rev=1827510=1827509=1827510=diff
==
--- ofbiz/tools/rat-excludes.txt (original)
+++ ofbiz/tools/rat-excludes.txt Thu Mar 22 15:27:20 2018
@@ -39,6 +39,7 @@ README.md
  .*gitignore
  .*hgignore
  **/*.md
+**/*.adoc
  **/robots.txt
  
  **/docbook/**








Re: buildbot failure in on ofbizTrunkFramework

2018-03-21 Thread Jacques Le Roux

Hi Michael,

Not sure why it went unnoticed so long, but by removing README.md (replacing README.adoc) at 
http://svn.apache.org/viewvc?view=revision=1827046 you broke testZipReadme


Not a big deal, we can just replace the file in the test (from README.md to README.adoc). We could chose a more sure to remain file, but I guess that 
now we are going with asciidoc and README.adocshould stay there.


I fixed it at revision: 1827457

Jacques


Le 16/03/2018 à 22:27, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFramework while 
building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFramework/builds/147

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: lares_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1827046
Blamelist: mbrohl

BUILD FAILED: failed shell_2

Sincerely,
  -The Buildbot








Re: buildbot failure in on ofbizTrunkFramework

2018-03-16 Thread Jacques Le Roux

Checking that

Jacques


Le 16/03/2018 à 12:13, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFramework while 
building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFramework/builds/143

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: lares_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1826949
Blamelist: jleroux

BUILD FAILED: failed shell_2

Sincerely,
  -The Buildbot








Re: buildbot failure in on ofbizTrunkFramework

2018-02-12 Thread Jacques Le Roux

Not a concern, tests pass locally

Jacques


Le 12/02/2018 à 11:11, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFramework while 
building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFramework/builds/78

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1823931
Blamelist: jleroux

BUILD FAILED: failed shell_2

Sincerely,
  -The Buildbot








Re: buildbot success in on ofbizTrunkFrameworkPlugins

2018-01-13 Thread Jacques Le Roux

It seems it happened again (2 successful build messages, previous attached) 
when it's normally handled with INFRA-15394

But I think I know why. Those were triggered for different reasons:

Here

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkPluginsCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-plugins/trunk] 1821053
Blamelist: deepak
 


Previous

Build Reason: downstream
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1821039
Blamelist: jleroux

So Deepak committed directly to plugins and that actioned testIntegration (we 
can't test plugins changes else)
When I committed to trunk and that also actioned testIntegration to test for no regression in plugins (the plugins build is also dependent from the 
trunk commit)


So we need to find a way to make those two cases same for OFBiz.

I'll open a request to Infra because the dependent solution was suggested and 
coded by Gavin and it's a bit over my BuildBot competences.
I'll thought check if I can't find a solution by myself and help is welcome

Jacques


Le 13/01/2018 à 10:08, build...@apache.org a écrit :

The Buildbot has detected a restored build on builder 
ofbizTrunkFrameworkPlugins while building . Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/37

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkPluginsCommit' 
triggered this build
Build Source Stamp: [branch ofbiz/ofbiz-plugins/trunk] 1821053
Blamelist: deepak

Build succeeded!

Sincerely,
  -The Buildbot






--- Begin Message ---
The Buildbot has detected a restored build on builder 
ofbizTrunkFrameworkPlugins while building . Full details are available at:
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/32

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: downstream
Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1821039
Blamelist: jleroux

Build succeeded!

Sincerely,
 -The Buildbot




--- End Message ---


Re: svn commit: r1818495 [3/4] - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/ base/util/

2017-12-17 Thread Jacques Le Roux

Le 17/12/2017 à 17:57, mbr...@apache.org a écrit :

-//Debug.logInfo("Found Map value that is not Serializable: " + 
mapEntry.getKey() + "=" + mapEntry.getValue(), module);

I wonder if we should not rather put back the comment uncommented out. This can 
be interesting sometimes and should not happen too often.

Jacques



Re: svn commit: r1818291 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/of biz/order/order/

2017-12-15 Thread Jacques Le Roux

Le 15/12/2017 à 17:51, Jacques Le Roux a écrit :

Le 15/12/2017 à 16:10, mbr...@apache.org a écrit :

+ Debug.logError("Problems with digital product status change : " + null, 
module);

What is the point of putting null there :) ?

Jacques



Removed at r1818348

Jacques



Re: svn commit: r1818291 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/of biz/order/order/

2017-12-15 Thread Jacques Le Roux

Le 15/12/2017 à 16:10, mbr...@apache.org a écrit :

+Debug.logError("Problems with digital product 
status change : " + null, module);

What is the point of putting null there :) ?

Jacques



Re: svn commit: r1817559 [2/2] - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbi z/entity/model/

2017-12-11 Thread Jacques Le Roux

Michael,

In this commit I see some changes for fields from protected to public. I understand the idea and I agree, but I wonder if we should really make all 
fields public when some could be private.


For instance see colAlias, and for the rest should we not rather create and use 
getters (and possibly setters) like getColAlias() ?

Jacques


Le 08/12/2017 à 21:18, mbr...@apache.org a écrit :

Modified: 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java?rev=1817559=1817558=1817559=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
 Fri Dec  8 20:18:41 2017
@@ -56,8 +56,8 @@ import org.w3c.dom.NodeList;
  public class ModelViewEntity extends ModelEntity {
  public static final String module = ModelViewEntity.class.getName();
  
-private static final Map functionPrefixMap = new HashMap();

-private static final Set numericFunctionsSet = new 
HashSet(); // names of functions that return a numeric type
+private static final Map functionPrefixMap = new 
HashMap<>();
+private static final Set numericFunctionsSet = new HashSet<>(); // 
names of functions that return a numeric type
  static {
  functionPrefixMap.put("min", "MIN(");
  functionPrefixMap.put("max", "MAX(");
@@ -78,30 +78,30 @@ public class ModelViewEntity extends Mod
  }
  
  /** Contains member-entity alias name definitions: key is alias, value is ModelMemberEntity */

-protected Map memberModelMemberEntities = new 
HashMap();
+protected Map memberModelMemberEntities = new 
HashMap<>();
  
  /** A list of all ModelMemberEntity entries; this is mainly used to preserve the original order of member entities from the XML file */

-protected List allModelMemberEntities = new 
LinkedList();
+protected List allModelMemberEntities = new 
LinkedList<>();
  
  /** Contains member-entity ModelEntities: key is alias, value is ModelEntity; populated with fields */

-protected Map memberModelEntities = new HashMap();
+protected Map memberModelEntities = new HashMap<>();
  
  /** List of alias-alls which act as a shortcut for easily pulling over member entity fields */

-protected List aliasAlls = new LinkedList();
+protected List aliasAlls = new LinkedList<>();
  
  /** List of aliases with information in addition to what is in the standard field list */

-protected List aliases = new LinkedList();
+protected List aliases = new LinkedList<>();
  
  /** List of view links to define how entities are connected (or "joined") */

-protected List viewLinks = new LinkedList();
+protected List viewLinks = new LinkedList<>();
  
  /** A List of the Field objects for the View Entity, one for each GROUP BY field */

-protected List groupBys = new LinkedList();
+protected List groupBys = new LinkedList<>();
  
  /** List of field names to group by */

-protected List groupByFields = new LinkedList();
+protected List groupByFields = new LinkedList<>();
  
-protected Map conversions = new HashMap();

+protected Map conversions = new HashMap<>();
  
  protected ViewEntityCondition viewEntityCondition = null;
  
@@ -256,7 +256,7 @@ public class ModelViewEntity extends Mod

  }
  
  public List getAliasesCopy() {

-List newList = new ArrayList(this.aliases);
+List newList = new ArrayList<>(this.aliases);
  return newList;
  }
  
@@ -269,7 +269,7 @@ public class ModelViewEntity extends Mod

  }
  
  public List getGroupBysCopy(List selectFields) {

-List newList = new 
ArrayList(this.groupBys.size());
+List newList = new ArrayList<>(this.groupBys.size());
  if (UtilValidate.isEmpty(selectFields)) {
  newList.addAll(this.groupBys);
  } else {
@@ -296,7 +296,7 @@ public class ModelViewEntity extends Mod
  }
  
  public List getViewLinksCopy() {

-List newList = new 
ArrayList(this.viewLinks);
+List newList = new ArrayList<>(this.viewLinks);
  return newList;
  }
  
@@ -306,7 +306,7 @@ public class ModelViewEntity extends Mod
  
  public void populateViewEntityConditionInformation(ModelFieldTypeReader modelFieldTypeReader, List whereConditions, List havingConditions, List 

Re: svn commit: r1817750 - in /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/ base/component: ComponentConfig.java ComponentLoaderConfig.java ComponentResourceHandler.java

2017-12-11 Thread Jacques Le Roux

Le 11/12/2017 à 09:31, Jacques Le Roux a écrit :
Why all these changes in JavaDoc? Is that related with EOLs? If so then something is wrong because I set the SVN repo to handle that automatically 
at http://markmail.org/message/gzghk44kyz646e4d. Maybe you and/or Dennis are not using a svn >= 1.8 client? 
OK I checked by downloading the patch (it else opens in FF and I can't see the differences). Those are removed ending white spaces. We long ago agreed 
about not committing such changes because it makes things harder to review. I was doing that too, so I know it well ;)

So please change your IDE config to not remove ending white spaces.

Thanks

Jacques



Re: svn commit: r1817750 - in /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/ base/component: ComponentConfig.java ComponentLoaderConfig.java ComponentResourceHandler.java

2017-12-11 Thread Jacques Le Roux

Hi Michael,

I'm not sure about all the other commits for "General refactoring and code 
improvements" (subtasks of OFBIZ-9836)

But here I found a lot of unnecessary changes and this makes things a bit 
harder to review.

Why all these changes in JavaDoc? Is that related with EOLs? If so then something is wrong because I set the SVN repo to handle that automatically at 
http://markmail.org/message/gzghk44kyz646e4d. Maybe you and/or Dennis are not using a svn >= 1.8 client?


Also for OFBIZ-9872 the Jira lacks a description to possibly understand why theses changes (notably why you rightly removed the "if 
(Debug.verboseOn())" test because it's done at the bottom level with  "if (isOn(level)) {"


Maybe some could find this last change disputable for performance reason (use 
of String concatenation when logging message).
But if that was true with older Java versions it's no longer a problem (apart 
in loops) and it's easier to read. We can (should) trust the compiler ;)
https://stackoverflow.com/questions/21805557/string-format-vs-string-concatenation-performance
http://www.java67.com/2015/05/4-ways-to-concatenate-strings-in-java.html (see 
1st comment)

Thanks for your work!

Jacques


Le 11/12/2017 à 08:54, mbr...@apache.org a écrit :

Author: mbrohl
Date: Mon Dec 11 07:54:13 2017
New Revision: 1817750

URL: http://svn.apache.org/viewvc?rev=1817750=rev
Log:
Improved: General refactoring and code improvements, package
org.apache.ofbiz.base.component.
(OFBIZ-9872)

The patches were modified to remove unnecessary Debug.is[Loglevel]On()
conditions, see OFBIZ-10049.

Thanks Dennis Balkir for reporting and providing the patches.

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentLoaderConfig.java
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentResourceHandler.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java?rev=1817750=1817749=1817750=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java
 Mon Dec 11 07:54:13 2017
@@ -47,7 +47,7 @@ import org.w3c.dom.Element;
  
  /**

   * An object that models the ofbiz-component element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -458,8 +458,7 @@ public final class ComponentConfig {
  } catch (ContainerException ce) {
  throw new ComponentException("Error reading container configurations 
for component: " + this.globalName, ce);
  }
-if (Debug.verboseOn())
-Debug.logVerbose("Read component config : [" + rootLocation + "]", 
module);
+Debug.logVerbose("Read component config : [" + rootLocation + "]", 
module);
  }
  
  public boolean enabled() {

@@ -596,7 +595,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the classpath element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -619,7 +618,7 @@ public final class ComponentConfig {
  private final Map componentConfigs = new 
LinkedHashMap<>();
  // Root location mapped to global name.
  private final Map componentLocations = new 
HashMap<>();
-
+
  private synchronized ComponentConfig fromGlobalName(String 
globalName) {
  return componentConfigs.get(globalName);
  }
@@ -646,7 +645,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the entity-resource element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -663,7 +662,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the keystore element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -740,7 +739,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the resource-loader element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -760,7 +759,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the service-resource 
element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -775,7 +774,7 @@ public final class ComponentConfig {
  
  /**

   * An object that models the test-suite element.
- *
+ *
   * @see ofbiz-component.xsd
   *
   */
@@ -787,7 +786,7 @@ public final class 

Re: svn commit: r1815192 - /ofbiz/ofbiz-framework/trunk/applications/securityext/src/main/java/org/apa che/ofbiz/securityext/login/LoginEvents.java

2017-11-15 Thread Jacques Le Roux

Le 14/11/2017 à 10:33, jler...@apache.org a écrit :

Author: jleroux
Date: Tue Nov 14 09:33:19 2017
New Revision: 1815192

URL:http://svn.apache.org/viewvc?rev=1815192=rev
Log:
Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9637)

No functional change.

I prefer to use URLEncoder.encode(reqParam, "UTF-8") rather than ESAPI HTML
encoder for 3 reasons:
*  URLEncoder.encode() is sufficient to answer to HTTP response splitting using
Percent-encoding (aka  URL encoding)
*  Consistent and simpler code using basic Java
*  Using "UTF-8" is (more than) recommended, see
https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html

I will check what using ESAPI HTML encoder entails. As JavaDOc says "Not doing
so  may introduce incompatibilities." We have 30+ cases, they are maybe OK, but
we need to check...

Among the 46 cases, I see no problems since it's only used in the context of 
widgets (mostly content wrappers) and only for HTML, not request parameters.

Jacques



Re: svn commit: r1813964 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbi z/entity/util/EntityCrypto.java

2017-11-03 Thread Jacques Le Roux

Done at r1814155

Jacques


Le 01/11/2017 à 14:08, Jacques Le Roux a écrit :


Hi Deepak,

It's minor, but instead of hiding a possible RuntimeException by catching 
Exception here I'd rather follow this FindBugs advice

--
This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not 
explicitly caught. It is a common bug pattern to say try


{ ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but 
this construct also accidentally catches RuntimeException as well, masking potential bugs.


A better approach is to either explicitly catch the specific exceptions that are thrown, or to explicitly catch RuntimeException exception, rethrow 
it, and then catch all non-Runtime Exceptions, as shown below:


try { ... } catch (RuntimeException e) { throw e; } catch (Exception e) { ... 
deal with all ...}

--

I suggest to use this late solution, as it has for example been done for 
GroovyUtil.java in r1812059

http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java?r1=1812059=1812058=1812059

Thanks

Jacques


Le 01/11/2017 à 11:43, dee...@apache.org a écrit :

Author: deepak
Date: Wed Nov  1 10:43:14 2017
New Revision: 1813964

URL:http://svn.apache.org/viewvc?rev=1813964=rev
Log:
Fixed: doDecrypt method may return ClassNotFoundException, 
BadPaddingException,so instead of handling GeneralException used Exception 
class to handle all exception

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
URL:http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java?rev=1813964=1813963=1813964=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
 Wed Nov  1 10:43:14 2017
@@ -124,7 +124,7 @@ public final class EntityCrypto {
  public Object decrypt(String keyName, EncryptMethod encryptMethod, String 
encryptedString) throws EntityCryptoException {
  try {
  return doDecrypt(keyName, encryptMethod, encryptedString, 
handlers[0]);
-} catch (GeneralException e) {
+} catch (Exception e) {
  Debug.logInfo("Decrypt with DES key from standard key name hash 
failed, trying old/funny variety of key name hash", module);
  for (int i = 1; i < handlers.length; i++) {
  try {









Re: svn commit: r1814049 - /ofbiz/ofbiz-framework/trunk/build.gradle

2017-11-02 Thread Jacques Le Roux

Thanks Deepak,

I put them because I initially started in a R13.07 instance (custom project) and did not think about it when porting in trunk, just adapted the whole 
thing to Gradle.


Jacques


Le 02/11/2017 à 10:05, dee...@apache.org a écrit :

Author: deepak
Date: Thu Nov  2 09:05:29 2017
New Revision: 1814049

URL: http://svn.apache.org/viewvc?rev=1814049=rev
Log:
Improved: Removed io.jsonwebtoken:jjwt dependecy from build.gradle, as these 
dependency will be downloaded with io.jsonwebtoken:jjwt

Modified:
 ofbiz/ofbiz-framework/trunk/build.gradle

Modified: ofbiz/ofbiz-framework/trunk/build.gradle
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1814049=1814048=1814049=diff
==
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Thu Nov  2 09:05:29 2017
@@ -142,9 +142,6 @@ dependencies {
  compile 'oro:oro:2.0.8'
  compile 'wsdl4j:wsdl4j:1.6.3'
  compile 'io.jsonwebtoken:jjwt:0.9.0'
-compile 'com.fasterxml.jackson.core:jackson-core:2.7.3'
-compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
-compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'
  
  // ofbiz unit-test compile libs

  testCompile 'org.mockito:mockito-core:2.+'







Re: svn commit: r1813964 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbi z/entity/util/EntityCrypto.java

2017-11-01 Thread Jacques Le Roux

Hi Deepak,

It's minor, but instead of hiding a possible RuntimeException by catching 
Exception here I'd rather follow this FindBugs advice

--
This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not 
explicitly caught. It is a common bug pattern to say try


{ ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this 
construct also accidentally catches RuntimeException as well, masking potential bugs.


A better approach is to either explicitly catch the specific exceptions that are thrown, or to explicitly catch RuntimeException exception, rethrow 
it, and then catch all non-Runtime Exceptions, as shown below:


try { ... } catch (RuntimeException e) { throw e; } catch (Exception e) { ... 
deal with all ...}

--

I suggest to use this late solution, as it has for example been done for 
GroovyUtil.java in r1812059

http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/GroovyUtil.java?r1=1812059=1812058=1812059

Thanks

Jacques


Le 01/11/2017 à 11:43, dee...@apache.org a écrit :

Author: deepak
Date: Wed Nov  1 10:43:14 2017
New Revision: 1813964

URL: http://svn.apache.org/viewvc?rev=1813964=rev
Log:
Fixed: doDecrypt method may return ClassNotFoundException, 
BadPaddingException,so instead of handling GeneralException used Exception 
class to handle all exception

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java?rev=1813964=1813963=1813964=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
 Wed Nov  1 10:43:14 2017
@@ -124,7 +124,7 @@ public final class EntityCrypto {
  public Object decrypt(String keyName, EncryptMethod encryptMethod, String 
encryptedString) throws EntityCryptoException {
  try {
  return doDecrypt(keyName, encryptMethod, encryptedString, 
handlers[0]);
-} catch (GeneralException e) {
+} catch (Exception e) {
  Debug.logInfo("Decrypt with DES key from standard key name hash 
failed, trying old/funny variety of key name hash", module);
  for (int i = 1; i < handlers.length; i++) {
  try {







Re: svn commit: r1811130 - in /ofbiz/ofbiz-framework/trunk/applications/content: webapp/content/images/contentForum.css webapp/contentimages/css/ webapp/contentimages/css/contentForum.css widget/Commo

2017-10-04 Thread Jacques Le Roux

Hi Deepak,

Must be an error for the Jira: https://issues.apache.org/jira/browse/OFBIZ-6259

Jacques


Le 04/10/2017 à 20:56, dee...@apache.org a écrit :

Author: deepak
Date: Wed Oct  4 18:56:33 2017
New Revision: 1811130

URL: http://svn.apache.org/viewvc?rev=1811130=rev
Log:
Fixed: Moved contentForum.css to contentimages webapp and updated path 
accordinlgy. This will complete the r1658621 and r1674451 (OFBIZ-6259)

Added:
 ofbiz/ofbiz-framework/trunk/applications/content/webapp/contentimages/css/
 
ofbiz/ofbiz-framework/trunk/applications/content/webapp/contentimages/css/contentForum.css
   - copied unchanged from r1811129, 
ofbiz/ofbiz-framework/trunk/applications/content/webapp/content/images/contentForum.css
Removed:
 
ofbiz/ofbiz-framework/trunk/applications/content/webapp/content/images/contentForum.css
Modified:
 ofbiz/ofbiz-framework/trunk/applications/content/widget/CommonScreens.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/content/widget/CommonScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/widget/CommonScreens.xml?rev=1811130=1811129=1811130=diff
==
--- ofbiz/ofbiz-framework/trunk/applications/content/widget/CommonScreens.xml 
(original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/widget/CommonScreens.xml 
Wed Oct  4 18:56:33 2017
@@ -32,7 +32,7 @@ under the License.
  
  
  
-
+
  
  
  







Re: svn commit: r1805459 - in /ofbiz/ofbiz-framework/trunk: applications/order/servicedef/ applications/order/src/main/java/org/apache/ofbiz/order/order/ framework/base/src/main/java/org/apache/ofbiz/

2017-09-27 Thread Jacques Le Roux

Hi Michael,

You introduced attachmentType in this commit but the service sendMailFromScreen does not declare this parameter, nor any other service, same for 
attachmentTypeList.


Please check

Thanks

Jacques


Le 18/08/2017 à 21:10, mbr...@apache.org a écrit :

Author: mbrohl
Date: Fri Aug 18 19:10:41 2017
New Revision: 1805459

URL: http://svn.apache.org/viewvc?rev=1805459=rev
Log:
Improved: EmailServices.sendMailFromScreen improved to take multiple
attachments with appropriate type along with several email fixes.
(OFBIZ-9395)

This patch fixes a number of issues combined in a patch because of the
code dependencies.

1. it enables to add BCC adress(es) to service
OrderServices.sendOrderNotificationScreens to oversteer
ProductStoreEmailSetting of BCC the same was as for CC.

2. a method UtilValidate.isEmailList(String) is added to check a
comma separated list of email addresses, used for example to check the
String passed to the new BCC field for an Order-Notification.

3. there are improvements in EmailServices.sendMailFromScreen. The
attachment type of MailAttachments is now not only .pdf but depends on
the specific file. This has not been the case before - the mime type was
always hard coded as .pdf. The same goes for the bodyPart content-type
which is now set to the passed content type or the default text/html
type. Before this was also always set to text/html.
Additionally, an attachment that has the mime-type text/plain is not
rendered with the fop-renderer anymore but with a simple text-renderer.
Therefore it is possible to send an CSV file as attachment now.

The patch also refactors some catch-Blocks in the
EmailServices.sendMailFromScreen by using multi-catch since the e
xception handling is always the same.

Thanks Martin Becker for reporting and providing the patch.

Modified:
 ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services.xml
 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilValidate.java
 
ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java

Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services.xml?rev=1805459=1805458=1805459=diff
==
--- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services.xml 
(original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services.xml Fri 
Aug 18 19:10:41 2017
@@ -34,6 +34,7 @@ under the License.
  
  
  
+
  
  
  

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1805459=1805458=1805459=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 Fri Aug 18 19:10:41 2017
@@ -83,6 +83,9 @@ import org.apache.ofbiz.service.ServiceU
  
  import com.ibm.icu.util.Calendar;
  
+import org.apache.commons.lang.StringUtils;

+import org.apache.fop.apps.MimeConstants;
+
  /**
   * Order Processing Services
   */
@@ -2533,8 +2536,10 @@ public class OrderServices {
  GenericValue userLogin = (GenericValue) context.get("userLogin");
  String orderId = (String) context.get("orderId");
  String orderItemSeqId = (String) context.get("orderItemSeqId");
+String shipGroupSeqId = (String) context.get("shipGroupSeqId");
  String sendTo = (String) context.get("sendTo");
  String sendCc = (String) context.get("sendCc");
+String sendBcc = (String) context.get("sendBcc");
  String note = (String) context.get("note");
  String screenUri = (String) context.get("screenUri");
  GenericValue temporaryAnonymousUserLogin = (GenericValue) 
context.get("temporaryAnonymousUserLogin");
@@ -2589,10 +2594,17 @@ public class OrderServices {
  String xslfoAttachScreenLocation = 
productStoreEmail.getString("xslfoAttachScreenLocation");
  sendMap.put("xslfoAttachScreenLocation", 
xslfoAttachScreenLocation);
  // add attachmentName param to get an attachment namend "[oderId].pdf" 
instead of default "Details.pdf"
-sendMap.put("attachmentName", orderId + ".pdf");
+sendMap.put("attachmentName", (UtilValidate.isNotEmpty(shipGroupSeqId) ? orderId + "-" 
+ 

Re: svn commit: r1808893 - in /ofbiz/site/template: html.tpl.php page/index.tpl.php region/footer.tpl.php region/head.tpl.php region/header.tpl.php region/scripts.tpl.php

2017-09-19 Thread Jacques Le Roux

Good point, thanks Taher!

Jacques


Le 19/09/2017 à 16:55, ta...@apache.org a écrit :

Author: taher
Date: Tue Sep 19 14:55:59 2017
New Revision: 1808893

URL: http://svn.apache.org/viewvc?rev=1808893=rev
Log:
Remove executable prop from all templates for added security

Modified:
 ofbiz/site/template/html.tpl.php   (props changed)
 ofbiz/site/template/page/index.tpl.php   (props changed)
 ofbiz/site/template/region/footer.tpl.php   (props changed)
 ofbiz/site/template/region/head.tpl.php   (props changed)
 ofbiz/site/template/region/header.tpl.php   (props changed)
 ofbiz/site/template/region/scripts.tpl.php   (props changed)

Propchange: ofbiz/site/template/html.tpl.php
 ('svn:executable' removed)

Propchange: ofbiz/site/template/page/index.tpl.php
 ('svn:executable' removed)

Propchange: ofbiz/site/template/region/footer.tpl.php
 ('svn:executable' removed)

Propchange: ofbiz/site/template/region/head.tpl.php
 ('svn:executable' removed)

Propchange: ofbiz/site/template/region/header.tpl.php
 ('svn:executable' removed)

Propchange: ofbiz/site/template/region/scripts.tpl.php
 ('svn:executable' removed)







Re: svn commit: r1808651 - /ofbiz/site/php2html.sh

2017-09-18 Thread Jacques Le Roux

Thanks Taher,

Better indeed, so you think we will keep PHP for a moment right? (not a problem 
with me)

Jacques


Le 17/09/2017 à 22:33, ta...@apache.org a écrit :

Author: taher
Date: Sun Sep 17 20:33:25 2017
New Revision: 1808651

URL: http://svn.apache.org/viewvc?rev=1808651=rev
Log:
Improved: applied a simpler implementation for php2html

Loop over all page templates and generate them instead of the copy-paste
pattern and hardcoding the name of each template into the script.

Modified:
 ofbiz/site/php2html.sh

Modified: ofbiz/site/php2html.sh
URL: 
http://svn.apache.org/viewvc/ofbiz/site/php2html.sh?rev=1808651=1808650=1808651=diff
==
--- ofbiz/site/php2html.sh (original)
+++ ofbiz/site/php2html.sh Sun Sep 17 20:33:25 2017
@@ -19,18 +19,8 @@
  #
  
  # This shell script creates the site HTML files from the PHP templates

-php template/html.tpl.php template/page/about-ofbiz.tpl.php > about-ofbiz.html
-php template/html.tpl.php template/page/business-users.tpl.php 
>business-users.html
-php template/html.tpl.php template/page/developers.tpl.php > developers.html
-php template/html.tpl.php template/page/download.tpl.php > download.html
-php template/html.tpl.php template/page/release-notes-16.11.03.tpl.php > 
release-notes-16.11.03.html
-php template/html.tpl.php template/page/release-notes-13.07.03.tpl.php > 
release-notes-13.07.03.html
-php template/html.tpl.php template/page/faqs.tpl.php > faqs.html
-php template/html.tpl.php template/page/getting-involved.tpl.php > 
getting-involved.html
-php template/html.tpl.php template/page/index.tpl.php > index.html
-php template/html.tpl.php template/page/mailing-lists.tpl.php > 
mailing-lists.html
-php template/html.tpl.php template/page/ofbiz-demos.tpl.php > ofbiz-demos.html
-php template/html.tpl.php template/page/our-users.tpl.php >our-users.html
-php template/html.tpl.php template/page/service-providers.tpl.php > 
service-providers.html
-php template/html.tpl.php template/page/source-repositories.tpl.php > 
source-repositories.html
-php template/html.tpl.php template/page/user-stories.tpl.php > 
user-stories.html
+SITE_DIR="$(cd -P "$(dirname "$0")" && pwd)"
+for template in $SITE_DIR/template/page/*.tpl.php; do
+filename=$(basename $template)
+php $SITE_DIR/template/html.tpl.php $template > 
$SITE_DIR/${filename%.tpl.php}.html
+done







Re: svn commit: r1807996 - /ofbiz/site/images/img-404.jpg

2017-09-11 Thread Jacques Le Roux

Nice, thanks Sharan :)

Jacques


Le 11/09/2017 à 09:48, sha...@apache.org a écrit :

Author: sharan
Date: Mon Sep 11 07:48:41 2017
New Revision: 1807996

URL: http://svn.apache.org/viewvc?rev=1807996=rev
Log:
Improved:Overwrote existing 404 page image with a customised one based on new 
OFBiz logo colours

Modified:
 ofbiz/site/images/img-404.jpg

Modified: ofbiz/site/images/img-404.jpg
URL: 
http://svn.apache.org/viewvc/ofbiz/site/images/img-404.jpg?rev=1807996=1807995=1807996=diff
==
Binary files - no diff available.







Re: svn commit: r1805011 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbi z/widget/model/ModelFormField.java

2017-08-14 Thread Jacques Le Roux

Good catch Nicolas,

Should there not be a related Jira?

Thanks

Jacques


Le 14/08/2017 à 17:47, nma...@apache.org a écrit :

Author: nmalin
Date: Mon Aug 14 15:47:36 2017
New Revision: 1805011

URL: http://svn.apache.org/viewvc?rev=1805011=rev
Log:
Fixed: Missing fieldInfo when call constructor for ModelFormField Password, 
File and Lookup
When you create a form with an entity or service auto fields, the three previous form 
field call only "super(fieldSource, modelFormField);" in their constructor or 
this initialise a TextField with the fieldInfo FieldInfo.TEXT.
I force the field info when the super constructor is called


Modified:
 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java?rev=1805011=1805010=1805011=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
 Mon Aug 14 15:47:36 2017
@@ -2096,7 +2096,7 @@ public class ModelFormField {
  }
  
  public FileField(int fieldSource, ModelFormField modelFormField) {

-super(fieldSource, modelFormField);
+super(fieldSource, FieldInfo.FILE, modelFormField);
  }
  
  @Override

@@ -3028,7 +3028,7 @@ public class ModelFormField {
  }
  
  public LookupField(int fieldSource, ModelFormField modelFormField) {

-super(fieldSource, modelFormField);
+super(fieldSource, FieldInfo.LOOKUP, modelFormField);
  this.descriptionFieldName = "";
  this.fadeBackground = "";
  this.formName = FlexibleStringExpander.getInstance("");
@@ -3250,7 +3250,7 @@ public class ModelFormField {
  }
  
  public PasswordField(int fieldSource, ModelFormField modelFormField) {

-super(fieldSource, modelFormField);
+super(fieldSource, FieldInfo.PASSWORD, modelFormField);
  }
  
  private PasswordField(PasswordField original, ModelFormField modelFormField) {








Re: svn commit: r1804635 - in /ofbiz/ofbiz-framework/trunk: applications/order/src/main/java/org/apache/ofbiz/order/order/ framework/base/src/main/java/org/apache/ofbiz/base/container/ framework/start

2017-08-10 Thread Jacques Le Roux

Weirdly it does not complain about @return. Go figure!

But I'll apply the same!

Jacques


Le 10/08/2017 à 08:31, jler...@apache.org a écrit :

Author: jleroux
Date: Thu Aug 10 06:31:38 2017
New Revision: 1804635

URL: http://svn.apache.org/viewvc?rev=1804635=rev
Log:
No functional trivial changes

When reviewing code, Eclipse complains: "Javadoc: Invalid param tag name"
when a param tag name "contains" a colon at end

This removes all cases found in trunk. Another way could be to add a space
between the tag and the colon. But that's not how it's recommended to write

http://www.oracle.com/technetwork/articles/java/index-137868.html

Modified:
 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java
 
ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/AdminClient.java
 
ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/Start.java
 
ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1804635=1804634=1804635=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 Thu Aug 10 06:31:38 2017
@@ -5768,7 +5768,7 @@ public class OrderServices {
  /**
   * Remove an OrderItemShipGroup record
   * @param ctx
- * @param context: a map containing in paramaters
+ * @param context a map containing in paramaters
   * @return result: a map containing out parameters
   * @throws GenericEntityException
   */

Modified: 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java?rev=1804635=1804634=1804635=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ComponentContainer.java
 Thu Aug 10 06:31:38 2017
@@ -85,7 +85,7 @@ public class ComponentContainer implemen
   * Iterate over all the components and load their classpath URLs into the 
classloader
   * and set the classloader as the context classloader
   *
- * @param componentsClassPath: a list of classpaths for all components
+ * @param componentsClassPath a list of classpaths for all components
   * @throws ContainerException
   */
  private void loadClassPathForAllComponents(List 
componentsClassPath) throws ContainerException {
@@ -107,8 +107,8 @@ public class ComponentContainer implemen
   * Checks if ComponentDef.type is a directory or a single 
component.
   * If it is a directory, load the directory, otherwise load a single 
component
   *
- * @param parentPath: the parent path of what is being loaded
- * @param def: the component or directory loader definition
+ * @param parentPath the parent path of what is being loaded
+ * @param def the component or directory loader definition
   * @throws IOException
   */
  private void loadComponentFromConfig(String parentPath, 
ComponentLoaderConfig.ComponentDef def) throws IOException {
@@ -128,7 +128,7 @@ public class ComponentContainer implemen
   * Checks to see if the directory contains a load file 
(component-load.xml) and
   * then delegates loading to the appropriate method
   *
- * @param directoryName: the name of component directory to load
+ * @param directoryName the name of component directory to load
   * @throws IOException
   */
  private void loadComponentDirectory(String directoryName) throws 
IOException {
@@ -153,8 +153,8 @@ public class ComponentContainer implemen
   * load file (component-load.xml) and they are sorted in order from top 
to bottom
   * in the load file
   *
- * @param directoryPath: the absolute path of the directory
- * @param componentLoadFile: the name of the load file (i.e. 
component-load.xml)
+ * @param directoryPath the absolute path of the directory
+ * @param componentLoadFile the name of the load file (i.e. 

Re: svn commit: r1802682 - in /ofbiz/ofbiz-framework/trunk/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

2017-07-30 Thread Jacques Le Roux

Hi Nicolas,

Do we have an example of use at 
https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples ?

If not would be great to have

Thanks

Jacques


Le 22/07/2017 à 14:14, nma...@apache.org a écrit :

Author: nmalin
Date: Sat Jul 22 12:14:59 2017
New Revision: 1802682

URL: http://svn.apache.org/viewvc?rev=1802682=rev
Log:
Improved: set auto completion only in lookup field (OFBIZ-9378)
Add a new option presentation none for the lookup element to don't display the 
link for display the search form bu only use autocompletion.
In the initial path from Pierre Gaudin the presentation name was 
autocompletion-only but I prefer change it to none because the link is just not 
preent.
Thanks Pierre Gaudin for this proposal and patch

Modified:
 ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js
 ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd

Modified: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js?rev=1802682=1802681=1802682=diff
==
--- ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js 
(original)
+++ ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/fieldlookup.js 
Sat Jul 22 12:14:59 2017
@@ -228,20 +228,22 @@ var Lookup = function(options) {
  _inputBox = document.getElementById(options.inputFieldId);
  _newInputBoxId = _lookupId + "_" + options.inputFieldId;
  _inputBox.id = _newInputBoxId;
-var parent = _inputBox.parentNode;
+if (options.presentation != "none") {
+var parent = _inputBox.parentNode;
  
-var link = document.createElement('A');

-link.href = "javascript:void(0);";
-link.id = _lookupId + "_button";
+var link = document.createElement('A');
+link.href = "javascript:void(0);";
+link.id = _lookupId + "_button";
  
-parent.appendChild(link);

+parent.appendChild(link);
  
-var hiddenDiv = document.createElement("DIV");

-hiddenDiv.id = _lookupId;
-hiddenDiv.css = "{display: none;}";
-hiddenDiv.title = "";
+var hiddenDiv = document.createElement("DIV");
+hiddenDiv.id = _lookupId;
+hiddenDiv.css = "{display: none;}";
+hiddenDiv.title = "";
  
-parent.appendChild(hiddenDiv);

+parent.appendChild(hiddenDiv);
+}
  }
  
  function _createAjaxAutoComplete() {


Modified: ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd?rev=1802682=1802681=1802682=diff
==
--- ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/dtd/widget-form.xsd Sat Jul 22 
12:14:59 2017
@@ -1368,6 +1368,7 @@ under the License.
  
  
  Shows the lookup as moveable and resizable layer or 
popup window.
+if set to none only autocompletion is active (no 
lookup form would be call)
  Default to layer.
  
  
@@ -1375,6 +1376,7 @@ under the License.
  
  
  
+
  
  
  







Re: svn commit: r1803413 - /ofbiz/branches/ofbiz-new-website/getting-involved.html

2017-07-30 Thread Jacques Le Roux

Ah sorry, my external editor (not Eclipse) is set to remove trailing blanks, a 
lot of false changes below...

Jacques


Le 30/07/2017 à 11:20, jler...@apache.org a écrit :

Author: jleroux
Date: Sun Jul 30 09:20:01 2017
New Revision: 1803413

URL: http://svn.apache.org/viewvc?rev=1803413=rev
Log:
Fixes a typo

Modified:
 ofbiz/branches/ofbiz-new-website/getting-involved.html

Modified: ofbiz/branches/ofbiz-new-website/getting-involved.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/getting-involved.html?rev=1803413=1803412=1803413=diff
==
--- ofbiz/branches/ofbiz-new-website/getting-involved.html (original)
+++ ofbiz/branches/ofbiz-new-website/getting-involved.html Sun Jul 30 09:20:01 
2017
@@ -70,7 +70,7 @@
  News

  https://twitter.com/apacheofbiz; 
target="external">Twitter
-https://blogs.apache.org/ofbiz/; target="external" 
class="last">Blog
+https://blogs.apache.org/ofbiz/; target="external" 
class="last">Blog

  
  Documentation
@@ -83,7 +83,7 @@
  
  Community

-Getting Involved
+Getting Involved
  Mailing Lists
  Source 
Repository
DownloadsFAQ

  
-Demos
+Demos
  

  
@@ -102,7 +102,7 @@
  
  
  
-
+

   
  
@@ -124,7 +124,7 @@
  Find Out What's Happening 
Reporting Bugs  
  Contibuting Code and Bug Fixes  

-   Contributing Documentation 
  
+   Contributing Documentation  
 


@@ -132,12 +132,12 @@

  Introduction
  
-   Getting involved with the Apache OFBiz Community is 
easy!
+   Getting involved with the Apache OFBiz Community is 
easy!
Apache OFBiz is an open source community project governed by rules and http://apache.org/foundation/policies/conduct.html; target="_blank">Code of Conduct of http://apache.org/; target="_blank">the Apache Software Foundation. All Apache projects value key concepts such as 
community, consensus, openness and transparency.
A popular Apache mantra is "Community over Code" 
meaning that being able to work and collaborate as a community is more important than producing code
-   The Apache OFBiz source code is free, open source and provided under the http://apache.org/licenses/;>Apache Licence. It is also easily accessible from the 
Apache source code repository. The project mailing lists contain all project releated discussions and decsisions. 

+   The Apache OFBiz source code is free, open source and provided under the http://apache.org/licenses/;>Apache Licence. It is also easily accessible from the 
Apache source code repository. The project mailing lists contain all project releated discussions and decsisions. 


-
+
  
  	


@@ -146,17 +146,17 @@
We are looking for you!
We welcome participation from anyone willing to work with us https://www.apache.org/foundation/how-it-works.html; target="_blank">the Apache Way 
and make a contribution to the project.
We welcome non-developers!
-   Don't worry if you are not a developer. You don't have to be a 
developer to contribute to the project.In fact we are always looking for a range of 
contributors including anyone that wants to help out with documentation, translations, 
testing tasks and UX experience design. 
+   Don't worry if you are not a developer. You don't have to be a 
developer to contribute to the project. In fact we are always looking for a range of 
contributors including anyone that wants to help out with documentation, translations, 
testing tasks and UX experience design. 
Perhaps you are one of our OFBiz users?  That's 
good too. You can help us by telling us about features you like (or don't like!) plus any new 
improvements that you'd like to see. So you see there are quite a few ways that non developers can help 
and contribute to improving OFBiz. 
Developers welcome too!
Apache OFBiz is built on Java. If you are a developer or want to become one then you can 
help by  https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide; 
target="_blank">getting familiar with the OFBiz framework and;

-   providing patches for any bugs you 
find  
-  pick up and work on any of our https://issues.apache.org/jira/projects/OFBIZ/issues/OFBIZ-6066?filter=allopenissues; 

Re: svn commit: r1800642 - /ofbiz/site/index.html

2017-07-03 Thread Jacques Le Roux

Hi Sharan,

The real date of release is 29/Jun/17. Not sure if we should fix, I guess your date is about the news? I used it for wrongly updating the 
doap_OFBiz.rdf then noticed.


Jacques


Le 03/07/2017 à 13:45, sha...@apache.org a écrit :

Author: sharan
Date: Mon Jul  3 11:45:34 2017
New Revision: 1800642

URL: http://svn.apache.org/viewvc?rev=1800642=rev
Log:
Updated:Added news item announcment for 16.11.03 release

Modified:
 ofbiz/site/index.html

Modified: ofbiz/site/index.html
URL: 
http://svn.apache.org/viewvc/ofbiz/site/index.html?rev=1800642=1800641=1800642=diff
==
--- ofbiz/site/index.html (original)
+++ ofbiz/site/index.html Mon Jul  3 11:45:34 2017
@@ -180,6 +180,15 @@
  -->
  
News
+   
+July 3, 2017 "Apache OFBiz 16.11.03" 
Released
+  
+  
+  Apache OFBiz 16.11.03 is the third release of the 16.11 series, the 
latest and greatest OFBiz version that has been stabilized since November 2016.
+  Please refer to the Release 
Notes for the details.
+  
+  The releases can be downloaded from the download 
page.
+  

  May 22, 2017 "Apache OFBiz 16.11.02" 
Released

@@ -209,21 +218,7 @@

The releases can be downloaded from the download 
page.

-  
-April 5, 2016 "Apache OFBiz 13.07.03" and 
"Apache OFBiz 12.04.06" Released
-  
-  
-  Apache OFBiz 13.07.03 is the third release of the 13.07 series, that 
has been stabilized with bug fixes since July 2013.
-  Please refer to the Release 
Notes for the details.
-  
-  Apache OFBiz 12.04.06 is the last release of the 12.04 series, that 
has been stabilized with bug fixes since April 2012.
-  Please refer to the Release 
Notes for the details.
-  Since this is the last release in this series, please consider to 
upgrade to the 13.07 series.
-  
-  The releases can be downloaded from the download 
page.
-
-  
-
+ 
  
  
  








Re: svn commit: r1797160 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbi z/entity/util/EntityQuery.java

2017-06-01 Thread Jacques Le Roux

In this commit the bottom change slipped in and should have been part of 
r1797161 but anyway it's quite simple and clear

Jacques


Le 01/06/2017 à 10:14, jler...@apache.org a écrit :

Author: jleroux
Date: Thu Jun  1 08:14:41 2017
New Revision: 1797160

URL: http://svn.apache.org/viewvc?rev=1797160=rev
Log:
Improved: EntityListIterator closed but not in case of exception
(OFBIZ-9385)

This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.

The solution is to use try-with-ressources

Modified:
 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java?rev=1797160=1797159=1797160=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
 Thu Jun  1 08:14:41 2017
@@ -452,9 +452,9 @@ public class EntityQuery {
  if (dynamicViewEntity == null) {
  result = delegator.findList(entityName, 
makeWhereCondition(useCache), fieldsToSelect, orderBy, findOptions, useCache);
  } else {
-EntityListIterator it = queryIterator();
-result = it.getCompleteList();
-it.close();
+try (EntityListIterator it = queryIterator()) {
+result = it.getCompleteList();
+}
  }
  if (filterByDate && useCache) {
  return EntityUtil.filterByCondition(result, 
this.makeDateCondition());
@@ -510,9 +510,7 @@ public class EntityQuery {
  }
  
  public  List getFieldList(final String fieldName) throws GenericEntityException {select(fieldName);

-EntityListIterator genericValueEli = null;
-try {
-genericValueEli = queryIterator();
+try (EntityListIterator genericValueEli = queryIterator()) {
  if (this.distinct) {
  Set distinctSet = new HashSet();
  GenericValue value = null;
@@ -536,11 +534,6 @@ public class EntityQuery {
  return fieldList;
  }
  }
-finally {
-if (genericValueEli != null) {
-genericValueEli.close();
-}
-}
  }
  
  /**

@@ -551,16 +544,9 @@ public class EntityQuery {
   * @see EntityUtil#getPagedList
   */
  public PagedList queryPagedList(final int viewIndex, final 
int viewSize) throws GenericEntityException {
-EntityListIterator genericValueEli = null;
-try {
-genericValueEli = queryIterator();
+try (EntityListIterator genericValueEli = queryIterator()) {
  return EntityUtil.getPagedList(genericValueEli, viewIndex, 
viewSize);
  }
-finally {
-if (genericValueEli != null) {
-genericValueEli.close();
-}
-}
  }
  
  }