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 0801432971 Fixed: ArtifactInfo fails (OFBIZ-12988)
0801432971 is described below

commit 0801432971091a3871cf1b13b1b2fea10b759670
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Tue Apr 2 17:14:49 2024 +0200

    Fixed: ArtifactInfo fails (OFBIZ-12988)
    
    Not sure what changed since Stable apart OFBIZ-12813. Anyway only
    parameters.location misses, else it works. So it seems an external change 
and
    the fix is easy.
---
 .../ofbiz/webtools/artifactinfo/ArtifactInfo.groovy     | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfo.groovy
 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfo.groovy
index 00b8397952..809e037133 100644
--- 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfo.groovy
+++ 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/artifactinfo/ArtifactInfo.groovy
@@ -20,16 +20,17 @@ package org.apache.ofbiz.webtools.artifactinfo
 
 import org.apache.ofbiz.base.util.Debug
 import org.apache.ofbiz.base.util.UtilURL
-import org.apache.ofbiz.webtools.artifactinfo.ArtifactInfoFactory
 
-name = parameters.name
-location = parameters.location
-if (UtilURL.fromUrlString(location)) {
-    Debug.logError('For security reason HTTP URLs are not accepted, see 
OFBIZ-12306', 'ArtifactInfo.groovy')
-    return
+String name = parameters.name
+String location = parameters.location
+if (location) {
+    if (UtilURL.fromUrlString(location)) {
+        Debug.logError('For security reason HTTP URLs are not accepted, see 
OFBIZ-12306', 'ArtifactInfo.groovy')
+        return
+    }
 }
-type = parameters.type
-uniqueId = parameters.uniqueId
+String type = parameters.type
+String uniqueId = parameters.uniqueId
 delegatorName = delegator.getDelegatorName()
 if (delegatorName.contains('default#')) {
     delegatorName = 'default'

Reply via email to