buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/886 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818445 Blamelist: jleroux Build succeeded! Sincerely, -The Buildbot
svn commit: r1818445 - in /ofbiz/ofbiz-framework/trunk: applications/content/src/main/java/org/apache/ofbiz/content/cms/ applications/order/src/main/java/org/apache/ofbiz/order/order/ applications/par
Author: jleroux Date: Sat Dec 16 19:00:19 2017 New Revision: 1818445 URL: http://svn.apache.org/viewvc?rev=1818445=rev Log: Improved: Always check if debug verbose is on when using Debug.logVerbose() (OFBIZ-10052) This completes the work done so far by removing double check in cases not using brackets, like if (Debug.verboseOn()) if (Debug.verboseOn()) Debug.logVerbose() Thanks: Michael for reporting this case I missed. Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/SSLUtil.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallSimpleMethod.java ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/Iterate.java ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/IterateMap.java ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/envops/SetOperation.java ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/group/GroupModel.java ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizUrlTransform.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java?rev=1818445=1818444=1818445=diff == --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/CmsEvents.java Sat Dec 16 19:00:19 2017 @@ -247,12 +247,14 @@ public class CmsEvents { Debug.logError(e, module); } if (errorPage != null) { -if (Debug.verboseOn()) -if (Debug.verboseOn()) Debug.logVerbose("Found error pages " + statusCode + " : " + errorPage, module); +if (Debug.verboseOn()) { + Debug.logVerbose("Found error pages " + statusCode + " : " + errorPage, module); +} contentId = errorPage.getString("contentId"); } else { -if (Debug.verboseOn()) -if (Debug.verboseOn()) Debug.logVerbose("No specific error page, falling back to the Error Container for " + statusCode, module); +if (Debug.verboseOn()) { + Debug.logVerbose("No specific error page, falling back to the Error Container for " + statusCode, module); +} contentId = errorContainer.getString("contentId"); } mapKey = null; 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=1818445=1818444=1818445=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java (original) +++
svn commit: r1818444 - in /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl: SSLClientSocketFactory.java SSLServerSocketFactory.java
Author: mbrohl Date: Sat Dec 16 18:55:57 2017 New Revision: 1818444 URL: http://svn.apache.org/viewvc?rev=1818444=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.service.rmi.socket.ssl. (OFBIZ-9959) Thanks Dennis Balkir for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java?rev=1818444=1818443=1818444=diff == --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java Sat Dec 16 18:55:57 2017 @@ -43,11 +43,9 @@ public class SSLClientSocketFactory impl try { SSLSocketFactory factory = SSLUtil.getSSLSocketFactory(); return factory.createSocket(host, port); -} catch (GeneralSecurityException e) { +} catch (GeneralSecurityException | GenericConfigException e) { Debug.logError(e, module); throw new IOException(e.getMessage()); -} catch (GenericConfigException e) { -throw new IOException(e.getMessage()); } } } Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java?rev=1818444=1818443=1818444=diff == --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java Sat Dec 16 18:55:57 2017 @@ -91,11 +91,9 @@ public class SSLServerSocketFactory impl } else { factory = SSLUtil.getSSLServerSocketFactory(alias); } -} catch (GeneralSecurityException e) { +} catch (GeneralSecurityException | GenericConfigException e) { Debug.logError(e, "Error getting javax.net.ssl.SSLServerSocketFactory instance for Service Engine RMI calls: " + e.toString(), module); throw new IOException(e.toString()); -} catch (GenericConfigException e) { -Debug.logError(e, "Error getting javax.net.ssl.SSLServerSocketFactory instance for Service Engine RMI calls: " + e.toString(), module); } if (factory == null) {
buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/882 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: lares_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818441 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818443 - in /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro: MacroFormRenderer.java MacroMenuRenderer.java MacroScreenRenderer.java Mac
Author: mbrohl Date: Sat Dec 16 18:00:42 2017 New Revision: 1818443 URL: http://svn.apache.org/viewvc?rev=1818443=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.widget.renderer.macro. (OFBIZ-9960) Thanks Dennis Balkir for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroMenuRenderer.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1818443=1818442=1818443=diff == --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Sat Dec 16 18:00:42 2017 @@ -108,7 +108,7 @@ public final class MacroFormRenderer imp public static final String module = MacroFormRenderer.class.getName(); private final Template macroLibrary; -private final WeakHashMapenvironments = new WeakHashMap (); +private final WeakHashMap environments = new WeakHashMap<>(); private final UtilCodec.SimpleEncoder internalEncoder; private final RequestHandler rh; private final HttpServletRequest request; @@ -142,7 +142,7 @@ public final class MacroFormRenderer imp this.renderPagination = renderPagination; } -private void executeMacro(Appendable writer, String macro) throws IOException { +private void executeMacro(Appendable writer, String macro) { try { Environment environment = getEnvironment(writer); environment.setVariable("visualTheme", FreeMarkerWorker.autoWrap(visualTheme, environment)); @@ -183,7 +183,7 @@ public final class MacroFormRenderer imp return htmlString.replaceAll("\"", "\""); } -public void renderLabel(Appendable writer, Map context, ModelScreenWidget.Label label) throws IOException { +public void renderLabel(Appendable writer, Map context, ModelScreenWidget.Label label) { String labelText = label.getText(context); if (UtilValidate.isEmpty(labelText)) { // nothing to render @@ -329,7 +329,7 @@ public final class MacroFormRenderer imp this.request.setAttribute("width", hyperlinkField.getWidth()); this.request.setAttribute("height", hyperlinkField.getHeight()); makeHyperlinkByType(writer, hyperlinkField.getLinkType(), modelFormField.getWidgetStyle(), hyperlinkField.getUrlMode(), hyperlinkField.getTarget(context), -hyperlinkField.getParameterMap(context, modelFormField.getEntityName(), modelFormField.getServiceName()), +hyperlinkField.getParameterMap(context, modelFormField.getEntityName(), modelFormField.getServiceName()), hyperlinkField.getDescription(context), hyperlinkField.getTargetWindow(context), hyperlinkField.getConfirmation(context), modelFormField, this.request, this.response, context); this.appendTooltip(writer, context, modelFormField); @@ -367,12 +367,14 @@ public final class MacroFormRenderer imp //check for required field style on single forms if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); -if (UtilValidate.isEmpty(requiredStyle)) +if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; -if (UtilValidate.isEmpty(className)) +} +if (UtilValidate.isEmpty(className)) { className = requiredStyle; -else +} else { className = requiredStyle + " " + className; +} } List updateAreas = modelFormField.getOnChangeUpdateAreas(); boolean ajaxEnabled = updateAreas != null && this.javaScriptEnabled; @@ -455,12 +457,14 @@ public final class MacroFormRenderer imp
buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/883 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818442 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818442 - /ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/
Author: mbrohl Date: Sat Dec 16 17:44:09 2017 New Revision: 1818442 URL: http://svn.apache.org/viewvc?rev=1818442=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.workeffort.workeffort. (OFBIZ-9961) Thanks Dennis Balkir for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalHandlerFactory.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalRecurConverter.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalWorker.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortKeywordIndex.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortPartyAssignmentServices.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearch.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearchEvents.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1818442=1818441=1818442=diff == --- ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java Sat Dec 16 17:44:09 2017 @@ -149,7 +149,7 @@ public class ICalConverter { } protected static ResponseProperties createWorkEffort(Component component, Mapcontext) { -Map serviceMap = new HashMap (); +Map serviceMap = new HashMap<>(); setWorkEffortServiceMap(component, serviceMap); serviceMap.put("workEffortTypeId", "VTODO".equals(component.getName()) ? "TASK" : "EVENT"); serviceMap.put("currentStatusId", "VTODO".equals(component.getName()) ? "CAL_NEEDS_ACTION" : "CAL_TENTATIVE"); @@ -437,7 +437,7 @@ public class ICalConverter { } } -protected static List getRelatedWorkEfforts(GenericValue workEffort, Map context) throws GenericEntityException { +protected static List getRelatedWorkEfforts(GenericValue workEffort, Map context) { Map serviceMap = UtilMisc.toMap("workEffortId", workEffort.getString("workEffortId")); Map resultMap = invokeService("getICalWorkEfforts", serviceMap, context); List workEfforts = UtilGenerics.checkList(resultMap.get("workEfforts"), GenericValue.class); @@ -456,15 +456,14 @@ public class ICalConverter { Boolean hasPermission = (Boolean) serviceResult.get("hasPermission"); if (hasPermission != null) { return hasPermission.booleanValue(); -} else { -return false; } +return false; } protected static Map invokeService(String serviceName, Map serviceMap, Map context) { LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher"); Locale locale = (Locale) context.get("locale"); -Map localMap = new HashMap (); +Map localMap = new HashMap<>(); try { ModelService modelService = null; modelService = dispatcher.getDispatchContext().getModelService(serviceName); @@ -721,7 +720,7 @@ public class ICalConverter { } boolean hasCreatePermission = hasPermission(workEffortId, "CREATE", context); List workEfforts = getRelatedWorkEfforts(publishProperties, context); -Set validWorkEfforts = new HashSet(); +Set validWorkEfforts = new HashSet<>(); if (UtilValidate.isNotEmpty(workEfforts)) { // Security
svn commit: r1818441 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/
Author: mbrohl Date: Sat Dec 16 17:28:52 2017 New Revision: 1818441 URL: http://svn.apache.org/viewvc?rev=1818441=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.entity.transaction. (OFBIZ-9962) I added some additional debug conditions. Thanks Dennis Balkir for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DebugXaResource.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DebugXaResource.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DebugXaResource.java?rev=1818441=1818440=1818441=diff == --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DebugXaResource.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DebugXaResource.java Sat Dec 16 17:28:52 2017 @@ -39,13 +39,17 @@ public class DebugXaResource extends Gen @Override public void commit(Xid xid, boolean onePhase) throws XAException { TransactionUtil.debugResMap.remove(xid); -if (Debug.verboseOn()) Debug.logVerbose("Xid : " + xid.toString() + " cleared [commit]", module); +if (Debug.verboseOn()) { +Debug.logVerbose("Xid : " + xid.toString() + " cleared [commit]", module); +} } @Override public void rollback(Xid xid) throws XAException { TransactionUtil.debugResMap.remove(xid); -if (Debug.verboseOn()) Debug.logVerbose("Xid : " + xid.toString() + " cleared [rollback]", module); +if (Debug.verboseOn()) { +Debug.logVerbose("Xid : " + xid.toString() + " cleared [rollback]", module); +} } @Override Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java?rev=1818441=1818440=1818441=diff == --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java Sat Dec 16 17:28:52 2017 @@ -113,10 +113,9 @@ public class DumbTransactionFactory impl if (datasourceInfo.getInlineJdbc() != null) { Connection otherCon = ConnectionFactoryLoader.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc()); return TransactionUtil.getCursorConnection(helperInfo, otherCon); -} else { -Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperInfo.getHelperBaseName() + " datasource. Please check your configuration", module); -return null; } +Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperInfo.getHelperBaseName() + " datasource. Please check your configuration", module); +return null; } public void shutdown() {} Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java?rev=1818441=1818440=1818441=diff == --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java Sat Dec 16 17:28:52 2017 @@ -86,9 +86,8 @@ public abstract class GenericXaResource if (this.active) { if (this.xid !=
buildbot failure in on ofbiz-trunk-framework
The Buildbot has detected a new failure on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/881 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: lares_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818434 Blamelist: mbrohl BUILD FAILED: failed shell_2 Sincerely, -The Buildbot
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/913 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: lares_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818425 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818434 - in /ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile: DataFile.java DataFile2EntityXml.java ModelDataFile.java ModelDataFileReader.java Mod
Author: mbrohl Date: Sat Dec 16 16:18:45 2017 New Revision: 1818434 URL: http://svn.apache.org/viewvc?rev=1818434=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.datafile. (OFBIZ-9963) Thanks Dennis Balkir for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile.java ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile2EntityXml.java ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFileReader.java ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelRecord.java ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/Record.java Modified: ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile.java?rev=1818434=1818433=1818434=diff == --- ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile.java Sat Dec 16 16:18:45 2017 @@ -43,7 +43,7 @@ public class DataFile { public static final String module = DataFile.class.getName(); /** List of record in the file, contains Record objects */ -protected List records = new ArrayList(); +protected List records = new ArrayList<>(); /** Contains the definition for the file */ protected ModelDataFile modelDataFile; @@ -132,8 +132,9 @@ public class DataFile { * @throws DataFileException Exception thown for various errors, generally has a nested exception */ public void readDataFile(String content) throws DataFileException { -if (UtilValidate.isEmpty(content)) +if (UtilValidate.isEmpty(content)) { throw new IllegalStateException("Content is empty, can't read file"); +} ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes(UtilIO.getUtf8())); @@ -170,7 +171,7 @@ public class DataFile { /** * Writes the records in this DataFile object to a text data file - * + * * @param filename *The filename to put the data into * @throws DataFileException Modified: ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile2EntityXml.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile2EntityXml.java?rev=1818434=1818433=1818434=diff == --- ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile2EntityXml.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/DataFile2EntityXml.java Sat Dec 16 16:18:45 2017 @@ -58,8 +58,9 @@ public class DataFile2EntityXml { ModelRecord modelRecord = record.getModelRecord(); outFile.write("<" + modelRecord.name + " "); for (ModelField modelField : modelRecord.fields) { -if (modelField.ignored) +if (modelField.ignored) { continue; +} Object value = record.get(modelField.name); if (value == null) { value = modelField.defaultValue; Modified: ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java?rev=1818434=1818433=1818434=diff == --- ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/datafile/src/main/java/org/apache/ofbiz/datafile/ModelDataFile.java Sat Dec 16 16:18:45 2017 @@ -61,7 +61,7 @@ public class ModelDataFile { public String description = ""; /** List of record definitions for the file */ -public List records = new ArrayList(); +public List records = new ArrayList<>(); public ModelRecord getModelRecord(String recordName) { for (ModelRecord curRecord: records) { Modified:
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/914 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818427 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818433 - in /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist: ShoppingListEvents.java ShoppingListServices.java
Author: mbrohl Date: Sat Dec 16 16:05:35 2017 New Revision: 1818433 URL: http://svn.apache.org/viewvc?rev=1818433=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.order.shoppinglist. (OFBIZ-10062) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java?rev=1818433=1818432=1818433=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListEvents.java Sat Dec 16 16:05:35 2017 @@ -99,7 +99,7 @@ public class ShoppingListEvents { errMsg = UtilProperties.getMessage(resource_error, "shoppinglistevents.select_items_to_add_to_list", cart.getLocale()); throw new IllegalArgumentException(errMsg); } - + if (UtilValidate.isEmpty(shoppingListId)) { // create a new shopping list MapnewListResult = null; @@ -135,10 +135,10 @@ public class ShoppingListEvents { } } -for (int i = 0; i < items.length; i++) { +for (String item2 : items) { Integer cartIdInt = null; try { -cartIdInt = Integer.valueOf(items[i]); +cartIdInt = Integer.valueOf(item2); } catch (Exception e) { Debug.logWarning(e, UtilProperties.getMessage(resource_error,"OrderIllegalCharacterInSelectedItemField", cart.getLocale()), module); } @@ -215,7 +215,7 @@ public class ShoppingListEvents { shoppingListItems = shoppingList.getRelated("ShoppingListItem", null, null, false); if (shoppingListItems == null) { -shoppingListItems = new LinkedList(); +shoppingListItems = new LinkedList<>(); } // include all items of child lists if flagged to do so @@ -262,7 +262,7 @@ public class ShoppingListEvents { String listId = shoppingListItem.getString("shoppingListId"); String itemId = shoppingListItem.getString("shoppingListItemSeqId"); -Map attributes = new HashMap (); +Map attributes = new HashMap<>(); // list items are noted in the shopping cart if (setAsListItem) { attributes.put("shoppingListId", listId); @@ -346,9 +346,8 @@ public class ShoppingListEvents { ServiceUtil.getMessages(request, result, "", "", "", "", "", "", ""); if ("error".equals(result.get(ModelService.RESPONSE_MESSAGE))) { return "error"; -} else { -return "success"; } +return "success"; } /** @@ -366,7 +365,7 @@ public class ShoppingListEvents { Map findMap = UtilMisc. toMap("partyId", partyId, "productStoreId", productStoreId, "shoppingListTypeId", "SLT_SPEC_PURP", "listName", PERSISTANT_LIST_NAME); List existingLists = EntityQuery.use(delegator).from("ShoppingList").where(findMap).queryList(); Debug.logInfo("Finding existing auto-save shopping list with: \nfindMap: " + findMap + "\nlists: " + existingLists, module); - + if (UtilValidate.isNotEmpty(existingLists)) { list = EntityUtil.getFirst(existingLists); autoSaveListId = list.getString("shoppingListId"); @@ -562,7 +561,7 @@ public class ShoppingListEvents { * Returns Map keyed on item sequence ID containing a list of survey response IDs */ public static Map getItemSurveyInfos(List items) { -Map surveyInfos = new HashMap (); +Map surveyInfos = new HashMap<>(); if (UtilValidate.isNotEmpty(items)) { for (GenericValue item : items) { String listId = item.getString("shoppingListId"); @@ -578,7 +577,7 @@ public class ShoppingListEvents { * Returns a list of survey response IDs for a shopping list item */ public static List getItemSurveyInfo(GenericValue item) { -List responseIds = new LinkedList(); +List responseIds = new LinkedList<>();
svn commit: r1818431 - in /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test: PurchaseOrderTest.java SalesOrderTest.java
Author: mbrohl Date: Sat Dec 16 16:03:08 2017 New Revision: 1818431 URL: http://svn.apache.org/viewvc?rev=1818431=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.order.test. (OFBIZ-10063) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/PurchaseOrderTest.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/SalesOrderTest.java Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/PurchaseOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/PurchaseOrderTest.java?rev=1818431=1818430=1818431=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/PurchaseOrderTest.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/PurchaseOrderTest.java Sat Dec 16 16:03:08 2017 @@ -49,7 +49,7 @@ public class PurchaseOrderTest extends O } public void testCreatePurchaseOrder() throws Exception { -Mapctx = new HashMap (); +Map ctx = new HashMap<>(); ctx.put("partyId", "Company"); ctx.put("orderTypeId", "PURCHASE_ORDER"); ctx.put("currencyUom", "USD"); @@ -60,30 +60,30 @@ public class PurchaseOrderTest extends O orderItem.set("unitListPrice", BigDecimal.ZERO); orderItem.set("isModifiedPrice", "N"); orderItem.set("statusId", "ITEM_CREATED"); -List orderItems = new LinkedList(); +List orderItems = new LinkedList<>(); orderItems.add(orderItem); ctx.put("orderItems", orderItems); GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000")); -List orderContactMechs = new LinkedList(); +List orderContactMechs = new LinkedList<>(); orderContactMechs.add(orderContactMech); ctx.put("orderContactMechs", orderContactMechs); GenericValue orderItemContactMech = delegator.makeValue("OrderItemContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION", "contactMechId", "9000", "orderItemSeqId", "1")); -List orderItemContactMechs = new LinkedList(); +List orderItemContactMechs = new LinkedList<>(); orderItemContactMechs.add(orderItemContactMech); ctx.put("orderItemContactMechs", orderItemContactMechs); GenericValue orderItemShipGroup = delegator.makeValue("OrderItemShipGroup", UtilMisc.toMap("carrierPartyId", "UPS", "contactMechId", "9000", "isGift", "N", "maySplit", "N", "shipGroupSeqId", "1", "shipmentMethodTypeId", "NEXT_DAY")); orderItemShipGroup.set("carrierRoleTypeId","CARRIER"); -List orderItemShipGroupInfo = new LinkedList(); +List orderItemShipGroupInfo = new LinkedList<>(); orderItemShipGroupInfo.add(orderItemShipGroup); ctx.put("orderItemShipGroupInfo", orderItemShipGroupInfo); -List orderTerms = new LinkedList(); +List orderTerms = new LinkedList<>(); ctx.put("orderTerms", orderTerms); -List orderAdjustments = new LinkedList(); +List orderAdjustments = new LinkedList<>(); ctx.put("orderAdjustments", orderAdjustments); ctx.put("billToCustomerPartyId", "Company"); Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/SalesOrderTest.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/SalesOrderTest.java?rev=1818431=1818430=1818431=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/SalesOrderTest.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/SalesOrderTest.java Sat Dec 16 16:03:08 2017 @@ -48,7 +48,7 @@ public class SalesOrderTest extends OFBi public void testCreateSalesOrder() throws Exception { Map ctx = UtilMisc. toMap("partyId", "DemoCustomer", "orderTypeId", "SALES_ORDER", "currencyUom", "USD", "productStoreId", "9000"); -List orderPaymentInfo = new LinkedList(); +List orderPaymentInfo = new LinkedList<>(); GenericValue orderContactMech = delegator.makeValue("OrderContactMech", UtilMisc.toMap("contactMechId", "9015", "contactMechPurposeTypeId", "BILLING_LOCATION")); orderPaymentInfo.add(orderContactMech); @@
svn commit: r1818430 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
Author: mbrohl Date: Sat Dec 16 16:00:29 2017 New Revision: 1818430 URL: http://svn.apache.org/viewvc?rev=1818430=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.order.thirdparty.paypal. (OFBIZ-10064) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=1818430=1818429=1818430=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java Sat Dec 16 16:00:29 2017 @@ -125,7 +125,7 @@ public class ExpressCheckoutEvents { LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); CheckoutType checkoutType = determineCheckoutType(request); if (checkoutType.equals(CheckoutType.STANDARD)) { -MapinMap = new HashMap (); +Map inMap = new HashMap<>(); inMap.put("request", request); inMap.put("response", response); try { @@ -177,7 +177,7 @@ public class ExpressCheckoutEvents { } else if (checkoutType.equals(CheckoutType.STANDARD)) { serviceName = "payPalDoExpressCheckout"; } -Map inMap = new HashMap (); +Map inMap = new HashMap<>(); inMap.put("userLogin", userLogin); inMap.put("orderPaymentPreference", paymentPref); Map result = null;
buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/879 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818427 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818429 - in /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product: ProductDisplayWorker.java ProductPromoWorker.java
Author: mbrohl Date: Sat Dec 16 15:58:31 2017 New Revision: 1818429 URL: http://svn.apache.org/viewvc?rev=1818429=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.order.shoppingcart.product. (OFBIZ-10065) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=1818429=1818428=1818429=diff == --- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Sat Dec 16 15:58:31 2017 @@ -63,11 +63,13 @@ public final class ProductDisplayWorker HttpServletRequest httpRequest = (HttpServletRequest) request; ShoppingCart cart = (ShoppingCart) httpRequest.getSession().getAttribute("shoppingCart"); -if (cart == null || cart.size() <= 0) return null; +if (cart == null || cart.size() <= 0) { +return null; +} List cartAssocs = null; try { -Mapproducts = new HashMap (); +Map products = new HashMap<>(); Iterator cartiter = cart.iterator(); @@ -116,16 +118,16 @@ public final class ProductDisplayWorker String currentCatalogId = CatalogWorker.getCurrentCatalogId(request); String viewProductCategoryId = CatalogWorker.getCatalogViewAllowCategoryId(delegator, currentCatalogId); if (viewProductCategoryId != null) { -List tempList = new LinkedList(); +List tempList = new LinkedList<>(); tempList.addAll(products.values()); tempList = CategoryWorker.filterProductsInCategory(delegator, tempList, viewProductCategoryId, "productId"); -cartAssocs = new LinkedList(); +cartAssocs = new LinkedList<>(); cartAssocs.addAll(tempList); } } if (cartAssocs == null) { -cartAssocs = new LinkedList(); +cartAssocs = new LinkedList<>(); cartAssocs.addAll(products.values()); } @@ -140,19 +142,22 @@ public final class ProductDisplayWorker if (UtilValidate.isNotEmpty(cartAssocs)) { return cartAssocs; -} else { -return null; } +return null; } public static Map getQuickReorderProducts(ServletRequest request) { Delegator delegator = (Delegator) request.getAttribute("delegator"); HttpServletRequest httpRequest = (HttpServletRequest) request; GenericValue userLogin = (GenericValue) httpRequest.getSession().getAttribute("userLogin"); -Map results = new HashMap (); +Map results = new HashMap<>(); -if (userLogin == null) userLogin = (GenericValue) httpRequest.getSession().getAttribute("autoUserLogin"); -if (userLogin == null) return results; +if (userLogin == null) { +userLogin = (GenericValue) httpRequest.getSession().getAttribute("autoUserLogin"); +} +if (userLogin == null) { +return results; +} try { Map products = UtilGenerics.checkMap(httpRequest.getSession().getAttribute("_QUICK_REORDER_PRODUCTS_")); @@ -160,11 +165,11 @@ public final class ProductDisplayWorker Map productOccurances = UtilGenerics.checkMap(httpRequest.getSession().getAttribute("_QUICK_REORDER_PRODUCT_OCCURANCES_")); if (products == null || productQuantities == null || productOccurances == null) { -products = new HashMap (); -productQuantities = new HashMap (); +products = new HashMap<>(); +productQuantities = new HashMap<>(); // keep track of how many times a product occurs in order to find averages and rank by purchase amount -productOccurances = new HashMap (); - +
buildbot failure in on ofbiz-trunk-framework-plugins
The Buildbot has detected a new failure on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/912 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818423 Blamelist: jleroux BUILD FAILED: failed shell_4 Sincerely, -The Buildbot
svn commit: r1818427 - /ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java
Author: mbrohl Date: Sat Dec 16 15:47:25 2017 New Revision: 1818427 URL: http://svn.apache.org/viewvc?rev=1818427=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.party.communication. (OFBIZ-10066) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java?rev=1818427=1818426=1818427=diff == --- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java Sat Dec 16 15:47:25 2017 @@ -83,7 +83,7 @@ public class CommunicationEventServices String communicationEventId = (String) context.get("communicationEventId"); Mapresult = ServiceUtil.returnSuccess(); -List errorMessages = new LinkedList(); // used to keep a list of all error messages returned from sending emails to contact list +List errorMessages = new LinkedList<>(); // used to keep a list of all error messages returned from sending emails to contact list try { // find the communication event and make sure that it is actually an email @@ -115,7 +115,7 @@ public class CommunicationEventServices } // prepare the email -Map sendMailParams = new HashMap (); +Map sendMailParams = new HashMap<>(); sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString")); sendMailParams.put("subject", communicationEvent.getString("subject")); sendMailParams.put("contentType", communicationEvent.getString("contentMimeTypeId")); @@ -128,7 +128,7 @@ public class CommunicationEventServices List comEventContents = EntityQuery.use(delegator).from("CommEventContentAssoc").where("communicationEventId", communicationEventId).filterByDate().queryList(); if (UtilValidate.isNotEmpty(comEventContents)) { isMultiPart = true; -List
svn commit: r1818425 - in /ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact: ContactHelper.java ContactMechServices.java ContactMechWorker.java
Author: mbrohl Date: Sat Dec 16 15:42:18 2017 New Revision: 1818425 URL: http://svn.apache.org/viewvc?rev=1818425=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.party.contact. (OFBIZ-10067) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java?rev=1818425=1818424=1818425=diff == --- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java Sat Dec 16 15:42:18 2017 @@ -51,7 +51,9 @@ public class ContactHelper { } public static Collection getContactMech(GenericValue party, String contactMechPurposeTypeId, String contactMechTypeId, boolean includeOld) { -if (party == null) return null; +if (party == null) { +return null; +} try { List partyContactMechList; @@ -72,9 +74,8 @@ public class ContactHelper { partyContactMechList = EntityUtil.orderBy(partyContactMechList, UtilMisc.toList("fromDate DESC")); if (contactMechTypeId == null) { return EntityUtil.getRelated("ContactMech", null, partyContactMechList, false); -} else { -return EntityUtil.getRelated("ContactMech", UtilMisc.toMap("contactMechTypeId", contactMechTypeId), partyContactMechList, false); } +return EntityUtil.getRelated("ContactMech", UtilMisc.toMap("contactMechTypeId", contactMechTypeId), partyContactMechList, false); } catch (GenericEntityException gee) { Debug.logWarning(gee, module); return Collections.emptyList(); Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java?rev=1818425=1818424=1818425=diff == --- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechServices.java Sat Dec 16 15:42:18 2017 @@ -69,18 +69,19 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static MapcreateContactMech(DispatchContext ctx, Map context) { -Map result = new HashMap (); +Map result = new HashMap<>(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); Timestamp now = UtilDateTime.nowTimestamp(); -List toBeStored = new LinkedList(); +List toBeStored = new LinkedList<>(); String partyId = ServiceUtil.getPartyIdCheckSecurity(userLogin, security, context, result, "PARTYMGR", "_PCM_CREATE"); -if (result.size() > 0) +if (result.size() > 0) { return result; +} String contactMechTypeId = (String) context.get("contactMechTypeId"); @@ -88,7 +89,7 @@ public class ContactMechServices { try { newCmId = delegator.getNextSeqId("ContactMech"); } catch (IllegalArgumentException e) { -return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, +return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "contactmechservices.could_not_create_contact_info_id_generation_failure", locale)); } @@ -132,19 +133,20 @@ public class ContactMechServices { *@return Map with the result of the service, the output parameters */ public static Map updateContactMech(DispatchContext ctx, Map context) { -Map result = new
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/910 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: lares_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818416 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818423 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
Author: jleroux Date: Sat Dec 16 15:27:27 2017 New Revision: 1818423 URL: http://svn.apache.org/viewvc?rev=1818423=rev Log: Improved: [FB] Package org.apache.ofbiz.accounting.thirdparty.paypal (OFBIZ-9539) Simplifies the code (no functional change) after a discussion with Michael and Dennis in the Jira Thanks: Michael and Dennis Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=1818423=1818422=1818423=diff == --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Sat Dec 16 15:27:27 2017 @@ -182,8 +182,9 @@ public class PayPalEvents { return "success"; } -/** PayPal Call-Back Event */ -public static String payPalIPN(HttpServletRequest request, HttpServletResponse response) { +/** PayPal Call-Back Event + * @throws IOException */ +public static String payPalIPN(HttpServletRequest request, HttpServletResponse response) throws IOException { Locale locale = UtilHttp.getLocale(request); Delegator delegator = (Delegator) request.getAttribute("delegator"); LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); @@ -228,34 +229,20 @@ public class PayPalEvents { // send off the confirm request String confirmResp = null; -BufferedReader in = null; -PrintWriter pw = null; +String str = UtilHttp.urlEncodeArgs(parametersMap); +URL u = new URL(redirectUrl); +URLConnection uc = u.openConnection(); +uc.setDoOutput(true); +uc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); -try { -String str = UtilHttp.urlEncodeArgs(parametersMap); -URL u = new URL(redirectUrl); -URLConnection uc = u.openConnection(); -uc.setDoOutput(true); -uc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); -pw = new PrintWriter(new OutputStreamWriter(uc.getOutputStream(), "UTF-8")); -pw.println(str); +try (BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream())); +PrintWriter pw = new PrintWriter(new OutputStreamWriter(uc.getOutputStream(), "UTF-8"))) { -in = new BufferedReader(new InputStreamReader(uc.getInputStream())); +pw.println(str); confirmResp = in.readLine(); Debug.logError("PayPal Verification Response: " + confirmResp, module); } catch (IOException e) { Debug.logError(e, "Problems sending verification message.", module); -} finally { -if (in != null) { -try { -in.close(); -} catch (IOException e) { -Debug.logError(e, "Could not close BufferedReader.", module); -} -} -if (pw != null) { -pw.close(); -} } Debug.logInfo("Got verification from PayPal, processing..", module);
svn commit: r1818421 - in /ofbiz/site: ./ template/region/
Author: jleroux Date: Sat Dec 16 15:19:38 2017 New Revision: 1818421 URL: http://svn.apache.org/viewvc?rev=1818421=rev Log: Improved: Make the social networks icons more visible by moving then from the footer to the header (OFBIZ-10086) Follows http://markmail.org/message/mtwwzoopnwbgzfvq Thanks: Taher for suggestion Modified: ofbiz/site/404.html ofbiz/site/about-ofbiz.html ofbiz/site/business-users.html ofbiz/site/developers.html ofbiz/site/download.html ofbiz/site/faqs.html ofbiz/site/getting-involved.html ofbiz/site/index.html ofbiz/site/mailing-lists.html ofbiz/site/ofbiz-demos.html ofbiz/site/release-notes-13.07.03.html ofbiz/site/release-notes-16.11.03.html ofbiz/site/service-providers.html ofbiz/site/source-repositories.html ofbiz/site/template/region/footer.tpl.php ofbiz/site/template/region/header.tpl.php ofbiz/site/user-stories.html Modified: ofbiz/site/404.html URL: http://svn.apache.org/viewvc/ofbiz/site/404.html?rev=1818421=1818420=1818421=diff == --- ofbiz/site/404.html (original) +++ ofbiz/site/404.html Sat Dec 16 15:19:38 2017 @@ -79,6 +79,17 @@ Demos + + twitter + + Youtube + facebook + @@ -120,7 +131,7 @@ Latest tweets - + - + Tweets by @ApacheOfbiz !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); Modified: ofbiz/site/about-ofbiz.html URL: http://svn.apache.org/viewvc/ofbiz/site/about-ofbiz.html?rev=1818421=1818420=1818421=diff == --- ofbiz/site/about-ofbiz.html (original) +++ ofbiz/site/about-ofbiz.html Sat Dec 16 15:19:38 2017 @@ -79,6 +79,17 @@ Demos + + twitter + + Youtube + facebook + @@ -155,7 +166,7 @@ Latest tweets - + - + Tweets by @ApacheOfbiz !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); Modified: ofbiz/site/business-users.html URL: http://svn.apache.org/viewvc/ofbiz/site/business-users.html?rev=1818421=1818420=1818421=diff == --- ofbiz/site/business-users.html (original) +++ ofbiz/site/business-users.html Sat Dec 16 15:19:38 2017 @@ -79,6 +79,17 @@ Demos + + twitter + + Youtube + facebook + @@ -316,7 +327,7 @@ Latest tweets - + - + Tweets by @ApacheOfbiz !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); Modified: ofbiz/site/developers.html URL: http://svn.apache.org/viewvc/ofbiz/site/developers.html?rev=1818421=1818420=1818421=diff == --- ofbiz/site/developers.html (original) +++ ofbiz/site/developers.html Sat Dec 16 15:19:38 2017 @@ -79,6 +79,17 @@ Demos + + twitter + + Youtube + facebook + @@ -255,7 +266,7 @@ Latest tweets - + - + Tweets by @ApacheOfbiz !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); Modified: ofbiz/site/download.html URL: http://svn.apache.org/viewvc/ofbiz/site/download.html?rev=1818421=1818420=1818421=diff
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/911 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818418 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818418 - in /ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party: PartyHelper.java PartyRelationshipHelper.java PartyRelationshipServices.java Party
Author: mbrohl Date: Sat Dec 16 14:43:53 2017 New Revision: 1818418 URL: http://svn.apache.org/viewvc?rev=1818418=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.party.party. (OFBIZ-10068) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipHelper.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipServices.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java?rev=1818418=1818417=1818418=diff == --- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java Sat Dec 16 14:43:53 2017 @@ -49,9 +49,8 @@ public class PartyHelper { } if (partyObject == null) { return partyId; -} else { -return formatPartyNameObject(partyObject, lastNameFirst); } +return formatPartyNameObject(partyObject, lastNameFirst); } public static String getPartyName(GenericValue partyObject, boolean lastNameFirst) { @@ -60,21 +59,19 @@ public class PartyHelper { } if ("PartyGroup".equals(partyObject.getEntityName()) || "Person".equals(partyObject.getEntityName())) { return formatPartyNameObject(partyObject, lastNameFirst); -} else { -String partyId = null; -try { -partyId = partyObject.getString("partyId"); -} catch (IllegalArgumentException e) { -Debug.logError(e, "Party object does not contain a party ID", module); -} +} +String partyId = null; +try { +partyId = partyObject.getString("partyId"); +} catch (IllegalArgumentException e) { +Debug.logError(e, "Party object does not contain a party ID", module); +} -if (partyId == null) { -Debug.logWarning("No party ID found; cannot get name based on entity: " + partyObject.getEntityName(), module); -return ""; -} else { -return getPartyName(partyObject.getDelegator(), partyId, lastNameFirst); -} +if (partyId == null) { +Debug.logWarning("No party ID found; cannot get name based on entity: " + partyObject.getEntityName(), module); +return ""; } +return getPartyName(partyObject.getDelegator(), partyId, lastNameFirst); } public static String formatPartyNameObject(GenericValue partyValue, boolean lastNameFirst) { Modified: ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipHelper.java?rev=1818418=1818417=1818418=diff == --- ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipHelper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyRelationshipHelper.java Sat Dec 16 14:43:53 2017 @@ -56,7 +56,7 @@ public final class PartyRelationshipHelp String partyRelationshipTypeId = (String) partyRelationshipValues.get("partyRelationshipTypeId") ; Timestamp fromDate = UtilDateTime.nowTimestamp(); -List condList = new LinkedList(); +List condList = new LinkedList<>(); condList.add(EntityCondition.makeCondition("partyIdFrom", partyIdFrom)); condList.add(EntityCondition.makeCondition("partyIdTo", partyIdTo)); condList.add(EntityCondition.makeCondition("roleTypeIdFrom", roleTypeIdFrom)); @@ -79,8 +79,7 @@ public final class PartyRelationshipHelp } if (UtilValidate.isNotEmpty(partyRelationships)) { return partyRelationships; -} else { -return null; } +return null; } } Modified:
svn commit: r1818416 - in /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config: ProductConfigItemContentWrapper.java ProductConfigWorker.java ProductConfigWr
Author: mbrohl Date: Sat Dec 16 14:23:33 2017 New Revision: 1818416 URL: http://svn.apache.org/viewvc?rev=1818416=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.config. (OFBIZ-10069) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigItemContentWrapper.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWorker.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWrapper.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigItemContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigItemContentWrapper.java?rev=1818416=1818415=1818416=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigItemContentWrapper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigItemContentWrapper.java Sat Dec 16 14:23:33 2017 @@ -89,6 +89,7 @@ public class ProductConfigItemContentWra this.mimeTypeId = EntityUtilProperties.getPropertyValue("content", "defaultMimeType", "text/html; charset=utf-8", this.delegator); } +@Override public StringWrapper get(String confItemContentTypeId, String encoderType) { return StringUtil.makeStringWrapper(getProductConfigItemContentAsText(productConfigItem, confItemContentTypeId, locale, mimeTypeId, getDelegator(), getDispatcher(), encoderType)); } @@ -136,11 +137,7 @@ public class ProductConfigItemContentWra outString = encoder.sanitize(outString, null); configItemContentCache.put(cacheKey, outString); return outString; -} catch (GeneralException e) { -Debug.logError(e, "Error rendering ProdConfItemContent, inserting empty String", module); -String candidateOut = productConfigItem.getModelEntity().isField(candidateFieldName) ? productConfigItem.getString(candidateFieldName): ""; -return candidateOut == null? "" : encoder.sanitize(candidateOut, null); -} catch (IOException e) { +} catch (GeneralException | IOException e) { Debug.logError(e, "Error rendering ProdConfItemContent, inserting empty String", module); String candidateOut = productConfigItem.getModelEntity().isField(candidateFieldName) ? productConfigItem.getString(candidateFieldName): ""; return candidateOut == null? "" : encoder.sanitize(candidateOut, null); @@ -172,13 +169,13 @@ public class ProductConfigItemContentWra .queryFirst(); if (productConfigItemContent != null) { // when rendering the product config item content, always include the ProductConfigItem and ProdConfItemContent records that this comes from -MapinContext = new HashMap (); +Map inContext = new HashMap<>(); inContext.put("productConfigItem", productConfigItem); inContext.put("productConfigItemContent", productConfigItemContent); ContentWorker.renderContentAsText(dispatcher, productConfigItemContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId, null, null, cache); return; } - + String candidateFieldName = ModelUtil.dbNameToVarName(confItemContentTypeId); ModelEntity productConfigItemModel = delegator.getModelEntity("ProductConfigItem"); if (productConfigItemModel.isField(candidateFieldName)) { Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWorker.java?rev=1818416=1818415=1818416=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/config/ProductConfigWorker.java Sat Dec 16 14:23:33 2017 @@ -92,7 +92,7 @@ public final class ProductConfigWorker { Map combinedMap = UtilHttp.getCombinedMap(request); for (int k = 0; k < numOfQuestions; k++) { String[] opts = new String[0]; -Object o =
svn commit: r1818412 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java
Author: mbrohl Date: Sat Dec 16 14:12:17 2017 New Revision: 1818412 URL: http://svn.apache.org/viewvc?rev=1818412=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.image. (OFBIZ-10070) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java?rev=1818412=1818411=1818412=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java Sat Dec 16 14:12:17 2017 @@ -79,16 +79,16 @@ public class ScaleImage { /* VARIABLES */ Locale locale = (Locale) context.get("locale"); - + int index; -Map> imgPropertyMap = new HashMap >(); +Map > imgPropertyMap = new HashMap<>(); BufferedImage bufImg, bufNewImg; double imgHeight, imgWidth; -Map imgUrlMap = new HashMap (); -Map resultXMLMap = new HashMap (); -Map resultBufImgMap = new HashMap (); -Map resultScaleImgMap = new HashMap (); -Map result = new HashMap (); +Map imgUrlMap = new HashMap<>(); +Map resultXMLMap = new HashMap<>(); +Map resultBufImgMap = new HashMap<>(); +Map resultScaleImgMap = new HashMap<>(); +Map result = new HashMap<>(); /* ImageProperties.xml */ String fileName = "component://product/config/ImageProperties.xml"; @@ -108,8 +108,8 @@ public class ScaleImage { index = filenameToUse.lastIndexOf('.'); String imgExtension = filenameToUse.substring(index + 1); // paths - -Map imageContext = new HashMap (); + +Map imageContext = new HashMap<>(); imageContext.putAll(context); imageContext.put("tenantId",((Delegator)context.get("delegator")).getDelegatorTenantId()); String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.server.path", (Delegator)context.get("delegator")), imageContext); @@ -132,7 +132,7 @@ public class ScaleImage { id = id + "_View_" + viewNumber; } else { viewType = "additional" + viewNumber; -} +} fileLocation = filenameExpander.expandString(UtilMisc.toMap("location", "products", "id", id, "viewtype", viewType, "sizetype", "original")); } else { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductImageViewType", UtilMisc.toMap("viewType", viewType), locale)); @@ -141,7 +141,7 @@ public class ScaleImage { if (fileLocation.lastIndexOf('/') != -1) { fileLocation = fileLocation.substring(0, fileLocation.lastIndexOf('/') + 1); // adding 1 to include the trailing slash } - + /* get original BUFFERED IMAGE */ resultBufImgMap.putAll(ImageTransform.getBufferedImage(imageServerPath + "/" + fileLocation + "." + imgExtension, locale)); @@ -161,7 +161,7 @@ public class ScaleImage { /* Scale image for each size from ImageProperties.xml */ for (Map.Entry > entry : imgPropertyMap.entrySet()) { String sizeType = entry.getKey(); - + // Scale resultScaleImgMap.putAll(ImageTransform.scaleImage(bufImg, imgHeight, imgWidth, imgPropertyMap, sizeType, locale)); @@ -180,7 +180,7 @@ public class ScaleImage { String newFilePathPrefix = ""; if (newFileLocation != null && newFileLocation.lastIndexOf('/') != -1) { newFilePathPrefix = newFileLocation.substring(0, newFileLocation.lastIndexOf('/') + 1); // adding 1 to include the trailing slash -} +} // Directory String targetDirectory = imageServerPath + "/" + newFilePathPrefix; try { @@ -197,11 +197,12 @@ public class ScaleImage { // Images aren't
svn commit: r1818411 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/
Author: mbrohl Date: Sat Dec 16 14:09:52 2017 New Revision: 1818411 URL: http://svn.apache.org/viewvc?rev=1818411=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.imagemanagement. (OFBIZ-10071) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/CropImage.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/FrameImage.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementHelper.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageUrlServlet.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ReplaceImage.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/RotateImage.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/CropImage.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/CropImage.java?rev=1818411=1818410=1818411=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/CropImage.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/CropImage.java Sat Dec 16 14:09:52 2017 @@ -40,7 +40,6 @@ import org.apache.ofbiz.service.Dispatch import org.apache.ofbiz.service.GenericServiceException; import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.ServiceUtil; -import org.jdom.JDOMException; public class CropImage { @@ -50,22 +49,22 @@ public class CropImage { public static final String resource = "ProductUiLabels"; public static MapimageCrop(DispatchContext dctx, Map context) -throws IOException, JDOMException { +throws IOException { LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dispatcher.getDelegator(); Locale locale = (Locale)context.get("locale"); GenericValue userLogin = (GenericValue) context.get("userLogin"); String nameOfThumb = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.nameofthumbnail", delegator), context); - + String productId = (String) context.get("productId"); String imageName = (String) context.get("imageName"); String imageX = (String) context.get("imageX"); String imageY = (String) context.get("imageY"); String imageW = (String) context.get("imageW"); String imageH = (String) context.get("imageH"); - + if (UtilValidate.isNotEmpty(imageName)) { -Map contentCtx = new HashMap (); +Map contentCtx = new HashMap<>(); contentCtx.put("contentTypeId", "DOCUMENT"); contentCtx.put("userLogin", userLogin); Map contentResult; @@ -75,8 +74,8 @@ public class CropImage { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - -Map contentThumb = new HashMap (); + +Map contentThumb = new HashMap<>(); contentThumb.put("contentTypeId", "DOCUMENT"); contentThumb.put("userLogin", userLogin); Map contentThumbResult; @@ -86,38 +85,38 @@ public class CropImage { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); } - + String contentIdThumb = (String) contentThumbResult.get("contentId"); String contentId = (String) contentResult.get("contentId"); String filenameToUse = (String) contentResult.get("contentId") + ".jpg"; String filenameTouseThumb = (String) contentResult.get("contentId") + nameOfThumb + ".jpg"; - + String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.path", delegator), context); String imageServerUrl = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.url",
buildbot failure in on ofbiz-trunk-framework-plugins
The Buildbot has detected a new failure on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/908 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818402 Blamelist: jleroux,mbrohl BUILD FAILED: failed shell_4 Sincerely, -The Buildbot
svn commit: r1818409 - in /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory: InventoryServices.java InventoryWorker.java
Author: mbrohl Date: Sat Dec 16 14:00:24 2017 New Revision: 1818409 URL: http://svn.apache.org/viewvc?rev=1818409=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.inventory. (OFBIZ-10072) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java?rev=1818409=1818408=1818409=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java Sat Dec 16 14:00:24 2017 @@ -75,12 +75,12 @@ public class InventoryServices { try { inventoryItem = EntityQuery.use(delegator).from("InventoryItem").where("inventoryItemId", inventoryItemId).queryOne(); } catch (GenericEntityException e) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductNotFindInventoryItemWithId", locale) + inventoryItemId); } if (inventoryItem == null) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductNotFindInventoryItemWithId", locale) + inventoryItemId); } @@ -93,7 +93,7 @@ public class InventoryServices { BigDecimal qoh = inventoryItem.getBigDecimal("quantityOnHandTotal"); if (atp == null) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductInventoryItemATPNotAvailable", UtilMisc.toMap("inventoryItemId", inventoryItem.getString("inventoryItemId")), locale)); } @@ -103,7 +103,7 @@ public class InventoryServices { // first make sure we have enough to cover the request transfer amount if (xferQty.compareTo(atp) > 0) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductInventoryItemATPIsNotSufficient", UtilMisc.toMap("inventoryItemId", inventoryItem.getString("inventoryItemId"), "atp", atp, "xferQty", xferQty), locale)); @@ -142,19 +142,19 @@ public class InventoryServices { try { MapresultNew = dctx.getDispatcher().runSync("createInventoryItemDetail", createNewDetailMap); if (ServiceUtil.isError(resultNew)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, -"ProductInventoryItemDetailCreateProblem", +return ServiceUtil.returnError(UtilProperties.getMessage(resource, +"ProductInventoryItemDetailCreateProblem", UtilMisc.toMap("errorString", ""), locale), null, null, resultNew); } Map resultUpdate = dctx.getDispatcher().runSync("createInventoryItemDetail", createUpdateDetailMap); if (ServiceUtil.isError(resultUpdate)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, -"ProductInventoryItemDetailCreateProblem", +return ServiceUtil.returnError(UtilProperties.getMessage(resource, +"ProductInventoryItemDetailCreateProblem", UtilMisc.toMap("errorString", ""), locale), null, null, resultUpdate); } } catch (GenericServiceException e1) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, -"ProductInventoryItemDetailCreateProblem", +return
svn commit: r1818408 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
Author: mbrohl Date: Sat Dec 16 13:58:14 2017 New Revision: 1818408 URL: http://svn.apache.org/viewvc?rev=1818408=rev Log: Improved: No functional change, just corrected an indentation. Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java?rev=1818408=1818407=1818408=diff == --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java Sat Dec 16 13:58:14 2017 @@ -307,9 +307,9 @@ public class DataResourceWorker impleme MappermResults = new HashMap<>(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); -if (Debug.infoOn()) { -Debug.logInfo("in callDataResourcePermissionCheckResult, skipPermissionCheck:" + skipPermissionCheck,""); -} +if (Debug.infoOn()) { +Debug.logInfo("in callDataResourcePermissionCheckResult, skipPermissionCheck:" + skipPermissionCheck,""); +} if (UtilValidate.isEmpty(skipPermissionCheck) || (!"true".equalsIgnoreCase(skipPermissionCheck) && !"granted".equalsIgnoreCase(skipPermissionCheck))) {
svn commit: r1818406 [2/2] - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/
Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java?rev=1818406=1818405=1818406=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java Sat Dec 16 13:56:19 2017 @@ -88,13 +88,13 @@ public class ProductServices { Delegator delegator = dctx.getDelegator(); Locale locale = (Locale) context.get("locale"); MapselectedFeatures = UtilGenerics.checkMap(context.get("selectedFeatures")); -List products = new LinkedList(); +List products = new LinkedList<>(); // All the variants for this products are retrieved Map resVariants = prodFindAllVariants(dctx, context); List variants = UtilGenerics.checkList(resVariants.get("assocProducts")); for (GenericValue oneVariant: variants) { // For every variant, all the standard features are retrieved -Map feaContext = new HashMap (); +Map feaContext = new HashMap<>(); feaContext.put("productId", oneVariant.getString("productIdTo")); feaContext.put("type", "STANDARD_FEATURE"); Map resFeatures = prodGetFeatures(dctx, feaContext); @@ -145,7 +145,7 @@ public class ProductServices { } Locale locale = (Locale) context.get("locale"); String errMsg=null; -Set featureSet = new LinkedHashSet(); +Set featureSet = new LinkedHashSet<>(); try { List features = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", productId, "productFeatureApplTypeId", productFeatureApplTypeId).orderBy("sequenceNum", "productFeatureTypeId").cache(true).filterByDate().queryList(); @@ -178,22 +178,22 @@ public class ProductServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); -Map result = new HashMap (); +Map result = new HashMap<>(); List featureOrder = UtilMisc.makeListWritable(UtilGenerics.checkCollection(context.get("featureOrder"))); if (UtilValidate.isEmpty(featureOrder)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductFeatureTreeCannotFindFeaturesList", locale)); } List variants = UtilGenerics.checkList(prodFindAllVariants(dctx, context).get("assocProducts")); -List virtualVariant = new LinkedList(); +List virtualVariant = new LinkedList<>(); if (UtilValidate.isEmpty(variants)) { return ServiceUtil.returnSuccess(); } -List items = new LinkedList(); -List outOfStockItems = new LinkedList(); +List items = new LinkedList<>(); +List outOfStockItems = new LinkedList<>(); for (GenericValue variant: variants) { String productIdTo = variant.getString("productIdTo"); @@ -206,7 +206,7 @@ public class ProductServices { } catch (GenericEntityException e) { Debug.logError(e, module); Map messageMap = UtilMisc.toMap("productIdTo", productIdTo, "errMessage", e.toString()); -return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, +return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "productservices.error_finding_associated_variant_with_ID_error", messageMap, locale)); } if (productTo == null) { @@ -244,7 +244,7 @@ public class ProductServices { if (checkInventory) { Map invReqResult = dispatcher.runSync("isStoreInventoryAvailableOrNotRequired", UtilMisc. toMap("productStoreId", productStoreId, "productId", productIdTo, "quantity", BigDecimal.ONE)); if (ServiceUtil.isError(invReqResult)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, +return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductFeatureTreeCannotCallIsStoreInventoryRequired", locale), null, null, invReqResult); } else if ("Y".equals(invReqResult.get("availableOrNotRequired")))
svn commit: r1818406 [1/2] - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/
Author: mbrohl Date: Sat Dec 16 13:56:19 2017 New Revision: 1818406 URL: http://svn.apache.org/viewvc?rev=1818406=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.product. (OFBIZ-10073) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/KeywordIndex.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductContentWrapper.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductEvents.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductPromoContentWrapper.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearch.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchEvents.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductUtilServices.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/KeywordIndex.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/KeywordIndex.java?rev=1818406=1818405=1818406=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/KeywordIndex.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/KeywordIndex.java Sat Dec 16 13:56:19 2017 @@ -57,7 +57,9 @@ public class KeywordIndex { } public static void indexKeywords(GenericValue product, boolean doAll) throws GenericEntityException { -if (product == null) return; +if (product == null) { +return; +} Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); Delegator delegator = product.getDelegator(); if (!doAll) { @@ -73,8 +75,10 @@ public class KeywordIndex { return; } } - -if (delegator == null) return; + +if (delegator == null) { +return; +} String productId = product.getString("productId"); // get these in advance just once since they will be used many times for the multiple strings to index @@ -84,8 +88,8 @@ public class KeywordIndex { boolean removeStems = KeywordSearchUtil.getRemoveStems(); Set stemSet = KeywordSearchUtil.getStemSet(); -Mapkeywords = new TreeMap (); -List strings = new LinkedList(); +Map keywords = new TreeMap<>(); +List strings = new LinkedList<>(); int pidWeight = 1; try { @@ -189,7 +193,7 @@ public class KeywordIndex { } } -List toBeStored = new LinkedList(); +List toBeStored = new LinkedList<>(); int keywordMaxLength = EntityUtilProperties.getPropertyAsInteger("prodsearch", "product.keyword.max.length", 0).intValue(); for (Map.Entry entry: keywords.entrySet()) { if (entry.getKey().length() <= keywordMaxLength) { @@ -198,7 +202,9 @@ public class KeywordIndex { } } if (toBeStored.size() > 0) { -if (Debug.verboseOn()) Debug.logVerbose("[KeywordIndex.indexKeywords] Storing " + toBeStored.size() + " keywords for productId " + product.getString("productId"), module); +if (Debug.verboseOn()) { +Debug.logVerbose("[KeywordIndex.indexKeywords] Storing " + toBeStored.size() + " keywords for productId " + product.getString("productId"), module); +} if ("true".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.delete.on_index", "false", delegator))) { // delete all keywords if the properties file says to @@ -216,9 +222,7 @@ public class KeywordIndex { for (int i = 0; i < weight; i++) { strings.add(contentText); } -} catch (IOException e1) { -Debug.logError(e1, "Error getting content text to index", module); -} catch (GeneralException e1) { +} catch (GeneralException | IOException e1) { Debug.logError(e1,
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/907 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818399 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/871 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818400 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818403 - in /ofbiz/branches/release16.11: ./ framework/catalina/ofbiz-component.xml
Author: jleroux Date: Sat Dec 16 13:47:23 2017 New Revision: 1818403 URL: http://svn.apache.org/viewvc?rev=1818403=rev Log: "Applied fix from trunk framework for revision: 1818402" r1818402 | jleroux | 2017-12-16 14:46:35 +0100 (sam., 16 déc. 2017) | 15 lines Fixed: Prevent the possible return of the Robot attack (OFBIZ-10085) After reading https://robotattack.org/ and testing https://robotattack.org/check/?h=demo-trunk.ofbiz.apache.org which returned (same for stable and old) This host is not vulnerable. However it still allows connections with the problematic RSA encryption ciphers. I concluded that we should remove RSA encryption ciphers from our Tomcat config. See https://tomcat.apache.org/tomcat-8.5-doc/config/http.html This removes RSA from ciphers and also sslProtocol which is now TLS by default Modified: ofbiz/branches/release16.11/ (props changed) ofbiz/branches/release16.11/framework/catalina/ofbiz-component.xml Propchange: ofbiz/branches/release16.11/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Dec 16 13:47:23 2017 @@ -10,5 +10,5 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801318-1801319,1801336,1801340,1801346,1801359,1801742,1802657,1802766,1803525,1804656,1804843,1804847,1804859,1805143,1805558,1805880,1806036,1806220,1806266,1806269,1806951,1807597,1807890,1808834,1809399,1809429,1809594,1809741,1810102,1811794,1812387,1813600,1813617,1813647,1813833,1814277,1814319,1814349,1814501,1814591,1814642,1814644,1814709,1814873,1814928,1814934,1815059,1816264,1816273,1816289,1816291,1816297,1816369,1816373, 1816461,1816635,1816795,1818101,1818269,1818273 +/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801318-1801319,1801336,1801340,1801346,1801359,1801742,1802657,1802766,1803525,1804656,1804843,1804847,1804859,1805143,1805558,1805880,1806036,1806220,1806266,1806269,1806951,1807597,1807890,1808834,1809399,1809429,1809594,1809741,1810102,1811794,1812387,1813600,1813617,1813647,1813833,1814277,1814319,1814349,1814501,1814591,1814642,1814644,1814709,1814873,1814928,1814934,1815059,1816264,1816273,1816289,1816291,1816297,1816369,1816373, 1816461,1816635,1816795,1818101,1818269,1818273,1818402 /ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520 Modified: ofbiz/branches/release16.11/framework/catalina/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/catalina/ofbiz-component.xml?rev=1818403=1818402=1818403=diff == --- ofbiz/branches/release16.11/framework/catalina/ofbiz-component.xml (original) +++ ofbiz/branches/release16.11/framework/catalina/ofbiz-component.xml Sat Dec 16 13:47:23 2017 @@ -147,8 +147,7 @@ under the License. - - + @@ -207,8 +206,7 @@ under the License. - - +
svn commit: r1818402 - /ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml
Author: jleroux Date: Sat Dec 16 13:46:35 2017 New Revision: 1818402 URL: http://svn.apache.org/viewvc?rev=1818402=rev Log: Fixed: Prevent the possible return of the Robot attack (OFBIZ-10085) After reading https://robotattack.org/ and testing https://robotattack.org/check/?h=demo-trunk.ofbiz.apache.org which returned (same for stable and old) This host is not vulnerable. However it still allows connections with the problematic RSA encryption ciphers. I concluded that we should remove RSA encryption ciphers from our Tomcat config. See https://tomcat.apache.org/tomcat-8.5-doc/config/http.html This removes RSA from ciphers and also sslProtocol which is now TLS by default Modified: ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml Modified: ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml?rev=1818402=1818401=1818402=diff == --- ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/catalina/ofbiz-component.xml Sat Dec 16 13:46:35 2017 @@ -147,8 +147,7 @@ under the License. - - + @@ -207,8 +206,7 @@ under the License. - - +
svn commit: r1818400 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java
Author: mbrohl Date: Sat Dec 16 13:41:22 2017 New Revision: 1818400 URL: http://svn.apache.org/viewvc?rev=1818400=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.subscription. (OFBIZ-10074) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java?rev=1818400=1818399=1818400=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/subscription/SubscriptionServices.java Sat Dec 16 13:41:22 2017 @@ -55,7 +55,7 @@ public class SubscriptionServices { public static final String resource = "ProductUiLabels"; public static final String resourceError = "ProductErrorUiLabels"; public static final String resourceOrderError = "OrderErrorUiLabels"; - + public static MapprocessExtendSubscription(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); @@ -76,7 +76,9 @@ public class SubscriptionServices { try { Map subscriptionFindMap = UtilMisc.toMap("partyId", partyId, "subscriptionResourceId", subscriptionResourceId); // if this subscription is attached to something the customer owns, filter by that too -if (UtilValidate.isNotEmpty(inventoryItemId)) subscriptionFindMap.put("inventoryItemId", inventoryItemId); +if (UtilValidate.isNotEmpty(inventoryItemId)) { +subscriptionFindMap.put("inventoryItemId", inventoryItemId); +} List subscriptionList = EntityQuery.use(delegator).from("Subscription").where(subscriptionFindMap).queryList(); // DEJ20070718 DON'T filter by date, we want to consider all subscriptions: List listFiltered = EntityUtil.filterByDate(subscriptionList, true); List listOrdered = EntityUtil.orderBy(subscriptionList, UtilMisc.toList("-fromDate")); @@ -143,21 +145,21 @@ public class SubscriptionServices { Map updateSubscriptionResult = dispatcher.runSync("updateSubscription", updateSubscriptionMap); result.put("subscriptionId", updateSubscriptionMap.get("subscriptionId")); if (ServiceUtil.isError(updateSubscriptionResult)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, -"ProductSubscriptionUpdateError", +return ServiceUtil.returnError(UtilProperties.getMessage(resource, +"ProductSubscriptionUpdateError", UtilMisc.toMap("subscriptionId", updateSubscriptionMap.get("subscriptionId")), locale), null, null, updateSubscriptionResult); } } else { -Map ensurePartyRoleMap = new HashMap (); +Map ensurePartyRoleMap = new HashMap<>(); if (UtilValidate.isNotEmpty(roleTypeId)) { ensurePartyRoleMap.put("partyId", partyId); ensurePartyRoleMap.put("roleTypeId", roleTypeId); ensurePartyRoleMap.put("userLogin", userLogin); Map createPartyRoleResult = dispatcher.runSync("ensurePartyRole", ensurePartyRoleMap); if (ServiceUtil.isError(createPartyRoleResult)) { -return ServiceUtil.returnError(UtilProperties.getMessage(resource, -"ProductSubscriptionPartyRoleCreationError", +return ServiceUtil.returnError(UtilProperties.getMessage(resource, +"ProductSubscriptionPartyRoleCreationError", UtilMisc.toMap("subscriptionResourceId", subscriptionResourceId), locale), null, null, createPartyRoleResult); } @@ -167,16 +169,14 @@ public class SubscriptionServices { Map createSubscriptionResult = dispatcher.runSync("createSubscription", createSubscriptionMap); if (ServiceUtil.isError(createSubscriptionResult)) { -return
svn commit: r1818399 - /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java
Author: mbrohl Date: Sat Dec 16 13:39:19 2017 New Revision: 1818399 URL: http://svn.apache.org/viewvc?rev=1818399=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.supplier. (OFBIZ-10075) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java?rev=1818399=1818398=1818399=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/supplier/SupplierProductServices.java Sat Dec 16 13:39:19 2017 @@ -21,7 +21,6 @@ package org.apache.ofbiz.product.supplie import java.math.BigDecimal; import java.util.Collection; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -114,9 +113,6 @@ public class SupplierProductServices { } catch (GenericEntityException ex) { Debug.logError(ex, ex.getMessage(), module); return ServiceUtil.returnError(ex.getMessage()); -} catch (Exception ex) { -Debug.logError(ex, ex.getMessage(), module); -return ServiceUtil.returnError(ex.getMessage()); } return results; }
svn commit: r1818398 - in /ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test: InventoryItemTransferTest.java StockMovesTest.java
Author: mbrohl Date: Sat Dec 16 13:36:11 2017 New Revision: 1818398 URL: http://svn.apache.org/viewvc?rev=1818398=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.product.test. (OFBIZ-10076) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/InventoryItemTransferTest.java ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/StockMovesTest.java Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/InventoryItemTransferTest.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/InventoryItemTransferTest.java?rev=1818398=1818397=1818398=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/InventoryItemTransferTest.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/InventoryItemTransferTest.java Sat Dec 16 13:36:11 2017 @@ -49,7 +49,7 @@ public class InventoryItemTransferTest e public void testCreateInventoryItemsTransfer() throws Exception { // create -Mapctx = new HashMap (); +Map ctx = new HashMap<>(); String inventoryItemId = "9005"; ctx.put("inventoryItemId", inventoryItemId); ctx.put("statusId", "IXF_REQUESTED"); @@ -63,7 +63,7 @@ public class InventoryItemTransferTest e assertNotNull(inventoryTransferId); // transfer -ctx = new HashMap (); +ctx = new HashMap<>(); ctx.put("inventoryTransferId", getInventoryTransferId()); ctx.put("inventoryItemId", inventoryItemId); ctx.put("statusId", "IXF_COMPLETE"); Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/StockMovesTest.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/StockMovesTest.java?rev=1818398=1818397=1818398=diff == --- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/StockMovesTest.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/test/StockMovesTest.java Sat Dec 16 13:36:11 2017 @@ -21,7 +21,6 @@ package org.apache.ofbiz.product.test; import java.math.BigDecimal; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -51,7 +50,7 @@ public class StockMovesTest extends OFBi } public void testStockMoves() throws Exception { -Map fsmnCtx = new HashMap (); +Map fsmnCtx = new HashMap<>(); Map stockMoveHandled = null; List warningList; @@ -69,7 +68,7 @@ public class StockMovesTest extends OFBi warningList = UtilGenerics.checkList(respMap2.get("warningMessageList")); assertNull(warningList); -Map ppsmCtx = new HashMap (); +Map ppsmCtx = new HashMap<>(); ppsmCtx.put("productId", "GZ-2644"); ppsmCtx.put("facilityId", "WebStoreWarehouse"); ppsmCtx.put("locationSeqId","TLTLTLUL01");
svn commit: r1818392 - in /ofbiz: ofbiz-framework/trunk/README.md tools/wiki-files/README.md.html
Author: jleroux Date: Sat Dec 16 12:50:23 2017 New Revision: 1818392 URL: http://svn.apache.org/viewvc?rev=1818392=rev Log: No functional change, links to Further reading section from Quick start section Modified: ofbiz/ofbiz-framework/trunk/README.md ofbiz/tools/wiki-files/README.md.html Modified: ofbiz/ofbiz-framework/trunk/README.md URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/README.md?rev=1818392=1818391=1818392=diff == --- ofbiz/ofbiz-framework/trunk/README.md (original) +++ ofbiz/ofbiz-framework/trunk/README.md Sat Dec 16 12:50:23 2017 @@ -57,6 +57,8 @@ Quick start To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder) +In case of problems visit our [Further reading section](#further-reading) + ### Prepare OFBiz: >_Note_: Depending on your Internet connection speed it might take a long Modified: ofbiz/tools/wiki-files/README.md.html URL: http://svn.apache.org/viewvc/ofbiz/tools/wiki-files/README.md.html?rev=1818392=1818391=1818392=diff == --- ofbiz/tools/wiki-files/README.md.html (original) +++ ofbiz/tools/wiki-files/README.md.html Sat Dec 16 12:50:23 2017 @@ -48,6 +48,7 @@ under the License. http://www.oracle.com/technetwork/java/javase/downloads/index.html;>JDK download Quick start To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder) +In case of problems visit our Further reading section Prepare OFBiz: Note: Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/904 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818387 Blamelist: mbrohl Build succeeded! Sincerely, -The Buildbot
svn commit: r1818388 - in /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data: DataEvents.java DataResourceWorker.java DataServices.java
Author: mbrohl Date: Sat Dec 16 11:58:56 2017 New Revision: 1818388 URL: http://svn.apache.org/viewvc?rev=1818388=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.content.data. (OFBIZ-10077) Thanks Julian Leichert for reporting and providing the patches. Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java?rev=1818388=1818387=1818388=diff == --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataEvents.java Sat Dec 16 11:58:56 2017 @@ -185,11 +185,7 @@ public class DataEvents { MapresourceData; try { resourceData = DataResourceWorker.getDataResourceStream(dataResource, https, webSiteId, locale, contextRoot, false); -} catch (IOException e) { -Debug.logError(e, "Error getting DataResource stream", module); -request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); -return "error"; -} catch (GeneralException e) { +} catch (IOException | GeneralException e) { Debug.logError(e, "Error getting DataResource stream", module); request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); return "error"; @@ -287,17 +283,7 @@ public class DataEvents { Map resourceData = DataResourceWorker.getDataResourceStream(dataResource, "", application.getInitParameter("webSiteId"), UtilHttp.getLocale(request), application.getRealPath("/"), false); os.write(IOUtils.toByteArray((ByteArrayInputStream)resourceData.get("stream"))); os.flush(); -} catch (GenericEntityException e) { -String errMsg = "Error downloading digital product content: " + e.toString(); -Debug.logError(e, errMsg, module); -request.setAttribute("_ERROR_MESSAGE_", errMsg); -return "error"; -} catch (GeneralException e) { -String errMsg = "Error downloading digital product content: " + e.toString(); -Debug.logError(e, errMsg, module); -request.setAttribute("_ERROR_MESSAGE_", errMsg); -return "error"; -} catch (IOException e) { +} catch (GeneralException | IOException e) { String errMsg = "Error downloading digital product content: " + e.toString(); Debug.logError(e, errMsg, module); request.setAttribute("_ERROR_MESSAGE_", errMsg); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java?rev=1818388=1818387=1818388=diff == --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java Sat Dec 16 11:58:56 2017 @@ -129,16 +129,17 @@ public class DataResourceWorker impleme .where("parentCategoryId", parentCategoryId) .cache().queryList(); categoryNode.put("count", Integer.valueOf(categoryValues.size())); -List > subCategoryIds = new LinkedList >(); +List > subCategoryIds = new LinkedList<>(); for (GenericValue category : categoryValues) { String id = (String) category.get("dataCategoryId"); String categoryName = (String) category.get("categoryName"); -Map newNode = new HashMap (); +Map newNode = new HashMap<>(); newNode.put("id", id); newNode.put("name", categoryName); errorMsg = getDataCategoryMap(delegator, depth + 1, newNode, categoryTypeIds, getAll); -if (errorMsg != null) +if (errorMsg != null) { break; +} subCategoryIds.add(newNode);
buildbot success in on ofbiz-trunk-framework
The Buildbot has detected a restored build on builder ofbiz-trunk-framework while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework/builds/866 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818386 Blamelist: rishi Build succeeded! Sincerely, -The Buildbot
svn commit: r1818387 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java
Author: mbrohl Date: Sat Dec 16 11:52:32 2017 New Revision: 1818387 URL: http://svn.apache.org/viewvc?rev=1818387=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.content.output. (OFBIZ-10078) Thanks Julian Leichert for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java?rev=1818387=1818386=1818387=diff == --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/output/OutputServices.java Sat Dec 16 11:52:32 2017 @@ -95,7 +95,7 @@ public class OutputServices { String printerContentType = (String) serviceContext.remove("printerContentType"); if (UtilValidate.isEmpty(screenContext)) { -screenContext = new HashMap(); +screenContext = new HashMap<>(); } screenContext.put("locale", locale); if (UtilValidate.isEmpty(contentType)) { @@ -211,7 +211,7 @@ public class OutputServices { String fileName = (String) serviceContext.remove("fileName"); if (UtilValidate.isEmpty(screenContext)) { -screenContext = new HashMap (); +screenContext = new HashMap<>(); } screenContext.put("locale", locale); if (UtilValidate.isEmpty(contentType)) {
svn commit: r1818386 - /ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml
Author: rishi Date: Sat Dec 16 11:44:53 2017 New Revision: 1818386 URL: http://svn.apache.org/viewvc?rev=1818386=rev Log: Improved: Move all data in applications to the datamodel component. Removed unused files. (OFBIZ-9501) Removed: ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml
svn commit: r1818385 - in /ofbiz/ofbiz-framework/trunk/applications: commonext/data/EntityDiagramGroupData.xml commonext/ofbiz-component.xml datamodel/data/seed/CommonExtSeedData.xml datamodel/ofbiz-c
Author: rishi Date: Sat Dec 16 11:39:52 2017 New Revision: 1818385 URL: http://svn.apache.org/viewvc?rev=1818385=rev Log: Improved: Move all data in applications to the datamodel component. Moved seed data from commonext component. Left the protlet, security and help data. (OFBIZ-9501) Thanks to Jacques and Taher for your help and finalizing the directions. Added: ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/CommonExtSeedData.xml (with props) Modified: ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml ofbiz/ofbiz-framework/trunk/applications/commonext/ofbiz-component.xml ofbiz/ofbiz-framework/trunk/applications/datamodel/ofbiz-component.xml Modified: ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml?rev=1818385=1818384=1818385=diff == --- ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/commonext/data/EntityDiagramGroupData.xml Sat Dec 16 11:39:52 2017 @@ -18,249 +18,4 @@ specific language governing permissions under the License. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -- - - Modified: ofbiz/ofbiz-framework/trunk/applications/commonext/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/commonext/ofbiz-component.xml?rev=1818385=1818384=1818385=diff == --- ofbiz/ofbiz-framework/trunk/applications/commonext/ofbiz-component.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/commonext/ofbiz-component.xml Sat Dec 16 11:39:52 2017 @@ -24,7 +24,6 @@ under the License. - Added: ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/CommonExtSeedData.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/CommonExtSeedData.xml?rev=1818385=auto == --- ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/CommonExtSeedData.xml (added) +++ ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/CommonExtSeedData.xml Sat Dec 16 11:39:52 2017 @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
buildbot success in on ofbiz-trunk-framework-plugins
The Buildbot has detected a restored build on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/901 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818381 Blamelist: jleroux Build succeeded! Sincerely, -The Buildbot
svn commit: r1818381 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
Author: jleroux Date: Sat Dec 16 11:01:48 2017 New Revision: 1818381 URL: http://svn.apache.org/viewvc?rev=1818381=rev Log: No functional change, just trivial formatting. I don't see why Buildbot is complaining on my last commit. Since I spotted a possible formatting improvement I commit it while waiting my machine to confirm locally that there is actually no tests issues. Easier than starting a new Buildbot build manually. Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=1818381=1818380=1818381=diff == --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java Sat Dec 16 11:01:48 2017 @@ -88,7 +88,8 @@ public class TaxAuthorityServices { try { GenericValue product = EntityQuery.use(delegator) .from("Product") -.where("productId", productId).cache() +.where("productId", productId) +.cache() .queryOne(); GenericValue productStore = EntityQuery.use(delegator) .from("ProductStore")
buildbot failure in on ofbiz-trunk-framework-plugins
The Buildbot has detected a new failure on builder ofbiz-trunk-framework-plugins while building . Full details are available at: https://ci.apache.org/builders/ofbiz-trunk-framework-plugins/builds/900 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-ofbiz-framework-commit' triggered this build Build Source Stamp: [branch ofbiz/ofbiz-framework/trunk] 1818378 Blamelist: jleroux BUILD FAILED: failed shell_4 Sincerely, -The Buildbot
svn commit: r1818378 - /ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
Author: jleroux Date: Sat Dec 16 09:28:37 2017 New Revision: 1818378 URL: http://svn.apache.org/viewvc?rev=1818378=rev Log: No functional change, just trivial formatting I began to reformat this supposed refactoring commit, but stopped and decided to rather discuss this in the related Jira. BTW automatically cutting lines at some narrow width does not make sense most of the time. See EntityQuery cases for instance, are they not easier to read when, IMO, rightly formatted, as I did here? Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=1818378=1818377=1818378=diff == --- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java Sat Dec 16 09:28:37 2017 @@ -63,8 +63,7 @@ public class TaxAuthorityServices { public static final int salestaxRounding = UtilNumber.getBigDecimalRoundingMode("salestax.rounding"); public static final String resource = "AccountingUiLabels"; -public static MaprateProductTaxCalcForDisplay(DispatchContext dctx, -Map context) { +public static Map rateProductTaxCalcForDisplay(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); String productStoreId = (String) context.get("productStoreId"); String billToPartyId = (String) context.get("billToPartyId"); @@ -87,20 +86,27 @@ public class TaxAuthorityServices { } try { -GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).cache() +GenericValue product = EntityQuery.use(delegator) +.from("Product") +.where("productId", productId).cache() +.queryOne(); +GenericValue productStore = EntityQuery.use(delegator) +.from("ProductStore") +.where("productStoreId", productStoreId) +.cache() .queryOne(); -GenericValue productStore = EntityQuery.use(delegator).from("ProductStore").where("productStoreId", -productStoreId).cache().queryOne(); if (productStore == null) { -throw new IllegalArgumentException("Could not find ProductStore with ID [" + productStoreId -+ "] for tax calculation"); +throw new IllegalArgumentException("Could not find ProductStore with ID [" + productStoreId + "] for tax calculation"); } if ("Y".equals(productStore.getString("showPricesWithVatTax"))) { Set taxAuthoritySet = new HashSet<>(); if (productStore.get("vatTaxAuthPartyId") == null) { -List taxAuthorityRawList = EntityQuery.use(delegator).from("TaxAuthority") -.where("taxAuthGeoId", productStore.get("vatTaxAuthGeoId")).cache().queryList(); +List taxAuthorityRawList = EntityQuery.use(delegator) +.from("TaxAuthority") +.where("taxAuthGeoId", productStore.get("vatTaxAuthGeoId")) +.cache() +.queryList(); taxAuthoritySet.addAll(taxAuthorityRawList); } else { GenericValue taxAuthority = EntityQuery.use(delegator).from("TaxAuthority").where("taxAuthGeoId", @@ -175,7 +181,9 @@ public class TaxAuthorityServices { GenericValue facility = null; try { if (productStoreId != null) { -productStore = EntityQuery.use(delegator).from("ProductStore").where("productStoreId", productStoreId) +productStore = EntityQuery.use(delegator) +.from("ProductStore") +.where("productStoreId", productStoreId) .queryOne(); } if (facilityId != null) {