buildbot success in on ofbizTrunkFrameworkPlugins
The Buildbot has detected a restored build on builder ofbizTrunkFrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1033 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf945_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868630 Blamelist: mthl Build succeeded! Sincerely, -The Buildbot
buildbot success in on ofbizTrunkFramework
The Buildbot has detected a restored build on builder ofbizTrunkFramework while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFramework/builds/1152 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868630 Blamelist: mthl Build succeeded! Sincerely, -The Buildbot
buildbot failure in on ofbizTrunkFramework
The Buildbot has detected a new failure on builder ofbizTrunkFramework while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFramework/builds/1151 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onTrunkFrameworkCommit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868629 Blamelist: mthl BUILD FAILED: failed shell_2 Sincerely, -The Buildbot
buildbot exception in on ofbizTrunkFrameworkPlugins
The Buildbot has detected a build exception on builder ofbizTrunkFrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1032 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868626 Blamelist: mthl BUILD FAILED: exception upload_1 Sincerely, -The Buildbot
buildbot success in on ofbizTrunkFrameworkPlugins
The Buildbot has detected a restored build on builder ofbizTrunkFrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1030 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868621 Blamelist: mthl Build succeeded! Sincerely, -The Buildbot
svn commit: r1868630 - in /ofbiz/ofbiz-framework/trunk: build.gradle framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java framework/base/src/main/java/org/apache/ofbiz/bas
Author: mthl Date: Sat Oct 19 14:56:50 2019 New Revision: 1868630 URL: http://svn.apache.org/viewvc?rev=1868630=rev Log: Improved: Adapt ‘ContainerConfig#getConfigurations’ (OFBIZ-11256) Remove unused declared ‘ContainerException’ in signature and fix the javadoc to match the actual specification. Modified: ofbiz/ofbiz-framework/trunk/build.gradle 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/container/ContainerConfig.java Modified: ofbiz/ofbiz-framework/trunk/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1868630=1868629=1868630=diff == --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Oct 19 14:56:50 2019 @@ -308,7 +308,7 @@ checkstyle { // the sum of errors that were present before introducing the // âcheckstyleâ tool present in the framework and in the official // plugins. -maxErrors = 37930 +maxErrors = 37929 // Currently there are a lot of errors so we need to temporarily // hide them to avoid polluting the terminal output. showViolations = false 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=1868630=1868629=1868630=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 Sat Oct 19 14:56:50 2019 @@ -37,7 +37,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.ofbiz.base.container.ContainerConfig; -import org.apache.ofbiz.base.container.ContainerException; import org.apache.ofbiz.base.location.FlexibleLocation; import org.apache.ofbiz.base.util.Assert; import org.apache.ofbiz.base.util.Debug; @@ -429,11 +428,7 @@ public final class ComponentConfig { .collect(Collectors.collectingAndThen( Collectors.toMap(rli -> rli.name, rli -> rli), Collections::unmodifiableMap)); -try { -configurations = ContainerConfig.getConfigurations(componentElement); -} catch (ContainerException ce) { -throw new ComponentException("Error reading container configurations for component: " + this.globalName, ce); -} +configurations = ContainerConfig.getConfigurations(componentElement); if (Debug.verboseOn()) { Debug.logVerbose("Read component config : [" + rootLocation + "]", module); } Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java?rev=1868630=1868629=1868630=diff == --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Sat Oct 19 14:56:50 2019 @@ -72,13 +72,12 @@ public final class ContainerConfig { } /** - * Finds the container configuration elements in a XML file. + * Finds the {@code } configuration elements in a XML element. * - * @param root the URL of the XML file which cannot be {@code null} + * @param root the XML element which cannot be {@code null} * @return a list of container configuration - * @throws ContainerException when failing to read the XML document. */ -public static List getConfigurations(Element root) throws ContainerException { +public static List getConfigurations(Element root) { List res = UtilXml.childElementList(root, "container").stream() .map(Configuration::new) .collect(collectingAndThen(toList(), Collections::unmodifiableList));
buildbot success in on ofbizBranch18FrameworkPlugins
The Buildbot has detected a restored build on builder ofbizBranch18FrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch18FrameworkPlugins/builds/233 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release18.12] 1868624 Blamelist: mthl Build succeeded! Sincerely, -The Buildbot
svn commit: r1868629 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java
Author: mthl Date: Sat Oct 19 14:29:26 2019 New Revision: 1868629 URL: http://svn.apache.org/viewvc?rev=1868629=rev Log: Improved: Mark ‘ContainerConfig#configurations’ as final (OFBIZ-11256) Use uppercase to match coding standards. Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java?rev=1868629=1868628=1868629=diff == --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Sat Oct 19 14:29:26 2019 @@ -37,7 +37,7 @@ import org.w3c.dom.Element; */ public final class ContainerConfig { /** The global container configuration store. */ -private static Map configurations = new LinkedHashMap<>(); +private static final Map CONFIGURATIONS = new LinkedHashMap<>(); private ContainerConfig() { } @@ -64,7 +64,7 @@ public final class ContainerConfig { * @throws ContainerException when no configuration element are found. */ public static Configuration getConfiguration(String containerName) throws ContainerException { -Configuration configuration = configurations.get(containerName); +Configuration configuration = CONFIGURATIONS.get(containerName); if (configuration == null) { throw new ContainerException("No container found with the name : " + containerName); } @@ -83,7 +83,7 @@ public final class ContainerConfig { .map(Configuration::new) .collect(collectingAndThen(toList(), Collections::unmodifiableList)); synchronized (ContainerConfig.class) { -res.forEach(cfg -> configurations.put(cfg.name(), cfg)); +res.forEach(cfg -> CONFIGURATIONS.put(cfg.name(), cfg)); } return res; }
svn commit: r1868628 - in /ofbiz/ofbiz-framework/trunk/framework: base/src/main/java/org/apache/ofbiz/base/container/ catalina/src/main/java/org/apache/ofbiz/catalina/container/ entityext/src/main/jav
Author: mthl Date: Sat Oct 19 14:27:01 2019 New Revision: 1868628 URL: http://svn.apache.org/viewvc?rev=1868628=rev Log: Improved: Avoid unecessary breakage in ‘ContainerConfig’ (OFBIZ-11256) This restores ‘public’ modifiers on fields and move the ‘Property’ inner class back to ‘Configuration’ to avoid breakage of client code extending the ‘Container’ interface. In order to smooth the transition towards using getters instead of direct field accesss, the public modifiers on fields are now marked as deprecated. Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/NamingServiceContainer.java ofbiz/ofbiz-framework/trunk/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceContainer.java ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/JavaMailContainer.java ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/RmiServiceContainer.java Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java?rev=1868628=1868627=1868628=diff == --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Sat Oct 19 14:27:01 2019 @@ -83,7 +83,7 @@ public final class ContainerConfig { .map(Configuration::new) .collect(collectingAndThen(toList(), Collections::unmodifiableList)); synchronized (ContainerConfig.class) { -res.forEach(cfg -> configurations.put(cfg.name, cfg)); +res.forEach(cfg -> configurations.put(cfg.name(), cfg)); } return res; } @@ -95,20 +95,20 @@ public final class ContainerConfig { * @param name the child property identifier * @return the property corresponding to {@code name} or {@code null} if the identifier is absent. */ -Property getProperty(String name); +Configuration.Property getProperty(String name); } public static String getPropertyValue(PropertyChildren parentProp, String name, String defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { +Configuration.Property prop = parentProp.getProperty(name); +if (prop == null || UtilValidate.isEmpty(prop.value())) { return defaultValue; } return prop.value; } public static int getPropertyValue(PropertyChildren parentProp, String name, int defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { +Configuration.Property prop = parentProp.getProperty(name); +if (prop == null || UtilValidate.isEmpty(prop.value())) { return defaultValue; } try { @@ -119,8 +119,8 @@ public final class ContainerConfig { } public static boolean getPropertyValue(PropertyChildren parentProp, String name, boolean defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { +Configuration.Property prop = parentProp.getProperty(name); +if (prop == null || UtilValidate.isEmpty(prop.value())) { return defaultValue; } return "true".equalsIgnoreCase(prop.value); @@ -130,14 +130,16 @@ public final class ContainerConfig { * A container configuration. */ public static final class Configuration implements PropertyChildren { +//ALLOW PUBLIC FIELDS /** The identifier of the configuration. */ -private final String name; +@Deprecated public final String name; /** The name of class the configuration. */ -private final String className; +@Deprecated public final String className; /** The list of loader names triggering the launch of the container. */ -private final List loaders; +@Deprecated public final List loaders; /** The container property elements. */ -private final Map properties; +@Deprecated public final Map properties; +//FORBID PUBLIC FIELDS
svn commit: r1868627 - /ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml
Author: mthl Date: Sat Oct 19 14:24:34 2019 New Revision: 1868627 URL: http://svn.apache.org/viewvc?rev=1868627=rev Log: Implemented: Allow deprecated public fields (OFBIZ-11256) Modified: ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml Modified: ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml?rev=1868627=1868626=1868627=diff == --- ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml (original) +++ ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml Sat Oct 19 14:24:34 2019 @@ -125,5 +125,14 @@ under the License. + + + + + + + +
svn commit: r1868626 - /ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java
Author: mthl Date: Sat Oct 19 14:21:46 2019 New Revision: 1868626 URL: http://svn.apache.org/viewvc?rev=1868626=rev Log: Improved: Add ‘PropertyChildren’ interface (OFBIZ-11256) This allows removing some duplicated method overloads. Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java?rev=1868626=1868625=1868626=diff == --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/container/ContainerConfig.java Sat Oct 19 14:21:46 2019 @@ -72,7 +72,7 @@ public final class ContainerConfig { } /** - * Finds the container configuration elements in a . + * Finds the container configuration elements in a XML file. * * @param root the URL of the XML file which cannot be {@code null} * @return a list of container configuration @@ -88,35 +88,17 @@ public final class ContainerConfig { return res; } -public static String getPropertyValue(Configuration parentProp, String name, String defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { -return defaultValue; -} -return prop.value; -} - -public static int getPropertyValue(Configuration parentProp, String name, int defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { -return defaultValue; -} -try { -return Integer.parseInt(prop.value); -} catch (Exception e) { -return defaultValue; -} -} - -public static boolean getPropertyValue(Configuration parentProp, String name, boolean defaultValue) { -Property prop = parentProp.getProperty(name); -if (prop == null || UtilValidate.isEmpty(prop.value)) { -return defaultValue; -} -return "true".equalsIgnoreCase(prop.value); +interface PropertyChildren { +/** + * Provides the child property corresponding to a specified identifier. + * + * @param name the child property identifier + * @return the property corresponding to {@code name} or {@code null} if the identifier is absent. + */ +Property getProperty(String name); } -public static String getPropertyValue(Property parentProp, String name, String defaultValue) { +public static String getPropertyValue(PropertyChildren parentProp, String name, String defaultValue) { Property prop = parentProp.getProperty(name); if (prop == null || UtilValidate.isEmpty(prop.value)) { return defaultValue; @@ -124,7 +106,7 @@ public final class ContainerConfig { return prop.value; } -public static int getPropertyValue(Property parentProp, String name, int defaultValue) { +public static int getPropertyValue(PropertyChildren parentProp, String name, int defaultValue) { Property prop = parentProp.getProperty(name); if (prop == null || UtilValidate.isEmpty(prop.value)) { return defaultValue; @@ -136,7 +118,7 @@ public final class ContainerConfig { } } -public static boolean getPropertyValue(Property parentProp, String name, boolean defaultValue) { +public static boolean getPropertyValue(PropertyChildren parentProp, String name, boolean defaultValue) { Property prop = parentProp.getProperty(name); if (prop == null || UtilValidate.isEmpty(prop.value)) { return defaultValue; @@ -147,7 +129,7 @@ public final class ContainerConfig { /** * A container configuration. */ -public static class Configuration { +public static final class Configuration implements PropertyChildren { /** The identifier of the configuration. */ private final String name; /** The name of class the configuration. */ @@ -197,12 +179,7 @@ public final class ContainerConfig { return properties; } -/** - * Provides the child property corresponding to a specified identifier. - * - * @param name the child property identifier - * @return the property corresponding to {@code name} or {@code null} if the identifier is absent. - */ +@Override public Property getProperty(String name) { return properties().get(name); } @@ -221,7 +198,7 @@
buildbot success in on ofbizBranch18Framework
The Buildbot has detected a restored build on builder ofbizBranch18Framework while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch18Framework/builds/217 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onBranch18FrameworkCommit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release18.12] 1868624 Blamelist: mthl Build succeeded! Sincerely, -The Buildbot
svn commit: r1868624 - /ofbiz/ofbiz-framework/branches/release18.12/build.gradle
Author: mthl Date: Sat Oct 19 13:40:52 2019 New Revision: 1868624 URL: http://svn.apache.org/viewvc?rev=1868624=rev Log: Fixed: Make ‘javadoc’ build work with recent Java (OFBIZ-11257) With a recent OpenJDK release we had the following error ``` > Task :javadoc javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module. javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javaee/7/api/ are in the unnamed module. [...] 2 errors 100 warnings > Task :javadoc FAILED ``` With ‘javadoc --source 8’ this error disappears as described in JDK-8212233 [1]. [1] https://bugs.openjdk.java.net/browse/JDK-8212233 Modified: ofbiz/ofbiz-framework/branches/release18.12/build.gradle Modified: ofbiz/ofbiz-framework/branches/release18.12/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/build.gradle?rev=1868624=1868623=1868624=diff == --- ofbiz/ofbiz-framework/branches/release18.12/build.gradle (original) +++ ofbiz/ofbiz-framework/branches/release18.12/build.gradle Sat Oct 19 13:40:52 2019 @@ -55,6 +55,7 @@ ext.ofbizMainClass = 'org.apache.ofbiz.b javadoc.failOnError = true javadoc.options { +source '8' encoding "UTF-8" charSet "UTF-8" // Those external Javadoc links should correspond to the actual
svn commit: r1868623 - in /ofbiz/ofbiz-framework/branches/release18.12/framework: base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java webapp/src/main/java/org/apache/ofbiz/webapp/control/JWT
Author: mthl Date: Sat Oct 19 13:37:37 2019 New Revision: 1868623 URL: http://svn.apache.org/viewvc?rev=1868623=rev Log: Fixed: Adapt some javadoc to let the build succeed Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java?rev=1868623=1868622=1868623=diff == --- ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java (original) +++ ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java Sat Oct 19 13:37:37 2019 @@ -157,7 +157,7 @@ public class ObjectType { * @throws InstantiationException * @throws IllegalAccessException * @throws NoSuchMethodException - * @throws InvocationTargetException, + * @throws InvocationTargetException */ public static Object getInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java?rev=1868623=1868622=1868623=diff == --- ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java (original) +++ ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java Sat Oct 19 13:37:37 2019 @@ -206,7 +206,9 @@ public class JWTManager { } /** - * Gets the authentication token from the "Authorization" header if it is in the form "Bearer ". + * Gets the authentication token from the "Authorization" header if it is + * in the form {@code Bearer }. + * * Public for API access from third party code. * * @param request the request to get the token from
svn commit: r1868622 - /ofbiz/ofbiz-framework/trunk/build.gradle
Author: mthl Date: Sat Oct 19 13:30:07 2019 New Revision: 1868622 URL: http://svn.apache.org/viewvc?rev=1868622=rev Log: Fixed: Make ‘javadoc’ build work with recent Java (OFBIZ-11257) With a recent OpenJDK release we had the following error ``` > Task :javadoc javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module. javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javaee/7/api/ are in the unnamed module. [...] 2 errors 100 warnings > Task :javadoc FAILED ``` With ‘javadoc --source 8’ this error disappears as described in JDK-8212233 [1]. [1] https://bugs.openjdk.java.net/browse/JDK-8212233 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=1868622=1868621=1868622=diff == --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Oct 19 13:30:07 2019 @@ -90,6 +90,7 @@ distributions.main.contents.from(rootDir javadoc { failOnError = true options { +source '8' encoding 'UTF-8' charSet 'UTF-8' // Those external Javadoc links should correspond to the actual
svn commit: r1868621 - in /ofbiz/ofbiz-framework/trunk: build.gradle framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: mthl Date: Sat Oct 19 13:20:01 2019 New Revision: 1868621 URL: http://svn.apache.org/viewvc?rev=1868621=rev Log: Fixed: Format ‘XmlRpcEventHandler’ (OFBIZ-10284) This removes coding style errors introduced in revision 1868611. Modified: ofbiz/ofbiz-framework/trunk/build.gradle ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Modified: ofbiz/ofbiz-framework/trunk/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1868621=1868620=1868621=diff == --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Oct 19 13:20:01 2019 @@ -307,7 +307,7 @@ checkstyle { // the sum of errors that were present before introducing the // âcheckstyleâ tool present in the framework and in the official // plugins. -maxErrors = 37947 +maxErrors = 37930 // Currently there are a lot of errors so we need to temporarily // hide them to avoid polluting the terminal output. showViolations = false 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=1868621=1868620=1868621=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 Sat Oct 19 13:20:01 2019 @@ -16,7 +16,6 @@ specific language governing permissions and limitations under the License. */ - package org.apache.ofbiz.webapp.event; import static org.apache.ofbiz.base.util.UtilGenerics.checkMap; @@ -71,14 +70,18 @@ import org.xml.sax.XMLReader; /** * XmlRpcEventHandler */ -public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { +public final class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { -public static final String module = XmlRpcEventHandler.class.getName(); -protected LocalDispatcher dispatcher; +public static final String MODULE = XmlRpcEventHandler.class.getName(); +private LocalDispatcher dispatcher; private Boolean enabledForExtensions = null; private Boolean enabledForExceptions = null; +LocalDispatcher getDispatcher() { +return dispatcher; +} + @Override public void init(ServletContext context) throws EventHandlerException { String delegatorName = context.getInitParameter("entityDelegatorName"); @@ -97,15 +100,16 @@ public class XmlRpcEventHandler extends } @Override -public String invoke(Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException { -String report = request.getParameter("echo"); +public String invoke(Event event, RequestMap requestMap, HttpServletRequest req, HttpServletResponse res) +throws EventHandlerException { +String report = req.getParameter("echo"); if (report != null) { BufferedReader reader = null; StringBuilder buf = new StringBuilder(); try { // read the inputstream buffer String line; -reader = new BufferedReader(new InputStreamReader(request.getInputStream())); +reader = new BufferedReader(new InputStreamReader(req.getInputStream())); while ((line = reader.readLine()) != null) { buf.append(line).append("\n"); } @@ -120,12 +124,12 @@ public class XmlRpcEventHandler extends } } } -Debug.logInfo("Echo: " + buf.toString(), module); +Debug.logInfo("Echo: " + buf.toString(), MODULE); // echo back the request try { -response.setContentType("text/xml"); -Writer out = response.getWriter(); +res.setContentType("text/xml"); +Writer out = res.getWriter(); out.write(""); out.write(""); out.write(""); @@ -140,9 +144,9 @@ public class XmlRpcEventHandler extends } } else { try { -this.execute(this.getXmlRpcConfig(request), new HttpStreamConnection(request, response)); +this.execute(this.getXmlRpcConfig(req), new HttpStreamConnection(req, res)); } catch (XmlRpcException e) { -Debug.logError(e, module); +Debug.logError(e, MODULE);
buildbot success in on ofbizBranch18FrameworkPlugins
The Buildbot has detected a restored build on builder ofbizBranch18FrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch18FrameworkPlugins/builds/231 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release18.12] 1868616 Blamelist: jleroux Build succeeded! Sincerely, -The Buildbot
buildbot exception in on ofbizBranch18FrameworkPlugins
The Buildbot has detected a build exception on builder ofbizBranch18FrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch18FrameworkPlugins/builds/232 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf945_ubuntu Build Reason: forced: by IRC user (privmsg): forces manual build after supposed BuildBot error Build Source Stamp: HEAD Blamelist: BUILD FAILED: exception upload Sincerely, -The Buildbot
svn commit: r1868619 - /ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml
Author: jleroux Date: Sat Oct 19 08:57:14 2019 New Revision: 1868619 URL: http://svn.apache.org/viewvc?rev=1868619=rev Log: Improved: no functional change Adds missing ASL2 header Modified: ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml Modified: ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml?rev=1868619=1868618=1868619=diff == --- ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml (original) +++ ofbiz/ofbiz-framework/trunk/config/checkstyle/checkstyle.xml Sat Oct 19 08:57:14 2019 @@ -1,4 +1,23 @@ - + + + https://checkstyle.org/dtds/configuration_1_3.dtd;>
svn commit: r1868616 - in /ofbiz/ofbiz-framework/branches/release18.12: ./ themes/common-theme/webapp/common/js/util/OfbizUtil.js
Author: jleroux Date: Sat Oct 19 08:12:56 2019 New Revision: 1868616 URL: http://svn.apache.org/viewvc?rev=1868616=rev Log: "Applied fix from trunk for revision: 1868615" r1868615 | jleroux | 2019-10-19 10:12:07 +0200 (sam. 19 oct. 2019) | 6 lignes Fixed: Fix multi modal opening (OFBIZ-11211) Simplifies a little bit the current code. Thanks: Leila for patch and Carl for confirmation Modified: ofbiz/ofbiz-framework/branches/release18.12/ (props changed) ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js Propchange: ofbiz/ofbiz-framework/branches/release18.12/ -- Merged /ofbiz/ofbiz-framework/trunk:r1868615 Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js?rev=1868616=1868615=1868616=diff == --- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js (original) +++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js Sat Oct 19 08:12:56 2019 @@ -119,14 +119,12 @@ function bindObservers(bind_element) { }); jQuery(bind_element).on("click", "[data-dialog-url]", function(){ var element = jQuery(this); -var id = element.attr("id"); var url = element.data("dialog-url"); var title = element.data("dialog-title"); var width = element.data("dialog-width"); var height = element.data("dialog-height"); var params = element.data("dialog-params"); -var dialogContainer = jQuery(''); - +var dialogContainer = jQuery(''); dialogContainer.dialog({ autoOpen: false, title: title, @@ -135,7 +133,7 @@ function bindObservers(bind_element) { modal: true, closeOnEscape: true, close: function() { -document.getElementById("container_" + id).parentElement.remove(); +dialogContainer.dialog('destroy'); }, open: function() { jQuery.ajax({
svn commit: r1868615 - /ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js
Author: jleroux Date: Sat Oct 19 08:12:07 2019 New Revision: 1868615 URL: http://svn.apache.org/viewvc?rev=1868615=rev Log: Fixed: Fix multi modal opening (OFBIZ-11211) Simplifies a little bit the current code. Thanks: Leila for patch and Carl for confirmation Modified: ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js Modified: ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js?rev=1868615=1868614=1868615=diff == --- ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js (original) +++ ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js Sat Oct 19 08:12:07 2019 @@ -119,14 +119,12 @@ function bindObservers(bind_element) { }); jQuery(bind_element).on("click", "[data-dialog-url]", function(){ var element = jQuery(this); -var id = element.attr("id"); var url = element.data("dialog-url"); var title = element.data("dialog-title"); var width = element.data("dialog-width"); var height = element.data("dialog-height"); var params = element.data("dialog-params"); -var dialogContainer = jQuery(''); - +var dialogContainer = jQuery(''); dialogContainer.dialog({ autoOpen: false, title: title, @@ -135,7 +133,7 @@ function bindObservers(bind_element) { modal: true, closeOnEscape: true, close: function() { -document.getElementById("container_" + id).parentElement.remove(); +dialogContainer.dialog('destroy'); }, open: function() { jQuery.ajax({
buildbot failure in on ofbizBranch18FrameworkPlugins
The Buildbot has detected a new failure on builder ofbizBranch18FrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch18FrameworkPlugins/builds/230 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf945_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release18.12] 1868612 Blamelist: jleroux BUILD FAILED: failed shell_3 Sincerely, -The Buildbot
buildbot exception in on ofbizTrunkFrameworkPlugins
The Buildbot has detected a build exception on builder ofbizTrunkFrameworkPlugins while building . Full details are available at: https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1026 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: downstream Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1868611 Blamelist: jleroux BUILD FAILED: exception shell_1 upload_1 Sincerely, -The Buildbot
buildbot exception in on ofbizBranch17Framework
The Buildbot has detected a build exception on builder ofbizBranch17Framework while building . Full details are available at: https://ci.apache.org/builders/ofbizBranch17Framework/builds/358 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf945_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onBranch17FrameworkCommit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/branches/release17.12] 1868613 Blamelist: jleroux BUILD FAILED: exception upload Sincerely, -The Buildbot
svn commit: r1868613 - in /ofbiz/ofbiz-framework/branches/release17.12: ./ framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux Date: Sat Oct 19 06:58:10 2019 New Revision: 1868613 URL: http://svn.apache.org/viewvc?rev=1868613=rev Log: "Applied fix from trunk for revision: 1868611" r1868611 | jleroux | 2019-10-19 08:42:07 +0200 (sam. 19 oct. 2019) | 11 lignes Improved: Handling tenant in XmlRpcEventHandler (OFBIZ-10284) The XMLRPC service does not support tenants. Even if the tenant domain is included in the HTTP request the call does not affect the correct tenant. The issue and fix has been discussed in in the thread https://markmail.org/message/bz4dofrxqp6i7ove jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. Thanks: Rajesh Kumar Mallah Modified: ofbiz/ofbiz-framework/branches/release17.12/ (props changed) ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Propchange: ofbiz/ofbiz-framework/branches/release17.12/ -- Merged /ofbiz/ofbiz-framework/trunk:r1868611 Modified: ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1868613=1868612=1868613=diff == --- ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java (original) +++ ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Sat Oct 19 06:58:10 2019 @@ -75,7 +75,6 @@ import org.xml.sax.XMLReader; public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { public static final String module = XmlRpcEventHandler.class.getName(); -protected Delegator delegator; protected LocalDispatcher dispatcher; private Boolean enabledForExtensions = null; @@ -83,7 +82,7 @@ public class XmlRpcEventHandler extends public void init(ServletContext context) throws EventHandlerException { String delegatorName = context.getInitParameter("entityDelegatorName"); -this.delegator = DelegatorFactory.getDelegator(delegatorName); +Delegator delegator = DelegatorFactory.getDelegator(delegatorName); this.dispatcher = ServiceContainer.getLocalDispatcher(delegator.getDelegatorName(), delegator); this.setHandlerMapping(new ServiceRpcHandler()); @@ -159,7 +158,7 @@ public class XmlRpcEventHandler extends } protected XmlRpcHttpRequestConfig getXmlRpcConfig(HttpServletRequest req) { -XmlRpcHttpRequestConfigImpl result = new XmlRpcHttpRequestConfigImpl(); +OFBizXmlRpcHttpRequestConfigImpl result = new OFBizXmlRpcHttpRequestConfigImpl(req); XmlRpcHttpServerConfig serverConfig = (XmlRpcHttpServerConfig) getConfig(); result.setBasicEncoding(serverConfig.getBasicEncoding()); @@ -184,7 +183,8 @@ public class XmlRpcEventHandler extends class OfbizRpcAuthHandler implements AbstractReflectiveHandlerMapping.AuthenticationHandler { public boolean isAuthorized(XmlRpcRequest xmlRpcReq) throws XmlRpcException { -XmlRpcHttpRequestConfig config = (XmlRpcHttpRequestConfig) xmlRpcReq.getConfig(); +OFBizXmlRpcHttpRequestConfigImpl config = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = config.getDispatcher(); ModelService model; try { @@ -324,6 +324,10 @@ public class XmlRpcEventHandler extends } public Object execute(XmlRpcRequest xmlRpcReq) throws XmlRpcException { + +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); + DispatchContext dctx = dispatcher.getDispatchContext(); String serviceName = xmlRpcReq.getMethodName(); ModelService model = null; @@ -373,6 +377,8 @@ public class XmlRpcEventHandler extends protected Map getContext(XmlRpcRequest xmlRpcReq, String serviceName) throws XmlRpcException { ModelService model; +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); try { model = dispatcher.getDispatchContext().getModelService(serviceName); } catch (GenericServiceException e) { @@ -451,4 +457,18 @@ public class XmlRpcEventHandler extends
svn commit: r1868614 - in /ofbiz/branches/release16.11: ./ framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux Date: Sat Oct 19 06:58:15 2019 New Revision: 1868614 URL: http://svn.apache.org/viewvc?rev=1868614=rev Log: "Applied fix from trunk framework for revision: 1868611" r1868611 | jleroux | 2019-10-19 08:42:07 +0200 (sam. 19 oct. 2019) | 11 lignes Improved: Handling tenant in XmlRpcEventHandler (OFBIZ-10284) The XMLRPC service does not support tenants. Even if the tenant domain is included in the HTTP request the call does not affect the correct tenant. The issue and fix has been discussed in in the thread https://markmail.org/message/bz4dofrxqp6i7ove jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. Thanks: Rajesh Kumar Mallah Modified: ofbiz/branches/release16.11/ (props changed) ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Propchange: ofbiz/branches/release16.11/ -- Merged /ofbiz/ofbiz-framework/trunk:r1868611 Modified: ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1868614=1868613=1868614=diff == --- ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java (original) +++ ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Sat Oct 19 06:58:15 2019 @@ -75,7 +75,6 @@ import org.apache.ofbiz.webapp.control.C public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { public static final String module = XmlRpcEventHandler.class.getName(); -protected Delegator delegator; protected LocalDispatcher dispatcher; private Boolean enabledForExtensions = null; @@ -83,7 +82,7 @@ public class XmlRpcEventHandler extends public void init(ServletContext context) throws EventHandlerException { String delegatorName = context.getInitParameter("entityDelegatorName"); -this.delegator = DelegatorFactory.getDelegator(delegatorName); +Delegator delegator = DelegatorFactory.getDelegator(delegatorName); this.dispatcher = ServiceContainer.getLocalDispatcher(delegator.getDelegatorName(), delegator); this.setHandlerMapping(new ServiceRpcHandler()); @@ -159,7 +158,7 @@ public class XmlRpcEventHandler extends } protected XmlRpcHttpRequestConfig getXmlRpcConfig(HttpServletRequest req) { -XmlRpcHttpRequestConfigImpl result = new XmlRpcHttpRequestConfigImpl(); +OFBizXmlRpcHttpRequestConfigImpl result = new OFBizXmlRpcHttpRequestConfigImpl(req); XmlRpcHttpServerConfig serverConfig = (XmlRpcHttpServerConfig) getConfig(); result.setBasicEncoding(serverConfig.getBasicEncoding()); @@ -184,7 +183,8 @@ public class XmlRpcEventHandler extends class OfbizRpcAuthHandler implements AbstractReflectiveHandlerMapping.AuthenticationHandler { public boolean isAuthorized(XmlRpcRequest xmlRpcReq) throws XmlRpcException { -XmlRpcHttpRequestConfig config = (XmlRpcHttpRequestConfig) xmlRpcReq.getConfig(); +OFBizXmlRpcHttpRequestConfigImpl config = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = config.getDispatcher(); ModelService model; try { @@ -324,6 +324,10 @@ public class XmlRpcEventHandler extends } public Object execute(XmlRpcRequest xmlRpcReq) throws XmlRpcException { + +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); + DispatchContext dctx = dispatcher.getDispatchContext(); String serviceName = xmlRpcReq.getMethodName(); ModelService model = null; @@ -373,6 +377,8 @@ public class XmlRpcEventHandler extends protected Map getContext(XmlRpcRequest xmlRpcReq, String serviceName) throws XmlRpcException { ModelService model; +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); try { model = dispatcher.getDispatchContext().getModelService(serviceName); } catch (GenericServiceException e) { @@ -451,4 +457,18 @@ public class XmlRpcEventHandler extends response.getOutputStream().close(); } } + +class
svn commit: r1868612 - in /ofbiz/ofbiz-framework/branches/release18.12: ./ framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux Date: Sat Oct 19 06:58:01 2019 New Revision: 1868612 URL: http://svn.apache.org/viewvc?rev=1868612=rev Log: "Applied fix from trunk for revision: 1868611" r1868611 | jleroux | 2019-10-19 08:42:07 +0200 (sam. 19 oct. 2019) | 11 lignes Improved: Handling tenant in XmlRpcEventHandler (OFBIZ-10284) The XMLRPC service does not support tenants. Even if the tenant domain is included in the HTTP request the call does not affect the correct tenant. The issue and fix has been discussed in in the thread https://markmail.org/message/bz4dofrxqp6i7ove jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. Thanks: Rajesh Kumar Mallah Modified: ofbiz/ofbiz-framework/branches/release18.12/ (props changed) ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Propchange: ofbiz/ofbiz-framework/branches/release18.12/ -- Merged /ofbiz/ofbiz-framework/trunk:r1868611 Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1868612=1868611=1868612=diff == --- ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java (original) +++ ofbiz/ofbiz-framework/branches/release18.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java Sat Oct 19 06:58:01 2019 @@ -75,7 +75,6 @@ import org.xml.sax.XMLReader; public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { public static final String module = XmlRpcEventHandler.class.getName(); -protected Delegator delegator; protected LocalDispatcher dispatcher; private Boolean enabledForExtensions = null; @@ -83,7 +82,7 @@ public class XmlRpcEventHandler extends public void init(ServletContext context) throws EventHandlerException { String delegatorName = context.getInitParameter("entityDelegatorName"); -this.delegator = DelegatorFactory.getDelegator(delegatorName); +Delegator delegator = DelegatorFactory.getDelegator(delegatorName); this.dispatcher = ServiceContainer.getLocalDispatcher(delegator.getDelegatorName(), delegator); this.setHandlerMapping(new ServiceRpcHandler()); @@ -159,7 +158,7 @@ public class XmlRpcEventHandler extends } protected XmlRpcHttpRequestConfig getXmlRpcConfig(HttpServletRequest req) { -XmlRpcHttpRequestConfigImpl result = new XmlRpcHttpRequestConfigImpl(); +OFBizXmlRpcHttpRequestConfigImpl result = new OFBizXmlRpcHttpRequestConfigImpl(req); XmlRpcHttpServerConfig serverConfig = (XmlRpcHttpServerConfig) getConfig(); result.setBasicEncoding(serverConfig.getBasicEncoding()); @@ -184,7 +183,8 @@ public class XmlRpcEventHandler extends class OfbizRpcAuthHandler implements AbstractReflectiveHandlerMapping.AuthenticationHandler { public boolean isAuthorized(XmlRpcRequest xmlRpcReq) throws XmlRpcException { -XmlRpcHttpRequestConfig config = (XmlRpcHttpRequestConfig) xmlRpcReq.getConfig(); +OFBizXmlRpcHttpRequestConfigImpl config = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = config.getDispatcher(); ModelService model; try { @@ -324,6 +324,10 @@ public class XmlRpcEventHandler extends } public Object execute(XmlRpcRequest xmlRpcReq) throws XmlRpcException { + +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); + DispatchContext dctx = dispatcher.getDispatchContext(); String serviceName = xmlRpcReq.getMethodName(); ModelService model = null; @@ -373,6 +377,8 @@ public class XmlRpcEventHandler extends protected Map getContext(XmlRpcRequest xmlRpcReq, String serviceName) throws XmlRpcException { ModelService model; +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); try { model = dispatcher.getDispatchContext().getModelService(serviceName); } catch (GenericServiceException e) { @@ -451,4 +457,18 @@ public class XmlRpcEventHandler extends
svn commit: r1868611 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/XmlRpcEventHandler.java
Author: jleroux Date: Sat Oct 19 06:42:07 2019 New Revision: 1868611 URL: http://svn.apache.org/viewvc?rev=1868611=rev Log: Improved: Handling tenant in XmlRpcEventHandler (OFBIZ-10284) The XMLRPC service does not support tenants. Even if the tenant domain is included in the HTTP request the call does not affect the correct tenant. The issue and fix has been discussed in in the thread https://markmail.org/message/bz4dofrxqp6i7ove jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. Thanks: Rajesh Kumar Mallah 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=1868611=1868610=1868611=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 Sat Oct 19 06:42:07 2019 @@ -74,7 +74,6 @@ import org.xml.sax.XMLReader; public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler { public static final String module = XmlRpcEventHandler.class.getName(); -protected Delegator delegator; protected LocalDispatcher dispatcher; private Boolean enabledForExtensions = null; @@ -83,7 +82,7 @@ public class XmlRpcEventHandler extends @Override public void init(ServletContext context) throws EventHandlerException { String delegatorName = context.getInitParameter("entityDelegatorName"); -this.delegator = DelegatorFactory.getDelegator(delegatorName); +Delegator delegator = DelegatorFactory.getDelegator(delegatorName); this.dispatcher = ServiceContainer.getLocalDispatcher(delegator.getDelegatorName(), delegator); this.setHandlerMapping(new ServiceRpcHandler()); @@ -157,7 +156,7 @@ public class XmlRpcEventHandler extends } protected XmlRpcHttpRequestConfig getXmlRpcConfig(HttpServletRequest req) { -XmlRpcHttpRequestConfigImpl result = new XmlRpcHttpRequestConfigImpl(); +OFBizXmlRpcHttpRequestConfigImpl result = new OFBizXmlRpcHttpRequestConfigImpl(req); XmlRpcHttpServerConfig serverConfig = (XmlRpcHttpServerConfig) getConfig(); result.setBasicEncoding(serverConfig.getBasicEncoding()); @@ -183,7 +182,8 @@ public class XmlRpcEventHandler extends @Override public boolean isAuthorized(XmlRpcRequest xmlRpcReq) throws XmlRpcException { -XmlRpcHttpRequestConfig config = (XmlRpcHttpRequestConfig) xmlRpcReq.getConfig(); +OFBizXmlRpcHttpRequestConfigImpl config = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = config.getDispatcher(); ModelService model; try { @@ -329,6 +329,10 @@ public class XmlRpcEventHandler extends @Override public Object execute(XmlRpcRequest xmlRpcReq) throws XmlRpcException { + +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); + DispatchContext dctx = dispatcher.getDispatchContext(); String serviceName = xmlRpcReq.getMethodName(); ModelService model = null; @@ -378,6 +382,8 @@ public class XmlRpcEventHandler extends protected Map getContext(XmlRpcRequest xmlRpcReq, String serviceName) throws XmlRpcException { ModelService model; +OFBizXmlRpcHttpRequestConfigImpl requestConfig = (OFBizXmlRpcHttpRequestConfigImpl) xmlRpcReq.getConfig(); +LocalDispatcher dispatcher = requestConfig.getDispatcher(); try { model = dispatcher.getDispatchContext().getModelService(serviceName); } catch (GenericServiceException e) { @@ -459,4 +465,18 @@ public class XmlRpcEventHandler extends response.getOutputStream().close(); } } + +class OFBizXmlRpcHttpRequestConfigImpl extends XmlRpcHttpRequestConfigImpl { +private LocalDispatcher dispatcher; + +public OFBizXmlRpcHttpRequestConfigImpl (HttpServletRequest request) { +dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); +} + +public LocalDispatcher getDispatcher() { +return dispatcher; +} +} + + }