Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java Sun Apr 21 12:49:52 2019 @@ -93,7 +93,7 @@ public class UploadContentAndImage { return "error"; } - Map<String, Object> passedParams = new HashMap<String, Object>(); + Map<String, Object> passedParams = new HashMap<>(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes = {}; @@ -121,7 +121,7 @@ public class UploadContentAndImage { passedParams.put("targetOperationList", targetOperationList); // Create or update FTL template - Map<String, Object> ftlContext = new HashMap<String, Object>(); + Map<String, Object> ftlContext = new HashMap<>(); ftlContext.put("userLogin", userLogin); ftlContext.put("contentId", passedParams.get("ftlContentId")); ftlContext.put("ownerContentId", passedParams.get("ownerContentId")); @@ -152,7 +152,7 @@ public class UploadContentAndImage { } String ftlContentId = (String)ftlResults.get("contentId"); if (UtilValidate.isNotEmpty(contentIdTo)) { - Map<String, Object> map = new HashMap<String, Object>(); + Map<String, Object> map = new HashMap<>(); map.put("fromDate", UtilDateTime.nowTimestamp()); map.put("contentId", ftlContentId); map.put("contentIdTo", contentIdTo); @@ -195,7 +195,7 @@ public class UploadContentAndImage { if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]ftlContentId:" + ftlContentId, module); // Create or update summary text subContent if (passedParams.containsKey("summaryData")) { - Map<String, Object> sumContext = new HashMap<String, Object>(); + Map<String, Object> sumContext = new HashMap<>(); sumContext.put("userLogin", userLogin); sumContext.put("contentId", passedParams.get("sumContentId")); sumContext.put("ownerContentId", ftlContentId); @@ -225,7 +225,7 @@ public class UploadContentAndImage { // Create or update electronic text subContent if (passedParams.containsKey("textData")) { - Map<String, Object> txtContext = new HashMap<String, Object>(); + Map<String, Object> txtContext = new HashMap<>(); txtContext.put("userLogin", userLogin); txtContext.put("contentId", passedParams.get("txtContentId")); txtContext.put("ownerContentId", ftlContentId); @@ -254,7 +254,7 @@ public class UploadContentAndImage { } // Create or update image subContent - Map<String, Object> imgContext = new HashMap<String, Object>(); + Map<String, Object> imgContext = new HashMap<>(); if (imageBytes.length > 0) { imgContext.put("userLogin", userLogin); imgContext.put("contentId", passedParams.get("imgContentId")); @@ -352,7 +352,7 @@ public class UploadContentAndImage { return "error"; } - Map<String, Object> passedParams = new HashMap<String, Object>(); + Map<String, Object> passedParams = new HashMap<>(); FileItem fi = null; FileItem imageFi = null; byte[] imageBytes; @@ -422,7 +422,7 @@ public class UploadContentAndImage { Delegator delegator = (Delegator)request.getAttribute("delegator"); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); - Map<String, Object> ftlContext = new HashMap<String, Object>(); + Map<String, Object> ftlContext = new HashMap<>(); String contentPurposeString = (String)passedParams.get("contentPurposeString" + suffix); if (UtilValidate.isEmpty(contentPurposeString)) { @@ -451,7 +451,7 @@ public class UploadContentAndImage { request.setAttribute("_ERROR_MESSAGE_", msg); List<String> errorMsgList = UtilGenerics.checkList(request.getAttribute("_EVENT_MESSAGE_LIST_")); if (errorMsgList == null) { - errorMsgList = new LinkedList<String>(); + errorMsgList = new LinkedList<>(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -463,8 +463,8 @@ public class UploadContentAndImage { ModelEntity modelEntity = delegator.getModelEntity("ContentAssocDataResourceViewFrom"); List<String> fieldNames = modelEntity.getAllFieldNames(); - Map<String, Object> ftlContext2 = new HashMap<String, Object>(); - Map<String, Object> ftlContext3 = new HashMap<String, Object>(); + Map<String, Object> ftlContext2 = new HashMap<>(); + Map<String, Object> ftlContext3 = new HashMap<>(); for (String keyName : fieldNames) { Object obj = passedParams.get(keyName + suffix); ftlContext2.put(keyName, obj); @@ -472,17 +472,17 @@ public class UploadContentAndImage { if (Debug.infoOn()) { Debug.logInfo("[UploadContentStuff]ftlContext2:" + ftlContext2, module); } - List<Object> errorMessages = new LinkedList<Object>(); + List<Object> errorMessages = new LinkedList<>(); Locale loc = Locale.getDefault(); try { SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "contentIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "contentOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = new HashMap<String, Object>(); + ftlContext3 = new HashMap<>(); SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "dataResourceIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "dataResourceOut", ftlContext3, ftlContext, errorMessages, loc); - ftlContext3 = new HashMap<String, Object>(); + ftlContext3 = new HashMap<>(); SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "contentAssocIn", ftlContext2, ftlContext3, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor("component://content/minilang/ContentManagementMapProcessors.xml", "contentAssocOut", ftlContext3, ftlContext, errorMessages, loc); } catch (MiniLangException e) { @@ -509,7 +509,7 @@ public class UploadContentAndImage { Debug.logInfo("[UploadContentStuff]msg:" + msg, module); } if (errorMsgList == null) { - errorMsgList = new LinkedList<String>(); + errorMsgList = new LinkedList<>(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -520,7 +520,7 @@ public class UploadContentAndImage { request.setAttribute("_ERROR_MESSAGE_", msg); List<String> errorMsgList = UtilGenerics.checkList(request.getAttribute("_EVENT_MESSAGE_LIST_")); if (errorMsgList == null) { - errorMsgList = new LinkedList<String>(); + errorMsgList = new LinkedList<>(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); @@ -540,7 +540,7 @@ public class UploadContentAndImage { String caContentIdTo = (String)passedParams.get("caContentIdTo"); if (UtilValidate.isNotEmpty(caContentIdTo)) { - Map<String, Object> resequenceContext = new HashMap<String, Object>(); + Map<String, Object> resequenceContext = new HashMap<>(); resequenceContext.put("contentIdTo", caContentIdTo); resequenceContext.put("userLogin", userLogin); try { @@ -562,7 +562,7 @@ public class UploadContentAndImage { Debug.logInfo("[UploadContentStuff]msg:" + msg, module); } if (errorMsgList == null) { - errorMsgList = new LinkedList<String>(); + errorMsgList = new LinkedList<>(); request.setAttribute("errorMessageList", errorMsgList); } errorMsgList.add(msg); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutEvents.java Sun Apr 21 12:49:52 2019 @@ -67,7 +67,7 @@ public class LayoutEvents { HttpSession session = request.getSession(); Map<String, Object> uploadResults = LayoutWorker.uploadImageAndParameters(request, "imageData"); Map<String, Object> formInput = UtilGenerics.checkMap(uploadResults.get("formInput")); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); ByteBuffer byteWrap = (ByteBuffer) uploadResults.get("imageData"); if (byteWrap == null) { String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.image_data_null", locale); @@ -83,7 +83,7 @@ public class LayoutEvents { } } String mimeTypeId = "image/" + imageFileNameExt; - List<Object> errorMessages = new LinkedList<Object>(); + List<Object> errorMessages = new LinkedList<>(); if (locale == null) { locale = Locale.getDefault(); } @@ -121,7 +121,7 @@ public class LayoutEvents { String dataResourceId = (String) result.get("dataResourceId"); String activeContentId = (String) result.get("contentId"); if (UtilValidate.isNotEmpty(activeContentId)) { - Map<String, Object> context2 = new HashMap<String, Object>(); + Map<String, Object> context2 = new HashMap<>(); context2.put("activeContentId", activeContentId); context2.put("contentAssocTypeId", result.get("contentAssocTypeId")); context2.put("fromDate", result.get("fromDate")); @@ -132,7 +132,7 @@ public class LayoutEvents { context2.put("contentIdTo", formInput.get("contentIdTo")); context2.put("mapKey", formInput.get("mapKey")); - Map<String, Object> serviceResult = new HashMap<String, Object>(); + Map<String, Object> serviceResult = new HashMap<>(); serviceResult = dispatcher.runSync("deactivateAssocs", context2); if (ServiceUtil.isError(serviceResult)) { String errorMessage = ServiceUtil.getErrorMessage(serviceResult); @@ -230,7 +230,7 @@ public class LayoutEvents { LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); HttpSession session = request.getSession(); Locale locale = UtilHttp.getLocale(request); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); Map<String, Object> paramMap = UtilHttp.getParameterMap(request); if (Debug.verboseOn()) Debug.logVerbose("in replaceSubContent, paramMap:" + paramMap, module); String dataResourceId = (String) paramMap.get("dataResourceId"); @@ -266,7 +266,7 @@ public class LayoutEvents { return "error"; } request.setAttribute("contentId", contentIdTo); - Map<String, Object> context2 = new HashMap<String, Object>(); + Map<String, Object> context2 = new HashMap<>(); context2.put("activeContentId", contentId); context2.put("contentAssocTypeId", "SUB_CONTENT"); context2.put("fromDate", result.get("fromDate")); @@ -276,7 +276,7 @@ public class LayoutEvents { context2.put("contentIdTo", contentIdTo); context2.put("mapKey", mapKey); - Map<String, Object> serviceResult = new HashMap<String, Object>(); + Map<String, Object> serviceResult = new HashMap<>(); serviceResult = dispatcher.runSync("deactivateAssocs", context2); if (ServiceUtil.isError(serviceResult)) { String errorMessage = ServiceUtil.getErrorMessage(serviceResult); @@ -362,7 +362,7 @@ public class LayoutEvents { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); return "error"; } - Map<String, Object> serviceIn = new HashMap<String, Object>(); + Map<String, Object> serviceIn = new HashMap<>(); Map<String, Object> results = null; serviceIn.put("fromDate", UtilDateTime.nowTimestamp()); serviceIn.put("contentId", contentId); @@ -388,14 +388,14 @@ public class LayoutEvents { return "error"; } - serviceIn = new HashMap<String, Object>(); + serviceIn = new HashMap<>(); serviceIn.put("userLogin", session.getAttribute("userLogin")); // Can't count on records being unique - Map<String, GenericValue> beenThere = new HashMap<String, GenericValue>(); + Map<String, GenericValue> beenThere = new HashMap<>(); for (int i=0; i<entityList.size(); i++) { GenericValue view = entityList.get(i); - List<Object> errorMessages = new LinkedList<Object>(); + List<Object> errorMessages = new LinkedList<>(); if (locale == null) { locale = Locale.getDefault(); } @@ -455,7 +455,7 @@ public class LayoutEvents { Debug.logVerbose("in createSubContent, contentIdTo:" + contentIdTo, module); Debug.logVerbose("in createSubContent, mapKey:" + mapKey, module); } - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); List<Object> errorMessages = new LinkedList<>(); Locale loc = (Locale) request.getSession().getServletContext().getAttribute("locale"); if (loc == null) { @@ -503,14 +503,14 @@ public class LayoutEvents { request.setAttribute("contentId", contentId); request.setAttribute("drDataResourceId", dataResourceId); request.setAttribute("currentEntityName", "SubContentDataResourceId"); - Map<String, Object> context2 = new HashMap<String, Object>(); + Map<String, Object> context2 = new HashMap<>(); context2.put("activeContentId", contentId); context2.put("contentAssocTypeId", "SUB_CONTENT"); context2.put("fromDate", result.get("fromDate")); context2.put("contentIdTo", contentIdTo); context2.put("mapKey", mapKey); context2.put("userLogin", userLogin); - Map<String, Object> serviceResult = new HashMap<String, Object>(); + Map<String, Object> serviceResult = new HashMap<>(); serviceResult = dispatcher.runSync("deactivateAssocs", context2); if (ServiceUtil.isError(serviceResult)) { String errorMessage = ServiceUtil.getErrorMessage(serviceResult); @@ -530,7 +530,7 @@ public class LayoutEvents { LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); HttpSession session = request.getSession(); Map<String, Object> paramMap = UtilHttp.getParameterMap(request); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); List<Object> errorMessages = new LinkedList<>(); Locale loc = (Locale) request.getSession().getServletContext().getAttribute("locale"); if (loc == null) { Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java Sun Apr 21 12:49:52 2019 @@ -55,8 +55,8 @@ public final class LayoutWorker { public static Map<String, Object> uploadImageAndParameters(HttpServletRequest request, String uploadField) { Locale locale = UtilHttp.getLocale(request); - Map<String, Object> results = new HashMap<String, Object>(); - Map<String, String> formInput = new HashMap<String, String>(); + Map<String, Object> results = new HashMap<>(); + Map<String, String> formInput = new HashMap<>(); results.put("formInput", formInput); ServletFileUpload fu = new ServletFileUpload(new DiskFileItemFactory(10240, new File(new File("runtime"), "tmp"))); List<FileItem> lst = null; Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentAsText.java Sun Apr 21 12:49:52 2019 @@ -62,7 +62,7 @@ public class RenderSubContentAsText impl Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module); } FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map<String, Object> savedValuesUp = new HashMap<String, Object>(); + final Map<String, Object> savedValuesUp = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); if (Debug.infoOn()) { @@ -79,7 +79,7 @@ public class RenderSubContentAsText impl Debug.logInfo("in Render(0), directAssocMode ." + directAssocMode , module); } - final Map<String, Object> savedValues = new HashMap<String, Object>(); + final Map<String, Object> savedValues = new HashMap<>(); return new Writer(out) { Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sun Apr 21 12:49:52 2019 @@ -64,7 +64,7 @@ public class RenderSubContentCacheTransf final HttpServletResponse response = FreeMarkerWorker.getWrappedObject("response", env); final Map<String, Object> templateRoot = FreeMarkerWorker.createEnvironmentMap(env); FreeMarkerWorker.getSiteParameters(request, templateRoot); - final Map<String, Object> savedValuesUp = new HashMap<String, Object>(); + final Map<String, Object> savedValuesUp = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateRoot, args); final GenericValue userLogin = FreeMarkerWorker.getWrappedObject("userLogin", env); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentTransform.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentTransform.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentTransform.java Sun Apr 21 12:49:52 2019 @@ -77,7 +77,7 @@ public class RenderSubContentTransform i final Environment env = Environment.getCurrentEnvironment(); Map<String, Object> ctx = FreeMarkerWorker.getWrappedObject("context", env); if (ctx == null) { - ctx = new HashMap<String, Object>(); + ctx = new HashMap<>(); } final String mapKey = FreeMarkerWorker.getArg(args, "mapKey", ctx); final String subContentId = FreeMarkerWorker.getArg(args, "subContentId", ctx); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Sun Apr 21 12:49:52 2019 @@ -83,9 +83,9 @@ public class TraverseSubContentCacheTran final StringBuilder buf = new StringBuilder(); final Environment env = Environment.getCurrentEnvironment(); final Map<String, Object> templateRoot = FreeMarkerWorker.createEnvironmentMap(env); - final Map<String, Object> savedValuesUp = new HashMap<String, Object>(); + final Map<String, Object> savedValuesUp = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp); - final Map<String, Object> savedValues = new HashMap<String, Object>(); + final Map<String, Object> savedValues = new HashMap<>(); FreeMarkerWorker.overrideWithArgs(templateRoot, args); String startContentAssocTypeId = (String)templateRoot.get("contentAssocTypeId"); final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); @@ -105,9 +105,9 @@ public class TraverseSubContentCacheTran throw new RuntimeException("Error getting current content. " + e.toString()); } - final Map<String, Object> traverseContext = new HashMap<String, Object>(); + final Map<String, Object> traverseContext = new HashMap<>(); traverseContext.put("delegator", delegator); - Map<String, Object> whenMap = new HashMap<String, Object>(); + Map<String, Object> whenMap = new HashMap<>(); whenMap.put("followWhen", templateRoot.get("followWhen")); whenMap.put("pickWhen", templateRoot.get("pickWhen")); whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen")); @@ -152,7 +152,7 @@ public class TraverseSubContentCacheTran List<Map<String, ? extends Object>> globalNodeTrail = UtilGenerics.checkList(templateRoot.get("globalNodeTrail")); if (globalNodeTrail.size() > 0) { int sz = globalNodeTrail.size() ; - nodeTrail = new LinkedList<Map<String,? extends Object>>(); + nodeTrail = new LinkedList<>(); node = UtilGenerics.checkMap(globalNodeTrail.get(sz - 1)); Boolean checkedObj = (Boolean)node.get("checked"); Map<String, Object> whenMap = UtilGenerics.checkMap(templateRoot.get("whenMap")); @@ -229,7 +229,7 @@ public class TraverseSubContentCacheTran Map<String, ? extends Object> ndStart = nodeTrail.get(0); contentIdStart = (String)ndStart.get("contentId"); } else { - globalNodeTrail = new LinkedList<Map<String,? extends Object>>(); + globalNodeTrail = new LinkedList<>(); contentIdStart = ""; } boolean bIdEnd = UtilValidate.isNotEmpty(contentIdEnd); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Sun Apr 21 12:49:52 2019 @@ -111,9 +111,9 @@ public class TraverseSubContentTransform } final GenericValue subContentDataResourceView = view; - final Map<String, Object> traverseContext = new HashMap<String, Object>(); + final Map<String, Object> traverseContext = new HashMap<>(); traverseContext.put("delegator", delegator); - Map<String, Object> whenMap = new HashMap<String, Object>(); + Map<String, Object> whenMap = new HashMap<>(); whenMap.put("followWhen", templateCtx.get("followWhen")); whenMap.put("pickWhen", templateCtx.get("pickWhen")); whenMap.put("returnBeforePickWhen", templateCtx.get("returnBeforePickWhen")); @@ -155,7 +155,7 @@ public class TraverseSubContentTransform @Override public int onStart() throws TemplateModelException, IOException { - List<Map<String, Object>> nodeTrail = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> nodeTrail = new LinkedList<>(); traverseContext.put("nodeTrail", nodeTrail); Map<String, Object> rootNode = ContentWorker.makeNode(subContentDataResourceView); ContentWorker.traceNodeTrail("1", nodeTrail); @@ -225,7 +225,7 @@ public class TraverseSubContentTransform private boolean checkWhen (GenericValue thisContent, String contentAssocTypeId) { boolean isPick = false; - Map<String, Object> assocContext = new HashMap<String, Object>(); + Map<String, Object> assocContext = new HashMap<>(); if (UtilValidate.isEmpty(contentAssocTypeId)) { contentAssocTypeId = ""; } @@ -240,7 +240,7 @@ public class TraverseSubContentTransform assocContext.put("content", thisContent); List<Object> purposes = ContentWorker.getPurposes(thisContent); assocContext.put("purposes", purposes); - List<String> contentTypeAncestry = new LinkedList<String>(); + List<String> contentTypeAncestry = new LinkedList<>(); String contentTypeId = (String)thisContent.get("contentTypeId"); try { ContentWorker.getContentTypeAncestry(delegator, contentTypeId, contentTypeAncestry); Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java Sun Apr 21 12:49:52 2019 @@ -93,7 +93,7 @@ public class WrapSubContentCacheTransfor final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env); final HttpServletRequest request = FreeMarkerWorker.getWrappedObject("request", env); FreeMarkerWorker.getSiteParameters(request, templateCtx); - final Map<String, Object> savedValuesUp = new HashMap<String, Object>(); + final Map<String, Object> savedValuesUp = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateCtx, upSaveKeyNames, savedValuesUp); FreeMarkerWorker.overrideWithArgs(templateCtx, args); final String wrapTemplateId = (String)templateCtx.get("wrapTemplateId"); @@ -129,7 +129,7 @@ public class WrapSubContentCacheTransfor // the parent context. But it will already have one and it is the same context that is // being passed. } - final Map<String, Object> savedValues = new HashMap<String, Object>(); + final Map<String, Object> savedValues = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues); // This order is taken so that the mimeType can be overridden in the transform arguments. String mimeTypeId = ContentWorker.getMimeTypeId(delegator, view, templateCtx); Modified: ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java Sun Apr 21 12:49:52 2019 @@ -49,7 +49,7 @@ public class HumanResEvents { String hrefString = request.getParameter("hrefString"); String hrefString2 = request.getParameter("hrefString2"); - Map<String, Object> paramMap = new HashMap<String, Object>(); + Map<String, Object> paramMap = new HashMap<>(); paramMap.put("delegator", delegator); paramMap.put("partyId", partyId); paramMap.put("onclickFunction", onclickFunction); @@ -57,7 +57,7 @@ public class HumanResEvents { paramMap.put("hrefString", hrefString); paramMap.put("hrefString2", hrefString2); - List<Map<String,Object>> categoryList = new ArrayList<Map<String,Object>>(); + List<Map<String,Object>> categoryList = new ArrayList<>(); //check employee position try { @@ -126,10 +126,10 @@ public class HumanResEvents { title = memGroupCtx.getString("groupName"); } - Map<String,Object> josonMap = new HashMap<String, Object>(); - Map<String,Object> dataMap = new HashMap<String, Object>(); - Map<String,Object> dataAttrMap = new HashMap<String, Object>(); - Map<String,Object> attrMap = new HashMap<String, Object>(); + Map<String,Object> josonMap = new HashMap<>(); + Map<String,Object> dataMap = new HashMap<>(); + Map<String,Object> dataAttrMap = new HashMap<>(); + Map<String,Object> attrMap = new HashMap<>(); dataAttrMap.put("onClick", onclickFunction + "('" + memberId + additionParam + "')"); @@ -169,7 +169,7 @@ public class HumanResEvents { String hrefString2 = (String) params.get("hrefString2"); Map<String , Object> partyGroup = UtilGenerics.checkMap(params.get("partyGroup")); - List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); + List<Map<String, Object>> resultList = new ArrayList<>(); List<GenericValue> childOfComs = null; try { @@ -184,10 +184,10 @@ public class HumanResEvents { String catNameField = null; String title = null; - Map<String, Object> josonMap = new HashMap<String, Object>(); - Map<String, Object> dataMap = new HashMap<String, Object>(); - Map<String, Object> dataAttrMap = new HashMap<String, Object>(); - Map<String, Object> attrMap = new HashMap<String, Object>(); + Map<String, Object> josonMap = new HashMap<>(); + Map<String, Object> dataMap = new HashMap<>(); + Map<String, Object> dataAttrMap = new HashMap<>(); + Map<String, Object> attrMap = new HashMap<>(); catId = childOfCom.get("partyIdTo"); @@ -259,7 +259,7 @@ public class HumanResEvents { Delegator delegator = (Delegator) params.get("delegator"); String partyId = (String) params.get("partyId"); - List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); + List<Map<String, Object>> resultList = new ArrayList<>(); try { isEmpls = EntityQuery.use(delegator).from("EmplPosition") @@ -270,10 +270,10 @@ public class HumanResEvents { if (UtilValidate.isNotEmpty(isEmpls)) { for (GenericValue childOfEmpl : isEmpls ) { - Map<String, Object> emplMap = new HashMap<String, Object>(); - Map<String, Object> emplAttrMap = new HashMap<String, Object>(); - Map<String, Object> empldataMap = new HashMap<String, Object>(); - Map<String, Object> emplDataAttrMap = new HashMap<String, Object>(); + Map<String, Object> emplMap = new HashMap<>(); + Map<String, Object> emplAttrMap = new HashMap<>(); + Map<String, Object> empldataMap = new HashMap<>(); + Map<String, Object> emplDataAttrMap = new HashMap<>(); String emplId = (String) childOfEmpl.get("emplPositionId"); String typeId = (String) childOfEmpl.get("emplPositionTypeId"); Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMNode.java Sun Apr 21 12:49:52 2019 @@ -73,8 +73,8 @@ public class BOMNode { this.delegator = product.getDelegator(); this.dispatcher = dispatcher; this.userLogin = userLogin; - children = new LinkedList<GenericValue>(); - childrenNodes = new LinkedList<BOMNode>(); + children = new LinkedList<>(); + childrenNodes = new LinkedList<>(); parentNode = null; productForRules = null; bomTypeId = null; @@ -110,9 +110,9 @@ public class BOMNode { .orderBy("sequenceNum") .filterByDate(inDate).queryList(); } - children = new LinkedList<GenericValue>(); + children = new LinkedList<>(); children.addAll(rows); - childrenNodes = new LinkedList<BOMNode>(); + childrenNodes = new LinkedList<>(); BOMNode oneChildNode = null; for (GenericValue oneChild : children) { // Configurator @@ -271,7 +271,7 @@ public class BOMNode { // ----------------------------------------------------------- // We try to apply directly the selected features if (newNode.equals(oneChildNode)) { - Map<String, String> selectedFeatures = new HashMap<String, String>(); + Map<String, String> selectedFeatures = new HashMap<>(); if (productFeatures != null) { GenericValue feature = null; for (int j = 0; j < productFeatures.size(); j++) { @@ -281,7 +281,7 @@ public class BOMNode { } if (selectedFeatures.size() > 0) { - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); context.put("productId", node.get("productIdTo")); context.put("selectedFeatures", selectedFeatures); Map<String, Object> storeResult = null; @@ -341,9 +341,9 @@ public class BOMNode { .orderBy("sequenceNum") .filterByDate(inDate).queryList(); } - children = new LinkedList<GenericValue>(); + children = new LinkedList<>(); children.addAll(rows); - childrenNodes = new LinkedList<BOMNode>(); + childrenNodes = new LinkedList<>(); BOMNode oneChildNode = null; for (GenericValue oneChild : children) { @@ -510,7 +510,7 @@ public class BOMNode { Timestamp endDate = null; if (isManufactured(ignoreSupplierProducts)) { BOMNode oneChildNode = null; - List<String> childProductionRuns = new LinkedList<String>(); + List<String> childProductionRuns = new LinkedList<>(); Timestamp maxEndDate = null; for (int i = 0; i < childrenNodes.size(); i++) { oneChildNode = childrenNodes.get(i); @@ -532,7 +532,7 @@ public class BOMNode { } Timestamp startDate = UtilDateTime.toTimestamp(UtilDateTime.toDateTimeString(date)); - Map<String, Object> serviceContext = new HashMap<String, Object>(); + Map<String, Object> serviceContext = new HashMap<>(); if (!useSubstitute) { serviceContext.put("productId", getProduct().getString("productId")); serviceContext.put("facilityId", getProduct().getString("facilityId")); Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMServices.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMServices.java Sun Apr 21 12:49:52 2019 @@ -62,7 +62,7 @@ public class BOMServices { * @return returns the product's low level code (llc) i.e. the maximum depth */ public static Map<String, Object> getMaxDepth(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); String productId = (String) context.get("productId"); String fromDateStr = (String) context.get("fromDate"); @@ -79,7 +79,7 @@ public class BOMServices { if (fromDate == null) { fromDate = new Date(); } - List<String> bomTypes = new LinkedList<String>(); + List<String> bomTypes = new LinkedList<>(); if (bomType == null) { try { List<GenericValue> bomTypesValues = EntityQuery.use(delegator).from("ProductAssocType") @@ -120,7 +120,7 @@ public class BOMServices { * @return the results of the updates the product's low level code */ public static Map<String, Object> updateLowLevelCode(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productIdTo"); @@ -173,7 +173,7 @@ public class BOMServices { return ServiceUtil.returnError(ServiceUtil.getErrorMessage(treeResult)); } BOMTree tree = (BOMTree)treeResult.get("tree"); - List<BOMNode> products = new LinkedList<BOMNode>(); + List<BOMNode> products = new LinkedList<>(); tree.print(products, llc.intValue()); for (int i = 0; i < products.size(); i++) { BOMNode oneNode = products.get(i); @@ -215,7 +215,7 @@ public class BOMServices { * @return the results of the updates the product's low level code */ public static Map<String, Object> initLowLevelCode(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -223,7 +223,7 @@ public class BOMServices { try { List<GenericValue> products = EntityQuery.use(delegator).from("Product").orderBy("isVirtual DESC").queryList(); Long zero = 0L; - List<GenericValue> allProducts = new LinkedList<GenericValue>(); + List<GenericValue> allProducts = new LinkedList<>(); for (GenericValue product : products) { product.set("billOfMaterialLevel", zero); allProducts.add(product); @@ -260,7 +260,7 @@ public class BOMServices { * @return returns the ProductAssoc generic value for a duplicate productIdKey ancestor if present */ public static Map<String, Object> searchDuplicatedAncestor(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -293,7 +293,7 @@ public class BOMServices { * @return return the bill of material tree */ public static Map<String, Object> getBOMTree(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -344,7 +344,7 @@ public class BOMServices { * @return return the list of manufacturing components */ public static Map<String, Object> getManufacturingComponents(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -380,7 +380,7 @@ public class BOMServices { // Components // BOMTree tree = null; - List<BOMNode> components = new LinkedList<BOMNode>(); + List<BOMNode> components = new LinkedList<>(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_SINGLE_LEVEL, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); @@ -422,9 +422,9 @@ public class BOMServices { result.put("components", components); // also return a componentMap (useful in scripts and simple language code) - List<Map<String, Object>> componentsMap = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> componentsMap = new LinkedList<>(); for (BOMNode node : components) { - Map<String, Object> componentMap = new HashMap<String, Object>(); + Map<String, Object> componentMap = new HashMap<>(); componentMap.put("product", node.getProduct()); componentMap.put("quantity", node.getQuantity()); componentsMap.add(componentMap); @@ -434,7 +434,7 @@ public class BOMServices { } public static Map<String, Object> getNotAssembledComponents(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); String productId = (String) context.get("productId"); @@ -463,8 +463,8 @@ public class BOMServices { } BOMTree tree = null; - List<BOMNode> components = new LinkedList<BOMNode>(); - List<BOMNode> notAssembledComponents = new LinkedList<BOMNode>(); + List<BOMNode> components = new LinkedList<>(); + List<BOMNode> notAssembledComponents = new LinkedList<>(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); @@ -486,7 +486,7 @@ public class BOMServices { // Service for the Product (Shipment) component // public static Map<String, Object> createShipmentPackages(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); @@ -508,8 +508,8 @@ public class BOMServices { } catch (GenericEntityException gee) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorLoadingShipmentItems", locale)); } - Map<String, Object> orderReadHelpers = new HashMap<String, Object>(); - Map<String, Object> partyOrderShipments = new HashMap<String, Object>(); + Map<String, Object> orderReadHelpers = new HashMap<>(); + Map<String, Object> partyOrderShipments = new HashMap<>(); for (GenericValue shipmentItem : shipmentItems) { // Get the OrderShipments GenericValue orderShipment = null; @@ -530,7 +530,7 @@ public class BOMServices { String partyId = (orderReadHelper.getPlacingParty() != null? orderReadHelper.getPlacingParty().getString("partyId"): null); // FIXME: is it the customer? if (partyId != null) { if (!partyOrderShipments.containsKey(partyId)) { - List<Map<String, Object>> orderShipmentReadMapList = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> orderShipmentReadMapList = new LinkedList<>(); partyOrderShipments.put(partyId, orderShipmentReadMapList); } List<Map<String, Object>> orderShipmentReadMapList = UtilGenerics.checkList(partyOrderShipments.get(partyId)); @@ -548,7 +548,7 @@ public class BOMServices { OrderReadHelper orderReadHelper = (OrderReadHelper)orderShipmentReadMap.get("orderReadHelper"); GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId")); // getProductsInPackages - Map<String, Object> serviceContext = new HashMap<String, Object>(); + Map<String, Object> serviceContext = new HashMap<>(); serviceContext.put("productId", orderItem.getString("productId")); serviceContext.put("quantity", orderShipment.getBigDecimal("quantity")); Map<String, Object> serviceResult = null; @@ -578,9 +578,9 @@ public class BOMServices { } // Group together products and components // of the same box type. - Map<String, GenericValue> boxTypes = new HashMap<String, GenericValue>(); + Map<String, GenericValue> boxTypes = new HashMap<>(); for (Map.Entry<String, Object> partyOrderShipment : partyOrderShipments.entrySet()) { - Map<String, List<Map<String, Object>>> boxTypeContent = new HashMap<String, List<Map<String,Object>>>(); + Map<String, List<Map<String, Object>>> boxTypeContent = new HashMap<>(); List<Map<String, Object>> orderShipmentReadMapList = UtilGenerics.checkList(partyOrderShipment.getValue()); for (int i = 0; i < orderShipmentReadMapList.size(); i++) { Map<String, Object> orderShipmentReadMap = UtilGenerics.checkMap(orderShipmentReadMapList.get(i)); @@ -592,7 +592,7 @@ public class BOMServices { // this is a multi package shipment item for (int j = 0; j < productsInPackages.size(); j++) { BOMNode component = productsInPackages.get(j); - Map<String, Object> boxTypeContentMap = new HashMap<String, Object>(); + Map<String, Object> boxTypeContentMap = new HashMap<>(); boxTypeContentMap.put("content", orderShipmentReadMap); boxTypeContentMap.put("componentIndex", j); GenericValue product = component.getProduct(); @@ -606,7 +606,7 @@ public class BOMServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale)); } boxTypes.put(boxTypeId, boxType); - List<Map<String, Object>> box = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> box = new LinkedList<>(); boxTypeContent.put(boxTypeId, box); } List<Map<String, Object>> boxTypeContentList = UtilGenerics.checkList(boxTypeContent.get(boxTypeId)); @@ -616,7 +616,7 @@ public class BOMServices { } else { // no subcomponents, the product has its own package: // this is a single package shipment item - Map<String, Object> boxTypeContentMap = new HashMap<String, Object>(); + Map<String, Object> boxTypeContentMap = new HashMap<>(); boxTypeContentMap.put("content", orderShipmentReadMap); GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId")); GenericValue product = null; @@ -636,7 +636,7 @@ public class BOMServices { } boxTypes.put(boxTypeId, boxType); - List<Map<String, Object>> box = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> box = new LinkedList<>(); boxTypeContent.put(boxTypeId, box); } List<Map<String, Object>> boxTypeContentList = UtilGenerics.checkList(boxTypeContent.get(boxTypeId)); @@ -761,7 +761,7 @@ public class BOMServices { * @return returns the list of products in packages */ public static Map<String, Object> getProductsInPackages(DispatchContext dctx, Map<String, ? extends Object> context) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); @@ -788,7 +788,7 @@ public class BOMServices { // Components // BOMTree tree = null; - List<BOMNode> components = new LinkedList<BOMNode>(); + List<BOMNode> components = new LinkedList<>(); try { tree = new BOMTree(productId, "MANUF_COMPONENT", fromDate, BOMTree.EXPLOSION_MANUFACTURING, delegator, dispatcher, userLogin); tree.setRootQuantity(quantity); Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMTree.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMTree.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMTree.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/bom/BOMTree.java Sun Apr 21 12:49:52 2019 @@ -105,7 +105,7 @@ public class BOMTree { .where("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE") .queryList(); - List<GenericValue> productFeatures = new LinkedList<GenericValue>(); + List<GenericValue> productFeatures = new LinkedList<>(); GenericValue oneProductFeatureAppl = null; for (int i = 0; i < productFeaturesAppl.size(); i++) { oneProductFeatureAppl = productFeaturesAppl.get(i); @@ -183,7 +183,7 @@ public class BOMTree { * */ public boolean isConfigured() { - List<BOMNode> notConfiguredParts = new LinkedList<BOMNode>(); + List<BOMNode> notConfiguredParts = new LinkedList<>(); root.isConfigured(notConfiguredParts); return (notConfiguredParts.size() == 0); } @@ -300,8 +300,8 @@ public class BOMTree { * @return List containing all the tree's productId. */ public List<String> getAllProductsId() { - List<BOMNode> nodeArr = new LinkedList<BOMNode>(); - List<String> productsId = new LinkedList<String>(); + List<BOMNode> nodeArr = new LinkedList<>(); + List<String> productsId = new LinkedList<>(); print(nodeArr); for (int i = 0; i < nodeArr.size(); i++) { productsId.add((nodeArr.get(i)).getProduct().getString("productId")); Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRun.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRun.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRun.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRun.java Sun Apr 21 12:49:52 2019 @@ -333,7 +333,7 @@ public class ProductionRun { if (productionRunRoutingTasks == null) this.getProductionRunRoutingTasks(); if (productionRunRoutingTasks != null) { try { - productionRunComponents = new LinkedList<GenericValue>(); + productionRunComponents = new LinkedList<>(); GenericValue routingTask; for (Iterator<GenericValue> iter = productionRunRoutingTasks.iterator(); iter.hasNext();) { routingTask = iter.next(); Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java Sun Apr 21 12:49:52 2019 @@ -61,7 +61,7 @@ public class ProductionRunEvents { } Collection<Map<String, Object>> componentRows = UtilHttp.parseMultiFormData(parameters); - Map<GenericPK, Object> componentsLocationMap = new HashMap<GenericPK, Object>(); + Map<GenericPK, Object> componentsLocationMap = new HashMap<>(); for (Map<String, Object>componentRow : componentRows) { Timestamp fromDate = null; try { Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java?rev=1857906&r1=1857905&r2=1857906&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java (original) +++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java Sun Apr 21 12:49:52 2019 @@ -52,7 +52,7 @@ public final class ProductionRunHelper { * @return Map with the result of the service, the output parameters are */ public static Map<String, Object> getProductionRun(Delegator delegator, String productionRunId) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { if (productionRunId != null) { |
Free forum by Nabble | Edit this page |