Author: mthl
Date: Sat May 25 23:42:00 2019 New Revision: 1860025 URL: http://svn.apache.org/viewvc?rev=1860025&view=rev Log: Improved: Remove redundant type declarations (OFBIZ-10937) Since Java 1.7, when defining generic types it is unnecessary to redefine those types in the constructor when it is already done in the declared type. Modified: ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/misc/ThirdPartyEvents.java ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ContentDocument.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchServices.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java ofbiz/ofbiz-plugins/trunk/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubUserGroupMapper.java ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInAuthenticator.java ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInUserGroupMapper.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java ofbiz/ofbiz-plugins/trunk/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumEvents.java ofbiz/ofbiz-plugins/trunk/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/CategoryUtil.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/test/SolrTests.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/webapp/OFBizSolrContextFilter.java ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/session/WebPosSession.java ofbiz/ofbiz-plugins/trunk/webpos/src/main/java/org/apache/ofbiz/webpos/transaction/WebPosTransaction.java Modified: ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java Sat May 25 23:42:00 2019 @@ -95,7 +95,7 @@ public class FixedAssetMaintServices { } else { issueQuantity = requestedQty; } - Map<String, Object> itemIssuanceCtx = new HashMap<String, Object>(); + Map<String, Object> itemIssuanceCtx = new HashMap<>(); itemIssuanceCtx.put("userLogin", userLogin); itemIssuanceCtx.put("inventoryItemId", inventoryItemId); itemIssuanceCtx.put("fixedAssetId", fixedAssetId); Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java Sat May 25 23:42:00 2019 @@ -163,7 +163,7 @@ public class BirtEmailServices { // create the output stream for the generation ByteArrayOutputStream baos = new ByteArrayOutputStream(); - Map<String, Object> birtContext = new HashMap<String, Object>(); + Map<String, Object> birtContext = new HashMap<>(); if (birtLocale == null) { birtLocale = locale; } @@ -191,7 +191,7 @@ public class BirtEmailServices { baos.close(); // store in the list of maps for sendmail.... - List<Map<String, ? extends Object>> bodyParts = new LinkedList<Map<String,? extends Object>>(); + List<Map<String, ? extends Object>> bodyParts = new LinkedList<>(); if (bodyText != null) { bodyText = FlexibleStringExpander.expandString(bodyText, screenContext, locale); bodyParts.add(UtilMisc.toMap("content", bodyText, "type", "text/html")); Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java Sat May 25 23:42:00 2019 @@ -62,7 +62,7 @@ public class BirtMasterReportServices { "hours", "floating-point", "fromDate", "date-time", "thruDate", "date-time"); - LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>(); + LinkedHashMap<String, String> filterMap = new LinkedHashMap<>(); filterMap.put("firstName", "name"); filterMap.put("lastName", "name"); filterMap.put("fromDate", "date-time"); @@ -73,7 +73,7 @@ public class BirtMasterReportServices { "hours", "Hours", "fromDate", "From date", "thruDate", "Thru date"); - LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<String, String>(); + LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<>(); filterDisplayLabels.put("firstName", "First name"); filterDisplayLabels.put("lastName", "Last name"); filterDisplayLabels.put("fromDate", "From date"); @@ -98,7 +98,7 @@ public class BirtMasterReportServices { List<GenericValue> listPersons = null; try { // TODO: translate labels - List<EntityExpr> listConditions = new ArrayList<EntityExpr>(); + List<EntityExpr> listConditions = new ArrayList<>(); if (UtilValidate.isNotEmpty(parameters.get("firstName"))) { EntityExpr conditionFirstName = EntityCondition.makeCondition("firstName", parameters.get("firstName")); listConditions.add(conditionFirstName); @@ -119,7 +119,7 @@ public class BirtMasterReportServices { } String partyId = person.getString("partyId"); - List<EntityExpr> listConditionsWorkEffort = new ArrayList<EntityExpr>(); + List<EntityExpr> listConditionsWorkEffort = new ArrayList<>(); Timestamp thruDate = null; Timestamp fromDate = null; if (UtilValidate.isEmpty(parameters.get("fromDate"))) { @@ -147,7 +147,7 @@ public class BirtMasterReportServices { Debug.logError(e, module); ServiceUtil.returnError("Error getting party from person name."); } - List<GenericValue> listCompiled = new ArrayList<GenericValue>(); + List<GenericValue> listCompiled = new ArrayList<>(); if (UtilValidate.isNotEmpty(listWorkEffortTime)) listCompiled.addAll(listWorkEffortTime); if (UtilValidate.isNotEmpty(listPersons)) listCompiled.addAll(listPersons); Map<String, Object> result = ServiceUtil.returnSuccess(); @@ -188,12 +188,12 @@ public class BirtMasterReportServices { "amount", "Amount", "productStoreId", "Product Store", "storeName", "Product store name"); - LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>(); + LinkedHashMap<String, String> filterMap = new LinkedHashMap<>(); filterMap.put("productCategoryId", "short-varchar"); filterMap.put("productStoreId", "short-varchar"); filterMap.put("fromDate", "date"); filterMap.put("thruDate", "date"); - LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<String, String>(); + LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<>(); //it's better to use Label Map, maybe an improvement point ! filterDisplayLabels.put("productCategoryId", "product Category"); filterDisplayLabels.put("productStoreId", "product Store"); @@ -214,8 +214,8 @@ public class BirtMasterReportServices { Map<String, Object> parameters = UtilGenerics.checkMap(reportContext.getParameterValue("parameters")); List<GenericValue> listTurnOver = null; - List<Map<String, Object>> listInvoiceEditable = new ArrayList<Map<String, Object>>(); - List<EntityCondition> listAllConditions = new ArrayList<EntityCondition>(); + List<Map<String, Object>> listInvoiceEditable = new ArrayList<>(); + List<EntityCondition> listAllConditions = new ArrayList<>(); try { // treating fromDate field condition if (UtilValidate.isNotEmpty(parameters.get("fromDate"))) { @@ -237,7 +237,7 @@ public class BirtMasterReportServices { // product category field condition if (UtilValidate.isNotEmpty(parameters.get("productCategoryId"))) { - List<String> productCategoryList = new ArrayList<String>(); + List<String> productCategoryList = new ArrayList<>(); if (parameters.get("productCategoryId") instanceof String) { String productCategoryId = (String) parameters.get("productCategoryId"); productCategoryList.add(productCategoryId); @@ -260,7 +260,7 @@ public class BirtMasterReportServices { } // productStoreId condition - List<String> productStoreList = new ArrayList<String>(); + List<String> productStoreList = new ArrayList<>(); if (UtilValidate.isNotEmpty(parameters.get("productStoreId"))) { if (parameters.get("productStoreId") instanceof String) { String productStoreId = (String) parameters.get("productStoreId"); @@ -330,7 +330,7 @@ public class BirtMasterReportServices { for (GenericValue invoice : listTurnOver) { Map<String, Object> invoiceEditableTemp = UtilGenerics.checkMap(invoice.clone()); invoiceEditableTemp.remove("GenericEntity"); - Map<String, Object> invoiceEditable = new HashMap<String, Object>(); + Map<String, Object> invoiceEditable = new HashMap<>(); invoiceEditable.putAll(invoiceEditableTemp); invoiceEditable.put("partyName", PartyHelper.getPartyName(delegator, invoice.getString("partyId"), false)); Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java Sat May 25 23:42:00 2019 @@ -119,10 +119,10 @@ public class BirtServices { public static Map<String, Object> prepareFlexibleReportOptionFieldsFromEntity(DispatchContext dctx, Map<String, Object> context) { String entityViewName = (String) context.get("entityViewName"); GenericValue userLogin = (GenericValue) context.get("userLogin"); - List<String> listMultiFields = new ArrayList<String>(); + List<String> listMultiFields = new ArrayList<>(); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Locale locale = (Locale) context.get("locale"); ModelEntity modelEntity = delegator.getModelEntity(entityViewName); @@ -171,7 +171,7 @@ public class BirtServices { GenericValue userLogin = (GenericValue) context.get("userLogin"); String entityViewName = (String) reportContext.getParameterValue("modelElementName"); Map<String, Object> inputFields = UtilGenerics.checkMap(reportContext.getParameterValue("parameters")); - Map<String, Object> resultPerformFind = new HashMap<String, Object>(); + Map<String, Object> resultPerformFind = new HashMap<>(); Map<String, Object> resultToBirt = null; List<GenericValue> list = null; @@ -470,13 +470,13 @@ public class BirtServices { Locale locale = (Locale) context.get("locale"); ModelEntity modelEntity = (ModelEntity) context.get("modelEntity"); - Map<String, String> dataMap = new HashMap<String, String>(); - Map<String, String> fieldDisplayLabels = new HashMap<String, String>(); - LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>(); - LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<String, String>(); + Map<String, String> dataMap = new HashMap<>(); + Map<String, String> fieldDisplayLabels = new HashMap<>(); + LinkedHashMap<String, String> filterMap = new LinkedHashMap<>(); + LinkedHashMap<String, String> filterDisplayLabels = new LinkedHashMap<>(); List<String> listEntityFields = modelEntity.getAllFieldNames(); - Map<Object, Object> uiLabelMap = new HashMap<Object, Object>(); + Map<Object, Object> uiLabelMap = new HashMap<>(); final String[] resourceGlob = {"OrderUiLabels", "ProductUiLabels", "PartyUiLabels", "ContentUiLabels", "AccountingUiLabels", "CommonUiLabels", "BirtUiLabels"}; for (String res : resourceGlob) { uiLabelMap.putAll(UtilProperties.getProperties(res, locale)); @@ -668,7 +668,7 @@ public class BirtServices { Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); Map<String, Object> result = null; - List<String> listSuccessMessage = new ArrayList<String>(); + List<String> listSuccessMessage = new ArrayList<>(); // the idea is to allow only design to be uploaded. We use the stored file and add the new design from the uploaded file within. DesignConfig config = new DesignConfig(); @@ -822,7 +822,7 @@ public class BirtServices { SlotHandle stylesStored = designStored.getStyles(); // getting style names from stored report - List<String> listStyleNames = new ArrayList<String>(); + List<String> listStyleNames = new ArrayList<>(); @SuppressWarnings("unchecked") Iterator<DesignElementHandle> iterStored = stylesStored.iterator(); while (iterStored.hasNext()) { Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java Sat May 25 23:42:00 2019 @@ -97,7 +97,7 @@ public class BirtViewHandler implements Map<String, Object> appContext = UtilGenerics.cast(engine.getConfig().getAppContext()); BirtWorker.setWebContextObjects(appContext, request, response); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); // set parameters from request Map<String, Object> parameters = UtilGenerics.cast(request.getAttribute(BirtWorker.getBirtParameters())); if (parameters != null) { Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java Sat May 25 23:42:00 2019 @@ -63,7 +63,7 @@ public class EbayHelper { public static final String resource = "EbayUiLabels"; public static Map<String, Object> buildEbayConfig(Map<String, Object> context, Delegator delegator) { - Map<String, Object> buildEbayConfigContext = new HashMap<String, Object>(); + Map<String, Object> buildEbayConfigContext = new HashMap<>(); Locale locale = (Locale) context.get("locale"); String productStoreId = (String) context.get("productStoreId"); if (UtilValidate.isNotEmpty(productStoreId)) { @@ -125,7 +125,7 @@ public class EbayHelper { int responseCode = connection.getResponseCode(); InputStream inputStream = null; - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); String response = null; if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) { @@ -338,7 +338,7 @@ public class EbayHelper { Debug.logInfo("Creating postal address with input map: " + address, module); String contactMechId = null; try { - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); context.put("partyId", partyId); context.put("toName", address.get("buyerName")); context.put("address1", address.get("shippingAddressStreet1")); @@ -359,7 +359,7 @@ public class EbayHelper { } contactMechId = (String) summaryResult.get("contactMechId"); // Set also as a billing address - context = new HashMap<String, Object>(); + context = new HashMap<>(); context.put("partyId", partyId); context.put("contactMechId", contactMechId); context.put("contactMechPurposeTypeId", "BILLING_LOCATION"); @@ -414,8 +414,8 @@ public class EbayHelper { public static String createPartyPhone(LocalDispatcher dispatcher, String partyId, String phoneNumber, GenericValue userLogin) { - Map<String, Object> summaryResult = new HashMap<String, Object>(); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> summaryResult = new HashMap<>(); + Map<String, Object> context = new HashMap<>(); String phoneContactMechId = null; try { @@ -436,8 +436,8 @@ public class EbayHelper { } public static String createPartyEmail(LocalDispatcher dispatcher, String partyId, String email, GenericValue userLogin) { - Map<String, Object> context = new HashMap<String, Object>(); - Map<String, Object> summaryResult = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); + Map<String, Object> summaryResult = new HashMap<>(); String emailContactMechId = null; try { @@ -470,8 +470,8 @@ public class EbayHelper { public static void createEbayCustomer(LocalDispatcher dispatcher, String partyId, String ebayUserIdBuyer, String eias, GenericValue userLogin) { - Map<String, Object> context = new HashMap<String, Object>(); - Map<String, Object> summaryResult = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); + Map<String, Object> summaryResult = new HashMap<>(); if (UtilValidate.isNotEmpty(eias)) { try { context.put("partyId", partyId); Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java Sat May 25 23:42:00 2019 @@ -62,10 +62,10 @@ public class EbayOrderServices { private static boolean isGetSellerTransactionsCall = false; private static boolean isGetOrdersCall = false; private static boolean isGetMyeBaySellingCall = false; - private static List<Map<String, Object>> orderList = new LinkedList<Map<String,Object>>(); - private static List<String> getSellerTransactionsContainingOrderList = new LinkedList<String>(); - private static List<String> orderImportSuccessMessageList = new LinkedList<String>(); - private static List<String> orderImportFailureMessageList = new LinkedList<String>(); + private static List<Map<String, Object>> orderList = new LinkedList<>(); + private static List<String> getSellerTransactionsContainingOrderList = new LinkedList<>(); + private static List<String> orderImportSuccessMessageList = new LinkedList<>(); + private static List<String> orderImportFailureMessageList = new LinkedList<>(); public static Map<String, Object> getEbayOrders(DispatchContext dctx, Map<String, Object> context) { Delegator delegator = dctx.getDelegator(); @@ -75,7 +75,7 @@ public class EbayOrderServices { orderImportFailureMessageList.clear(); getSellerTransactionsContainingOrderList.clear(); orderList.clear(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { Map<String, Object> eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator); if (UtilValidate.isEmpty(eBayConfigResult)) { @@ -123,7 +123,7 @@ public class EbayOrderServices { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); String externalId = (String) context.get("externalId"); List<Map<String, Object>> orderList = UtilGenerics.checkList(context.get("orderList")); try { @@ -261,7 +261,7 @@ public class EbayOrderServices { private static Map<String, Object> checkOrders(Delegator delegator, LocalDispatcher dispatcher, Locale locale, Map<String, Object> context, String responseMsg) { StringBuffer errorMessage = new StringBuffer(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); GenericValue userLogin = (GenericValue) context.get("userLogin"); if (isGetSellerTransactionsCall) { List<Map<String, Object>> getSellerTransactionList = readGetSellerTransactionResponse(responseMsg, locale, (String) context.get("productStoreId"), delegator, dispatcher, errorMessage, userLogin); @@ -423,7 +423,7 @@ public class EbayOrderServices { private static List<Map<String, Object>> readGetOrdersResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List<Map<String, Object>> fetchedOrders = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> fetchedOrders = new LinkedList<>(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); @@ -448,7 +448,7 @@ public class EbayOrderServices { Iterator<? extends Element> ordersElemIter = orders.iterator(); while (ordersElemIter.hasNext()) { - Map<String, Object> orderCtx = new HashMap<String, Object>(); + Map<String, Object> orderCtx = new HashMap<>(); Element ordersElement = ordersElemIter.next(); String externalOrderId = UtilXml.childElementValue(ordersElement, "OrderID"); orderCtx.put("externalId", "EBO_" + externalOrderId); @@ -471,7 +471,7 @@ public class EbayOrderServices { orderCtx.put("productStoreId", productStoreId); // Retrieve shipping address - Map<String, Object> shippingAddressCtx = new HashMap<String, Object>(); + Map<String, Object> shippingAddressCtx = new HashMap<>(); List<? extends Element> shippingAddressList = UtilXml.childElementList(ordersElement, "ShippingAddress"); Iterator<? extends Element> shippingAddressElemIter = shippingAddressList.iterator(); while (shippingAddressElemIter.hasNext()) { @@ -494,7 +494,7 @@ public class EbayOrderServices { } // Retrieve shipping service selected - Map<String, Object> shippingServiceSelectedCtx = new HashMap<String, Object>(); + Map<String, Object> shippingServiceSelectedCtx = new HashMap<>(); List<? extends Element> shippingServiceSelectedList = UtilXml.childElementList(ordersElement, "ShippingServiceSelected"); Iterator<? extends Element> shippingServiceSelectedElemIter = shippingServiceSelectedList.iterator(); while (shippingServiceSelectedElemIter.hasNext()) { @@ -514,7 +514,7 @@ public class EbayOrderServices { } // Retrieve shipping details - Map<String, Object> shippingDetailsCtx = new HashMap<String, Object>(); + Map<String, Object> shippingDetailsCtx = new HashMap<>(); List<? extends Element> shippingDetailsList = UtilXml.childElementList(ordersElement, "ShippingDetails"); Iterator<? extends Element> shippingDetailsElemIter = shippingDetailsList.iterator(); while (shippingDetailsElemIter.hasNext()) { @@ -537,7 +537,7 @@ public class EbayOrderServices { orderCtx.put("shippingDetailsCtx", shippingDetailsCtx); // Retrieve checkout status - Map<String, Object> checkoutStatusCtx = new HashMap<String, Object>(); + Map<String, Object> checkoutStatusCtx = new HashMap<>(); List<? extends Element> checkoutStatusList = UtilXml.childElementList(ordersElement, "CheckoutStatus"); Iterator<? extends Element> checkoutStatusElemIter = checkoutStatusList.iterator(); while (checkoutStatusElemIter.hasNext()) { @@ -549,7 +549,7 @@ public class EbayOrderServices { orderCtx.put("checkoutStatusCtx", checkoutStatusCtx); // Retrieve external transaction - Map<String, Object> externalTransactionCtx = new HashMap<String, Object>(); + Map<String, Object> externalTransactionCtx = new HashMap<>(); List<? extends Element> externalTransactionList = UtilXml.childElementList(ordersElement, "ExternalTransaction"); Iterator<? extends Element> externalTransactionElemIter = externalTransactionList.iterator(); while (externalTransactionElemIter.hasNext()) { @@ -562,7 +562,7 @@ public class EbayOrderServices { orderCtx.put("externalTransactionCtx", externalTransactionCtx); // Retrieve Transactions Array --> Transactions | Order Items - List<Map<String, Object>> orderItemList = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> orderItemList = new LinkedList<>(); String buyersEmailId = null; List<? extends Element> transactionArrayList = UtilXml.childElementList(ordersElement, "TransactionArray"); Iterator<? extends Element> transactionArrayElemIter = transactionArrayList.iterator(); @@ -573,7 +573,7 @@ public class EbayOrderServices { List<? extends Element> transactionList = UtilXml.childElementList(transactionArrayElement, "Transaction"); Iterator<? extends Element> transactionElemIter = transactionList.iterator(); while (transactionElemIter.hasNext()) { - Map<String, Object> transactionCtx = new HashMap<String, Object>(); + Map<String, Object> transactionCtx = new HashMap<>(); Element transactionElement = transactionElemIter.next(); // Retrieve Buyer email @@ -632,7 +632,7 @@ public class EbayOrderServices { } private static List<Map<String, Object>> readGetSellerTransactionResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List<Map<String, Object>> fetchedOrders = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> fetchedOrders = new LinkedList<>(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); @@ -661,7 +661,7 @@ public class EbayOrderServices { Iterator<? extends Element> transactionElemIter = transaction.iterator(); while (transactionElemIter.hasNext()) { Element transactionElement = transactionElemIter.next(); - Map<String, Object> orderCtx = new HashMap<String, Object>(); + Map<String, Object> orderCtx = new HashMap<>(); orderCtx.put("amountPaid", UtilXml.childElementValue(transactionElement, "AmountPaid", "0")); String createdDate = UtilXml.childElementValue(transactionElement, "CreatedDate"); @@ -688,8 +688,8 @@ public class EbayOrderServices { } // retrieve buyer - Map<String, Object> shippingAddressCtx = new HashMap<String, Object>(); - Map<String, Object> buyerCtx = new HashMap<String, Object>(); + Map<String, Object> shippingAddressCtx = new HashMap<>(); + Map<String, Object> buyerCtx = new HashMap<>(); List<? extends Element> buyer = UtilXml.childElementList(transactionElement, "Buyer"); Iterator<? extends Element> buyerElemIter = buyer.iterator(); while (buyerElemIter.hasNext()) { @@ -726,7 +726,7 @@ public class EbayOrderServices { orderCtx.put("shippingAddressCtx", shippingAddressCtx); // retrieve shipping service selected - Map<String, Object> shippingServiceSelectedCtx = new HashMap<String, Object>(); + Map<String, Object> shippingServiceSelectedCtx = new HashMap<>(); List<? extends Element> shippingServiceSelected = UtilXml.childElementList(transactionElement, "ShippingServiceSelected"); Iterator<? extends Element> shippingServiceSelectedElemIter = shippingServiceSelected.iterator(); while (shippingServiceSelectedElemIter.hasNext()) { @@ -758,7 +758,7 @@ public class EbayOrderServices { orderCtx.put("shippingServiceSelectedCtx", shippingServiceSelectedCtx); // retrieve shipping details - Map<String, Object> shippingDetailsCtx = new HashMap<String, Object>(); + Map<String, Object> shippingDetailsCtx = new HashMap<>(); List<? extends Element> shippingDetails = UtilXml.childElementList(transactionElement, "ShippingDetails"); Iterator<? extends Element> shippingDetailsElemIter = shippingDetails.iterator(); while (shippingDetailsElemIter.hasNext()) { @@ -798,7 +798,7 @@ public class EbayOrderServices { orderCtx.put("shippingDetailsCtx", shippingDetailsCtx); // retrieve status - Map<String, Object> checkoutStatusCtx = new HashMap<String, Object>(); + Map<String, Object> checkoutStatusCtx = new HashMap<>(); List<? extends Element> status = UtilXml.childElementList(transactionElement, "Status"); Iterator<? extends Element> statusElemIter = status.iterator(); while (statusElemIter.hasNext()) { @@ -812,7 +812,7 @@ public class EbayOrderServices { orderCtx.put("checkoutStatusCtx", checkoutStatusCtx); // retrieve external transaction - Map<String, Object> externalTransactionCtx = new HashMap<String, Object>(); + Map<String, Object> externalTransactionCtx = new HashMap<>(); List<? extends Element> externalTransaction = UtilXml.childElementList(transactionElement, "ExternalTransaction"); Iterator<? extends Element> externalTransactionElemIter = externalTransaction.iterator(); while (externalTransactionElemIter.hasNext()) { @@ -826,12 +826,12 @@ public class EbayOrderServices { String quantityPurchased = UtilXml.childElementValue(transactionElement, "QuantityPurchased", ""); // retrieve item - List<Map<String, Object>> orderItemList = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> orderItemList = new LinkedList<>(); String itemId = ""; List<? extends Element> item = UtilXml.childElementList(transactionElement, "Item"); Iterator<? extends Element> itemElemIter = item.iterator(); while (itemElemIter.hasNext()) { - Map<String, Object> orderItemCtx = new HashMap<String, Object>(); + Map<String, Object> orderItemCtx = new HashMap<>(); Element itemElement = itemElemIter.next(); itemId = UtilXml.childElementValue(itemElement, "ItemID", ""); orderItemCtx.put("paymentMethods", UtilXml.childElementValue(itemElement, "PaymentMethods", "")); @@ -915,7 +915,7 @@ public class EbayOrderServices { } private static List<String> readGetMyeBaySellingResponse(String responseMsg, Locale locale, String productStoreId, Delegator delegator, LocalDispatcher dispatcher, StringBuffer errorMessage, GenericValue userLogin) { - List<String> fetchDeletedOrdersAndTransactions = new LinkedList<String>(); + List<String> fetchDeletedOrdersAndTransactions = new LinkedList<>(); try { Document docResponse = UtilXml.readXmlDocument(responseMsg, true); //Debug.logInfo("The generated string is ======= " + UtilXml.writeXmlDocument(docResponse), module); @@ -1271,7 +1271,7 @@ public class EbayOrderServices { BigDecimal price = new BigDecimal(itemPrice); price = price.setScale(ShoppingCart.scale, ShoppingCart.rounding); - HashMap<String, Object> attrs = new HashMap<String, Object>(); + HashMap<String, Object> attrs = new HashMap<>(); attrs.put("shipGroup", groupIdx); // Checking if previously added same product exists in the cart Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java Sat May 25 23:42:00 2019 @@ -60,7 +60,7 @@ public class ImportOrdersFromEbay { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { Map<String, Object> eBayConfigResult = EbayHelper.buildEbayConfig(context, delegator); StringBuffer sellerTransactionsItemsXml = new StringBuffer(); @@ -84,8 +84,8 @@ public class ImportOrdersFromEbay { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); - Map<String, Object> order = new HashMap<String, Object>(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> order = new HashMap<>(); + Map<String, Object> result = new HashMap<>(); try { order.put("productStoreId", context.get("productStoreId")); order.put("userLogin", context.get("userLogin")); @@ -129,7 +129,7 @@ public class ImportOrdersFromEbay { String orderId = (String) context.get("orderId"); String externalId = (String) context.get("externalId"); String transactionId = ""; - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { if (orderId == null && externalId == null) { Debug.logError("orderId or externalId must be filled", module); @@ -204,7 +204,7 @@ public class ImportOrdersFromEbay { order.put("errorMessage", ""); } } - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); result.put("responseMessage", ModelService.RESPOND_SUCCESS); result.put("orderList", orders); return result; @@ -352,7 +352,7 @@ public class ImportOrdersFromEbay { } if (ack != null && "Success".equals(ack)) { - orders = new LinkedList<Map<String,Object>>(); + orders = new LinkedList<>(); if (totalOrders > 0) { // retrieve transaction array List<? extends Element> transactions = UtilXml.childElementList(elemResponse, "TransactionArray"); @@ -364,7 +364,7 @@ public class ImportOrdersFromEbay { List<? extends Element> transaction = UtilXml.childElementList(transactionsElement, "Transaction"); Iterator<? extends Element> transactionElemIter = transaction.iterator(); while (transactionElemIter.hasNext()) { - Map<String, Object> order = new HashMap<String, Object>(); + Map<String, Object> order = new HashMap<>(); String itemId = ""; Element transactionElement = transactionElemIter.next(); Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java Sat May 25 23:42:00 2019 @@ -59,8 +59,8 @@ public class ProductsExportToEbay { private static final String resource = "EbayUiLabels"; private static final String configFileName = "ebayExport.properties"; private static final String module = ProductsExportToEbay.class.getName(); - private static List<String> productExportSuccessMessageList = new LinkedList<String>(); - private static List<String> productExportFailureMessageList = new LinkedList<String>(); + private static List<String> productExportSuccessMessageList = new LinkedList<>(); + private static List<String> productExportFailureMessageList = new LinkedList<>(); public static Map<String, Object> exportToEbay(DispatchContext dctx, Map<String, Object> context) { @@ -68,7 +68,7 @@ public class ProductsExportToEbay { Delegator delegator = dctx.getDelegator(); productExportSuccessMessageList.clear(); productExportFailureMessageList.clear(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Map<String, Object> response = null; try { List<String> selectResult = UtilGenerics.checkList(context.get("selectResult"), String.class); @@ -152,7 +152,7 @@ public class ProductsExportToEbay { outputStream.close(); int responseCode = connection.getResponseCode(); InputStream inputStream; - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); String response = null; if (responseCode == HttpURLConnection.HTTP_CREATED || @@ -548,7 +548,7 @@ public class ProductsExportToEbay { private static Map<String, Object> readEbayCategoriesResponse(String msg, Locale locale) { Map<String, Object> results = null; - List<Map<String, Object>> categories = new LinkedList<Map<String,Object>>(); + List<Map<String, Object>> categories = new LinkedList<>(); try { Document docResponse = UtilXml.readXmlDocument(msg, true); Element elemResponse = docResponse.getDocumentElement(); @@ -564,7 +564,7 @@ public class ProductsExportToEbay { for (Element categoryArrayElement : UtilXml.childElementList(elemResponse, "CategoryArray")) { // retrieve Category for (Element categoryElement : UtilXml.childElementList(categoryArrayElement, "Category")) { - Map<String, Object> categ = new HashMap<String, Object>(); + Map<String, Object> categ = new HashMap<>(); String categoryCode = ("true".equalsIgnoreCase((UtilXml.childElementValue(categoryElement, "LeafCategory", "").trim())) ? "Y" : "N") + "_" + UtilXml.childElementValue(categoryElement, "CategoryID", "").trim() + "_" + Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java Sat May 25 23:42:00 2019 @@ -73,18 +73,18 @@ public class JanrainHelper { public String getApiKey() { return apiKey; } public String getBaseUrl() { return baseUrl; } public static Element authInfo(String token) { - Map<String, Object> query = new HashMap<String, Object>(); + Map<String, Object> query = new HashMap<>(); query.put("token", token); return apiCall("auth_info", query); } public HashMap<String, List<String>> allMappings() { Element rsp = apiCall("all_mappings", null); rsp.getFirstChild(); - HashMap<String, List<String>> result = new HashMap<String, List<String>>(); + HashMap<String, List<String>> result = new HashMap<>(); NodeList mappings = getNodeList("/rsp/mappings/mapping", rsp); for (int i = 0; i < mappings.getLength(); i++) { Element mapping = (Element)mappings.item(i); - List<String> identifiers = new ArrayList<String>(); + List<String> identifiers = new ArrayList<>(); NodeList rk_list = getNodeList("primaryKey", mapping); NodeList id_list = getNodeList("identifiers/identifier", mapping); String remote_key = ((Element)rk_list.item(0)).getTextContent(); @@ -106,11 +106,11 @@ public class JanrainHelper { } } public List<String> mappings(Object primaryKey) { - Map<String, Object> query = new HashMap<String, Object>(); + Map<String, Object> query = new HashMap<>(); query.put("primaryKey", primaryKey); Element rsp = apiCall("mappings", query); Element oids = (Element)rsp.getFirstChild(); - List<String> result = new ArrayList<String>(); + List<String> result = new ArrayList<>(); NodeList nl = oids.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Element e = (Element)nl.item(i); @@ -119,13 +119,13 @@ public class JanrainHelper { return result; } public void map(String identifier, Object primaryKey) { - Map<String, Object> query = new HashMap<String, Object>(); + Map<String, Object> query = new HashMap<>(); query.put("identifier", identifier); query.put("primaryKey", primaryKey); apiCall("map", query); } public void unmap(String identifier, Object primaryKey) { - Map<String, Object> query = new HashMap<String, Object>(); + Map<String, Object> query = new HashMap<>(); query.put("identifier", identifier); query.put("primaryKey", primaryKey); apiCall("unmap", query); @@ -133,9 +133,9 @@ public class JanrainHelper { private static Element apiCall(String methodName, Map<String, Object> partialQuery) { Map<String, Object> query = null; if (partialQuery == null) { - query = new HashMap<String, Object>(); + query = new HashMap<>(); } else { - query = new HashMap<String, Object>(partialQuery); + query = new HashMap<>(partialQuery); } query.put("format", "xml"); query.put("apiKey", apiKey); @@ -216,7 +216,7 @@ public class JanrainHelper { return "error"; } - Map<String, String> result = new HashMap<String, String>(); + Map<String, String> result = new HashMap<>(); result.put("displayName", displayName); result.put("email", email); result.put("identifier", identifier); Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/misc/ThirdPartyEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/misc/ThirdPartyEvents.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/misc/ThirdPartyEvents.java (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/misc/ThirdPartyEvents.java Sat May 25 23:42:00 2019 @@ -141,7 +141,7 @@ public class ThirdPartyEvents { String distributorId = (String) request.getSession().getAttribute(DISTRIBUTOR_ID); if (UtilValidate.isNotEmpty(distributorId)) { - List<GenericValue> toBeStored = new LinkedList<GenericValue>(); + List<GenericValue> toBeStored = new LinkedList<>(); // create distributor Party ?? why? // create distributor PartyRole ?? why? Modified: ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java Sat May 25 23:42:00 2019 @@ -73,7 +73,7 @@ public class ExamplePrintServices { visualTheme = ThemeFactory.resolveVisualTheme(null); } if (visualTheme == null) visualTheme = ThemeFactory.resolveVisualTheme(null); - Map<String, Object> workContext = new HashMap<String, Object>(); + Map<String, Object> workContext = new HashMap<>(); workContext.putAll(context); // render a screen to get the XML document Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java Sat May 25 23:42:00 2019 @@ -59,7 +59,7 @@ public final class OFBizActiveDirectoryA String authenType = UtilXml.childElementValue(rootElement, "AuthenType", "simple"); String searchType = UtilXml.childElementValue(rootElement, "SearchType", ""); String baseDN = UtilXml.childElementValue(rootElement, "BaseDN"); - Hashtable<String, String> env = new Hashtable<String, String>(); + Hashtable<String, String> env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, ldapURL); if (searchType == null || searchType.trim().equals("")) { Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java Sat May 25 23:42:00 2019 @@ -54,7 +54,7 @@ public final class OFBizLdapAuthenticati String ldapURL = UtilXml.childElementValue(rootElement, "URL", "ldap://localhost:389"); String authenType = UtilXml.childElementValue(rootElement, "AuthenType", "simple"); String baseDN = UtilXml.childElementValue(rootElement, "BaseDN"); - Hashtable<String, String> env = new Hashtable<String, String>(); + Hashtable<String, String> env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, ldapURL); env.put(Context.SECURITY_AUTHENTICATION, "none"); Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ContentDocument.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ContentDocument.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ContentDocument.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ContentDocument.java Sat May 25 23:42:00 2019 @@ -89,7 +89,7 @@ public class ContentDocument implements String description = content.getString("description"); if (UtilValidate.isNotEmpty(description)) doc.add(new TextField("description", description, Store.YES)); - List<String> ancestorList = new ArrayList<String>(); + List<String> ancestorList = new ArrayList<>(); ContentWorker.getContentAncestryAll(content.getDelegator(), contentId, "WEB_SITE_PUB_PT", "TO", ancestorList); String ancestorString = StringUtil.join(ancestorList, " "); if (UtilValidate.isNotEmpty(ancestorString)) { @@ -145,7 +145,7 @@ public class ContentDocument implements Debug.logError(e, module); return false; } - List<String> featureList = new ArrayList<String>(); + List<String> featureList = new ArrayList<>(); for (GenericValue productFeatureDataResource : featureDataResourceList) { String feature = productFeatureDataResource.getString("productFeatureId"); featureList.add(feature); Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/DocumentIndexer.java Sat May 25 23:42:00 2019 @@ -41,8 +41,8 @@ public class DocumentIndexer extends Thr public static final String module = DocumentIndexer.class.getName(); - private static Map<String, DocumentIndexer> documentIndexerMap = new HashMap<String, DocumentIndexer>(); - private LinkedBlockingQueue<LuceneDocument> documentIndexQueue = new LinkedBlockingQueue<LuceneDocument>(); + private static Map<String, DocumentIndexer> documentIndexerMap = new HashMap<>(); + private LinkedBlockingQueue<LuceneDocument> documentIndexQueue = new LinkedBlockingQueue<>(); private Delegator delegator; private Directory indexDirectory; // TODO: Move to property file Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java Sat May 25 23:42:00 2019 @@ -249,7 +249,7 @@ public class ProductDocument implements // Index ProductSuppliers List<GenericValue> supplierProducts = product.getRelated("SupplierProduct", null, null, false); supplierProducts = this.filterByThruDate(supplierProducts, "availableThruDate"); - Set<String> supplierPartyIds = new TreeSet<String>(); + Set<String> supplierPartyIds = new TreeSet<>(); for (GenericValue supplierProduct : supplierProducts) { Timestamp fromDate = supplierProduct.getTimestamp("availableFromDate"); Timestamp thruDate = supplierProduct.getTimestamp("availableThruDate"); @@ -325,7 +325,7 @@ public class ProductDocument implements private Timestamp populateCategoryData(Document doc, GenericValue product) throws GenericEntityException { Timestamp nextReIndex = null; - Set<String> indexedCategoryIds = new TreeSet<String>(); + Set<String> indexedCategoryIds = new TreeSet<>(); List<GenericValue> productCategoryMembers = product.getRelated("ProductCategoryMember", null, null, false); productCategoryMembers = this.filterByThruDate(productCategoryMembers); Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java Sat May 25 23:42:00 2019 @@ -44,7 +44,7 @@ public class SearchEvents { public static String indexContentTree(HttpServletRequest request, HttpServletResponse response) { Map<String, Object> result; - Map<String, Object> serviceInMap = new HashMap<String, Object>(); + Map<String, Object> serviceInMap = new HashMap<>(); HttpSession session = request.getSession(); GenericValue userLogin = (GenericValue)session.getAttribute("userLogin"); serviceInMap.put("userLogin", userLogin); Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchServices.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchServices.java Sat May 25 23:42:00 2019 @@ -95,7 +95,7 @@ public class SearchServices { public static Map<String, Object> indexProductsFromProductAssoc(DispatchContext dctx, Map<String, ? extends Object> context) { LocalDispatcher dispatcher = dctx.getDispatcher(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { result = dispatcher.runSync("indexProduct", UtilMisc.toMap("productId", context.get("productId"))); if (ServiceUtil.isError(result)) { @@ -114,7 +114,7 @@ public class SearchServices { public static Map<String, Object> indexProductsFromDataResource(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); try { List<GenericValue> contents = EntityQuery.use(delegator).from("Content").where("dataResourceId", context.get("dataResourceId")).queryList(); for (GenericValue content : contents) { Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java Sat May 25 23:42:00 2019 @@ -55,7 +55,7 @@ public final class SearchWorker { List<GenericValue> subContentList = ContentWorker.getAssociatedContent(siteContent, "To", UtilMisc.toList("SUBSITE", "PUBLISH_LINK", "SUB_CONTENT"), null, UtilDateTime.nowTimestamp().toString(), null); if (subContentList != null) { - List<String> contentIdList = new ArrayList<String>(); + List<String> contentIdList = new ArrayList<>(); for (GenericValue subContent : subContentList) { contentIdList.add(subContent.getString("contentId")); } @@ -73,7 +73,7 @@ public final class SearchWorker { public static void indexContentList(LocalDispatcher dispatcher, Delegator delegator, List<String> idList) throws Exception { DocumentIndexer indexer = DocumentIndexer.getInstance(delegator, "content"); - List<GenericValue> contentList = new ArrayList<GenericValue>(); + List<GenericValue> contentList = new ArrayList<>(); for (String id : idList) { try { GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", id).cache(true).queryOne(); Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java (original) +++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java Sat May 25 23:42:00 2019 @@ -62,7 +62,7 @@ public class LuceneTests extends OFBizTe } public void testSearchTermHand() throws Exception { - Map<String, Object> ctx = new HashMap<String, Object>(); + Map<String, Object> ctx = new HashMap<>(); ctx.put("contentId", "LuceneCONTENT"); ctx.put("userLogin", userLogin); Map<String, Object> resp = dispatcher.runSync("indexContentTree", ctx); Modified: ofbiz/ofbiz-plugins/trunk/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java (original) +++ ofbiz/ofbiz-plugins/trunk/msggateway/src/main/java/org/apache/ofbiz/msg91/Msg91Services.java Sat May 25 23:42:00 2019 @@ -29,7 +29,7 @@ public class Msg91Services { try { GenericValue msg91GatewayConfig = EntityQuery.use(delegator).from("Msg91GatewayConfig").queryFirst(); if (msg91GatewayConfig != null) { - Map<String, Object> paramMap = new HashMap<String, Object>(); + Map<String, Object> paramMap = new HashMap<>(); paramMap.put("country", msg91GatewayConfig.getString("country")); paramMap.put("sender", msg91GatewayConfig.getString("sender")); paramMap.put("route", msg91GatewayConfig.getString("route")); Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java (original) +++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java Sat May 25 23:42:00 2019 @@ -238,7 +238,7 @@ public class GitHubAuthenticator impleme private String createUser(Map<String, Object> userMap, GenericValue system) throws AuthenticatorException { // create person + userLogin - Map<String, Serializable> createPersonUlMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createPersonUlMap = new HashMap<>(); String userLoginId = delegator.getNextSeqId("UserLogin"); if (userMap.containsKey("name")) { // use github's name as OFBiz's lastName @@ -274,7 +274,7 @@ public class GitHubAuthenticator impleme // create email if (userMap.containsKey("email")) { - Map<String, Serializable> createEmailMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createEmailMap = new HashMap<>(); createEmailMap.put("emailAddress", (String) userMap.get("email")); createEmailMap.put("contactMechPurposeTypeId", "PRIMARY_EMAIL"); createEmailMap.put("partyId", partyId); @@ -303,7 +303,7 @@ public class GitHubAuthenticator impleme // add it to the user if it exists if (secGroup != null) { - Map<String, Serializable> createSecGrpMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createSecGrpMap = new HashMap<>(); createSecGrpMap.put("userLoginId", userLoginId); createSecGrpMap.put("groupId", securityGroup); createSecGrpMap.put("fromDate", now); Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubUserGroupMapper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubUserGroupMapper.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubUserGroupMapper.java (original) +++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubUserGroupMapper.java Sat May 25 23:42:00 2019 @@ -40,7 +40,7 @@ public class GitHubUserGroupMapper { public GitHubUserGroupMapper(String group) { if (groups == null) { - groups = new ArrayList<String>(); + groups = new ArrayList<>(); } groups.add(group); } @@ -48,7 +48,7 @@ public class GitHubUserGroupMapper { public Set<String> getSecurityGroups() { Properties props = UtilProperties.getProperties(GitHubAuthenticator.props); - Set<String> secGroups = new HashSet<String>(); + Set<String> secGroups = new HashSet<>(); boolean running = true; int index = 1; Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInAuthenticator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInAuthenticator.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInAuthenticator.java (original) +++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInAuthenticator.java Sat May 25 23:42:00 2019 @@ -256,7 +256,7 @@ public class LinkedInAuthenticator imple Map<String, String> userInfo = parseLinkedInUserInfo(user); // create person + userLogin - Map<String, Serializable> createPersonUlMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createPersonUlMap = new HashMap<>(); String userLoginId = delegator.getNextSeqId("UserLogin"); if (userInfo.containsKey("firstName")) { createPersonUlMap.put("firstName", userInfo.get("firstName")); @@ -294,7 +294,7 @@ public class LinkedInAuthenticator imple // create email if (userInfo.containsKey("emailAddress")) { - Map<String, Serializable> createEmailMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createEmailMap = new HashMap<>(); createEmailMap.put("emailAddress", userInfo.get("emailAddress")); createEmailMap.put("contactMechPurposeTypeId", "PRIMARY_EMAIL"); createEmailMap.put("partyId", partyId); @@ -323,7 +323,7 @@ public class LinkedInAuthenticator imple // add it to the user if it exists if (secGroup != null) { - Map<String, Serializable> createSecGrpMap = new HashMap<String, Serializable>(); + Map<String, Serializable> createSecGrpMap = new HashMap<>(); createSecGrpMap.put("userLoginId", userLoginId); createSecGrpMap.put("groupId", securityGroup); createSecGrpMap.put("fromDate", now); @@ -432,7 +432,7 @@ public class LinkedInAuthenticator imple } public static Map<String, String> parseLinkedInUserInfo(Document userInfo) { - Map<String, String> results = new HashMap<String, String>(); + Map<String, String> results = new HashMap<>(); NodeList persons = userInfo.getElementsByTagName("person"); if (UtilValidate.isEmpty(persons) || persons.getLength() <= 0) { return results; Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInUserGroupMapper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInUserGroupMapper.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInUserGroupMapper.java (original) +++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/LinkedInUserGroupMapper.java Sat May 25 23:42:00 2019 @@ -40,7 +40,7 @@ public class LinkedInUserGroupMapper { public LinkedInUserGroupMapper(String group) { if (groups == null) { - groups = new ArrayList<String>(); + groups = new ArrayList<>(); } groups.add(group); } @@ -48,7 +48,7 @@ public class LinkedInUserGroupMapper { public Set<String> getSecurityGroups() { Properties props = UtilProperties.getProperties(LinkedInAuthenticator.props); - Set<String> secGroups = new HashSet<String>(); + Set<String> secGroups = new HashSet<>(); boolean running = true; int index = 1; Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReport.java Sat May 25 23:42:00 2019 @@ -38,7 +38,7 @@ public abstract class AbstractReport imp private long startTime; /** Contains all warning messages generated by the report. */ - private List<Object> warnings = new ArrayList<Object>(); + private List<Object> warnings = new ArrayList<>(); /** Day constant. */ private static final long DAYS = 1000 * 60 * 60 * 24; @@ -137,7 +137,7 @@ public abstract class AbstractReport imp protected void init(Locale locale) { startTime = System.currentTimeMillis(); this.locale = locale; - errors = new ArrayList<Object>(); + errors = new ArrayList<>(); } /** Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java Sat May 25 23:42:00 2019 @@ -205,8 +205,8 @@ public class HtmlReport extends Abstract public HtmlReport(HttpServletRequest request, HttpServletResponse response, boolean writeHtml, boolean isTransient) { init(UtilHttp.getLocale(request)); - content = new ArrayList<Serializable>(256); - logContent = new ArrayList<Serializable>(256); + content = new ArrayList<>(256); + logContent = new ArrayList<>(256); showExceptionStackTrace = true; this.writeHtml = writeHtml; this.isTransient = isTransient; @@ -847,7 +847,7 @@ public class HtmlReport extends Abstract */ protected Map<String, Object> paramValues(HttpServletRequest request) { List<Method> methods = paramGetMethods(); - Map<String, Object> map = new HashMap<String, Object>(methods.size()); + Map<String, Object> map = new HashMap<>(methods.size()); Iterator<Method> i = methods.iterator(); while (i.hasNext()) { Method m = i.next(); @@ -874,7 +874,7 @@ public class HtmlReport extends Abstract * start with "getParam" and have no parameters */ private List<Method> paramGetMethods() { - List<Method> list = new ArrayList<Method>(); + List<Method> list = new ArrayList<>(); Method[] methods = this.getClass().getMethods(); int length = methods.length; for (int i = 0; i < length; i++) { @@ -1177,7 +1177,7 @@ public class HtmlReport extends Abstract Collections.sort(resourceList); } else { // this is a single resource operation, create list containing the resource name - resourceList = new ArrayList<String>(1); + resourceList = new ArrayList<>(1); String resource = getParamResource(request); if (ReportStringUtil.isNotEmptyOrWhitespaceOnly(resource)) { resourceList.add(resource); Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java Sat May 25 23:42:00 2019 @@ -69,7 +69,7 @@ public final class ReportEncoder { private static final String ENTITY_REPLACEMENT = "$$"; /** A cache for encoding name lookup. */ - private static Map<String, String> encodingCache = new HashMap<String, String>(16); + private static Map<String, String> encodingCache = new HashMap<>(16); /** The plus entity. */ private static final String PLUS_ENTITY = ENTITY_PREFIX + "043;"; Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/AbstractPricatParser.java Sat May 25 23:42:00 2019 @@ -97,11 +97,11 @@ public abstract class AbstractPricatPars protected String currencyId; - protected Map<CellReference, String> errorMessages = new HashMap<CellReference, String>(); + protected Map<CellReference, String> errorMessages = new HashMap<>(); protected HSSFDataFormatter formatter = new HSSFDataFormatter(); - protected Map<String, String[]> facilities = new HashMap<String, String[]>(); + protected Map<String, String[]> facilities = new HashMap<>(); protected HttpSession session; @@ -232,7 +232,7 @@ public abstract class AbstractPricatPars // set comments in the new error sheet XSSFDrawing errorPatriarch = errorSheet.getDrawingPatriarch(); int newRowNum = getHeaderRowNo() + 1; - Map<Integer, Integer> rowMapping = new HashMap<Integer, Integer>(); + Map<Integer, Integer> rowMapping = new HashMap<>(); for (CellReference cell : errorMessages.keySet()) { if (cell != null && errorMessages.get(cell) != null) { XSSFRow row = sheet.getRow(cell.getRow()); @@ -340,15 +340,15 @@ public abstract class AbstractPricatPars } public void initBasicConds(List<String> orgPartyIds) { - basicCategoryConds = new ArrayList<EntityCondition>(); + basicCategoryConds = new ArrayList<>(); basicCategoryConds.add(EntityCondition.makeCondition("isPublic", "N")); //basicCategoryConds.add(EntityCondition.makeCondition("isDefault", "Y")); - basicBrandConds = new ArrayList<EntityCondition>(); + basicBrandConds = new ArrayList<>(); basicBrandConds.add(EntityCondition.makeCondition("isPublic", "N")); basicBrandConds.add(EntityCondition.makeCondition("productFeatureTypeId", "BRAND")); - List<EntityCondition> partyIdConds = new ArrayList<EntityCondition>(); + List<EntityCondition> partyIdConds = new ArrayList<>(); for (String orgPartyId : orgPartyIds) { partyIdConds.add(EntityCondition.makeCondition("ownerPartyId", orgPartyId)); } @@ -408,7 +408,7 @@ public abstract class AbstractPricatPars * @return */ public List<Object> getCellContents(XSSFRow row, List<Object[]> colNames, int size) { - List<Object> results = new ArrayList<Object>(); + List<Object> results = new ArrayList<>(); boolean foundError = false; if (isEmptyRow(row, size, true)) { return null; @@ -627,7 +627,7 @@ public abstract class AbstractPricatPars report.println(" ... " + UtilProperties.getMessage(resource, "skipped", locale), InterfaceReport.FORMAT_NOTE); } else { report.print(" ... " + UtilProperties.getMessage(resource, "HistoryEntryToRemove", new Object[] {historyValues.size() - HISTORY_MAX_FILENUMBER}, locale), InterfaceReport.FORMAT_NOTE); - List<GenericValue> valuesToRemove = new ArrayList<GenericValue>(); + List<GenericValue> valuesToRemove = new ArrayList<>(); for (int i = HISTORY_MAX_FILENUMBER; i < historyValues.size(); i++) { GenericValue historyValue = historyValues.get(i); valuesToRemove.add(historyValue); Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java Sat May 25 23:42:00 2019 @@ -100,7 +100,7 @@ public class PricatParseExcelHtmlThread private GenericValue userLogin; - private Map<String, String[]> facilities = new HashMap<String, String[]>(); + private Map<String, String[]> facilities = new HashMap<>(); public static final String resource = "PricatUiLabels"; @@ -281,11 +281,11 @@ public class PricatParseExcelHtmlThread private Map<String, String[]> getCurrentUserLoginFacilities() { getReport().println(); getReport().println(UtilProperties.getMessage(resource, "GetCurrentUserLoginFacility", getLocale()), InterfaceReport.FORMAT_DEFAULT); - Map<String, Object> context = new HashMap<String, Object>(); + Map<String, Object> context = new HashMap<>(); context.put("userLogin", userLogin); context.put("locale", getLocale()); try { - List<EntityCondition> orgConditions = new LinkedList<EntityCondition>(); + List<EntityCondition> orgConditions = new LinkedList<>(); orgConditions.add(EntityCondition.makeCondition("onePartyIdFrom", EntityOperator.EQUALS, userLogin.getString("partyId"))); orgConditions.add(EntityCondition.makeCondition("twoRoleTypeIdFrom", EntityOperator.EQUALS, "INTERNAL_ORGANIZATIO")); orgConditions.add(EntityCondition.makeCondition("twoRoleTypeIdTo", EntityOperator.EQUALS, "EMPLOYEE")); @@ -295,8 +295,8 @@ public class PricatParseExcelHtmlThread organizations = EntityUtil.filterByDate(organizations, now, "twoFromDate", "twoThruDate", true); organizations = EntityUtil.filterByDate(organizations, now, "oneFromDate", "oneThruDate", true); - List<EntityCondition> ownerPartyConditions = new LinkedList<EntityCondition>(); - Set<String> orgPartyIds = new HashSet<String>(); + List<EntityCondition> ownerPartyConditions = new LinkedList<>(); + Set<String> orgPartyIds = new HashSet<>(); for (GenericValue organization : organizations) { String orgPartyId = organization.getString("onePartyIdTo"); if (!orgPartyIds.contains(orgPartyId)) { Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java?rev=1860025&r1=1860024&r2=1860025&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/sample/SamplePricatParser.java Sat May 25 23:42:00 2019 @@ -62,7 +62,7 @@ public class SamplePricatParser extends public static final int headerRowNo = 4; - private List<String> headerColNames = new ArrayList<String>(); + private List<String> headerColNames = new ArrayList<>(); public SamplePricatParser(LocalDispatcher dispatcher, Delegator delegator, Locale locale, InterfaceReport report, Map<String, String[]> facilities, File pricatFile, GenericValue userLogin) { super(dispatcher, delegator, locale, report, facilities, pricatFile, userLogin); @@ -472,7 +472,7 @@ public class SamplePricatParser extends * @return list of Object[] */ private static List<Object[]> genExcelHeaderNamesV1_1() { - List<Object[]> listHeaderName = new ArrayList<Object[]>(); + List<Object[]> listHeaderName = new ArrayList<>(); listHeaderName.add(new Object[] {"Facility Name", CellType.STRING, Boolean.TRUE}); @@ -541,7 +541,7 @@ public class SamplePricatParser extends * @return */ public List<Object> getCellContents(XSSFRow row, List<Object[]> colNames, int size) { - List<Object> results = new ArrayList<Object>(); + List<Object> results = new ArrayList<>(); boolean foundError = false; if (isEmptyRow(row, size, true)) { return null; |
Free forum by Nabble | Edit this page |