fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vorbur...@apache.org
Subject [fineract] branch develop updated: Fixes broken build due to spotless and error-prone
Date Sat, 20 Jun 2020 06:28:18 GMT
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2f04f6a  Fixes broken build due to spotless and error-prone
2f04f6a is described below

commit 2f04f6a3e71df2747ab881b639ffe75f977023f3
Author: thesmallstar <manthan.surkar@gmail.com>
AuthorDate: Sat Jun 20 04:23:05 2020 +0530

    Fixes broken build due to spotless and error-prone
---
 .../FlexibleSavingsInterestPostingIntegrationTest.java            | 4 ++--
 .../org/apache/fineract/integrationtests/common/CenterDomain.java | 2 +-
 .../apache/fineract/integrationtests/common/CurrencyDomain.java   | 2 +-
 .../org/apache/fineract/integrationtests/common/OfficeDomain.java | 2 +-
 .../fineract/integrationtests/common/funds/FundsHelper.java       | 2 +-
 .../service/AccrualBasedAccountingProcessorForLoan.java           | 3 +--
 .../java/org/apache/fineract/batch/command/CommandContext.java    | 2 +-
 .../java/org/apache/fineract/batch/service/ResolutionHelper.java  | 8 ++++----
 .../infrastructure/core/serialization/FromJsonHelper.java         | 5 ++---
 .../infrastructure/hooks/data/EventResultSetExtractor.java        | 5 ++---
 .../hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java  | 3 +--
 .../sms/scheduler/SmsMessageScheduledJobServiceImpl.java          | 3 +--
 .../main/java/org/apache/fineract/mix/service/XBRLBuilder.java    | 5 ++---
 .../org/apache/fineract/mix/service/XBRLResultServiceImpl.java    | 4 ++--
 .../apache/fineract/template/service/TemplateMergeService.java    | 3 +--
 .../infrastructure/classdupes/ClasspathHellDuplicatesChecker.java | 5 ++---
 16 files changed, 25 insertions(+), 33 deletions(-)

diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java
index a087235..9401d73 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java
@@ -27,7 +27,7 @@ import io.restassured.specification.RequestSpecification;
 import io.restassured.specification.ResponseSpecification;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Map.Entry;
+import java.util.Map;
 import org.apache.fineract.integrationtests.common.ClientHelper;
 import org.apache.fineract.integrationtests.common.CommonConstants;
 import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
@@ -85,7 +85,7 @@ public class FlexibleSavingsInterestPostingIntegrationTest {
         HashMap accountDetails = this.savingsAccountHelper.getSavingsDetails(savingsId);
         ArrayList<HashMap<String, Object>> transactions = (ArrayList<HashMap<String,
Object>>) accountDetails.get("transactions");
         HashMap<String, Object> interestPostingTransaction = transactions.get(transactions.size()
- 2);
-        for (Entry<String, Object> entry : interestPostingTransaction.entrySet()) {
+        for (Map.Entry<String, Object> entry : interestPostingTransaction.entrySet())
{
             LOG.info("{} - {}", entry.getKey(), entry.getValue().toString());
         }
         // 1st Dec 13 to 31st March 14 - 365 days, daily compounding using daily
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CenterDomain.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CenterDomain.java
index 321c4e0..3c1d9c1 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CenterDomain.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CenterDomain.java
@@ -28,7 +28,7 @@ public class CenterDomain implements Comparable<CenterDomain> {
 
     private static final Logger LOG = LoggerFactory.getLogger(CenterDomain.class);
 
-    public final static class Builder {
+    public static final class Builder {
 
         private final Integer id;
         private final String accountNo;
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CurrencyDomain.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CurrencyDomain.java
index a62994e..fc6cfaf 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CurrencyDomain.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CurrencyDomain.java
@@ -22,7 +22,7 @@ import com.google.gson.Gson;
 
 public class CurrencyDomain implements Comparable<CurrencyDomain> {
 
-    public final static class Builder {
+    public static final class Builder {
 
         private String code;
         private String name;
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/OfficeDomain.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/OfficeDomain.java
index a522b46..28a581c 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/OfficeDomain.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/OfficeDomain.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
 
 public class OfficeDomain {
 
-    public final static class Builder {
+    public static final class Builder {
 
         private int id;
         private String name;
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/funds/FundsHelper.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/funds/FundsHelper.java
index 604b088..15af82c 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/funds/FundsHelper.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/funds/FundsHelper.java
@@ -22,7 +22,7 @@ import com.google.gson.Gson;
 
 public class FundsHelper {
 
-    final public static class Builder {
+    public static final class Builder {
 
         private String name;
         private String externalId;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
index 0556dda..6f9079e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
@@ -24,7 +24,6 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import org.apache.fineract.accounting.closure.domain.GLClosure;
 import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan;
 import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForLoan;
@@ -284,7 +283,7 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess
             }
         }
 
-        for (Entry<GLAccount, BigDecimal> entry : accountMap.entrySet()) {
+        for (Map.Entry<GLAccount, BigDecimal> entry : accountMap.entrySet()) {
             this.helper.createCreditJournalEntryOrReversalForLoan(office, currencyCode, loanId,
transactionId, transactionDate,
                     entry.getValue(), isReversal, entry.getKey());
         }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java
b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java
index d8a8bb4..5ee2dc3 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java
@@ -35,7 +35,7 @@ public final class CommandContext {
      *
      * @author Rishabh Shukla
      */
-    public final static class Builder {
+    public static final class Builder {
 
         private String resource;
         private String method;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java
b/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java
index 89714ee..ecd58b3 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java
@@ -26,7 +26,7 @@ import com.jayway.jsonpath.JsonPath;
 import com.jayway.jsonpath.ReadContext;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map.Entry;
+import java.util.Map;
 import org.apache.fineract.batch.domain.BatchRequest;
 import org.apache.fineract.batch.domain.BatchResponse;
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
@@ -145,7 +145,7 @@ public class ResolutionHelper {
 
         // Iterate through each element in the requestBody to find dependent
         // parameter
-        for (Entry<String, JsonElement> element : jsonRequestBody.entrySet()) {
+        for (Map.Entry<String, JsonElement> element : jsonRequestBody.entrySet()) {
             final String key = element.getKey();
             final JsonElement value = resolveDependentVariables(element, responseCtx);
             jsonResultBody.add(key, value);
@@ -179,7 +179,7 @@ public class ResolutionHelper {
         return br;
     }
 
-    private JsonElement resolveDependentVariables(final Entry<String, JsonElement>
entryElement, final ReadContext responseCtx) {
+    private JsonElement resolveDependentVariables(final Map.Entry<String, JsonElement>
entryElement, final ReadContext responseCtx) {
         JsonElement value = null;
 
         final JsonElement element = entryElement.getValue();
@@ -198,7 +198,7 @@ public class ResolutionHelper {
 
     private JsonElement processJsonObject(final JsonObject jsObject, final ReadContext responseCtx)
{
         JsonObject valueObj = new JsonObject();
-        for (Entry<String, JsonElement> element : jsObject.entrySet()) {
+        for (Map.Entry<String, JsonElement> element : jsObject.entrySet()) {
             final String key = element.getKey();
             final JsonElement value = resolveDependentVariable(element.getValue(), responseCtx);
             valueObj.add(key, value);
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
index da50c25..26d66c2 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
@@ -32,7 +32,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Set;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
@@ -103,10 +102,10 @@ public class FromJsonHelper {
             throw new InvalidParameterException();
         }
 
-        final Set<Entry<String, JsonElement>> entries = object.entrySet();
+        final Set<Map.Entry<String, JsonElement>> entries = object.entrySet();
         final List<String> unsupportedParameterList = new ArrayList<>();
 
-        for (final Entry<String, JsonElement> providedParameter : entries) {
+        for (final Map.Entry<String, JsonElement> providedParameter : entries) {
             if (!supportedParams.contains(providedParameter.getKey())) {
                 unsupportedParameterList.add(providedParameter.getKey());
             }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java
index 3654983..95d5a73 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java
@@ -26,7 +26,6 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import org.springframework.dao.DataAccessException;
 import org.springframework.jdbc.core.ResultSetExtractor;
 
@@ -63,11 +62,11 @@ public class EventResultSetExtractor implements ResultSetExtractor<List<Grouping
             groupToEntityMapping.put(groupingName, entities);
         }
 
-        for (final Entry<String, Map<String, List<String>>> groupingEntry
: groupToEntityMapping.entrySet()) {
+        for (final Map.Entry<String, Map<String, List<String>>> groupingEntry
: groupToEntityMapping.entrySet()) {
             final List<Entity> entities = new ArrayList<>();
             final Grouping group = new Grouping();
             group.setName(groupingEntry.getKey());
-            for (final Entry<String, List<String>> entityEntry : groupingEntry.getValue().entrySet())
{
+            for (final Map.Entry<String, List<String>> entityEntry : groupingEntry.getValue().entrySet())
{
                 final List<String> actions = new ArrayList<>();
                 final Entity entity = new Entity();
                 entity.setName(entityEntry.getKey());
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java
index e8869fc..ddeb493 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java
@@ -34,7 +34,6 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Set;
 import javax.persistence.PersistenceException;
 import org.apache.commons.lang3.exception.ExceptionUtils;
@@ -223,7 +222,7 @@ public class HookWritePlatformServiceJpaRepositoryImpl implements HookWritePlatf
         final Set<HookConfiguration> configuration = new HashSet<>();
         final Set<Schema> fields = template.getSchema();
 
-        for (final Entry<String, String> configEntry : hookConfig.entrySet()) {
+        for (final Map.Entry<String, String> configEntry : hookConfig.entrySet()) {
             for (final Schema field : fields) {
                 final String fieldName = field.getFieldName();
                 if (fieldName.equalsIgnoreCase(configEntry.getKey())) {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java
index bb33e31..42d6e43 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java
@@ -25,7 +25,6 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import javax.annotation.PostConstruct;
@@ -194,7 +193,7 @@ public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJob
             if (!smsDataMap.isEmpty()) {
                 List<SmsMessage> toSaveMessages = new ArrayList<>();
                 List<SmsMessage> toSendNotificationMessages = new ArrayList<>();
-                for (Entry<SmsCampaign, Collection<SmsMessage>> entry : smsDataMap.entrySet())
{
+                for (Map.Entry<SmsCampaign, Collection<SmsMessage>> entry : smsDataMap.entrySet())
{
                     Iterator<SmsMessage> smsMessageIterator = entry.getValue().iterator();
                     Collection<SmsMessageApiQueueResourceData> apiQueueResourceDatas
= new ArrayList<>();
                     StringBuilder request = new StringBuilder();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLBuilder.java
b/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLBuilder.java
index 3fd282e..fd58bae 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLBuilder.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLBuilder.java
@@ -25,7 +25,6 @@ import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import org.apache.fineract.mix.data.ContextData;
 import org.apache.fineract.mix.data.MixTaxonomyData;
 import org.apache.fineract.mix.data.NamespaceData;
@@ -72,7 +71,7 @@ public class XBRLBuilder {
         this.startDate = startDate;
         this.endDate = endDate;
 
-        for (final Entry<MixTaxonomyData, BigDecimal> entry : map.entrySet()) {
+        for (final Map.Entry<MixTaxonomyData, BigDecimal> entry : map.entrySet()) {
             final MixTaxonomyData taxonomy = entry.getKey();
             final BigDecimal value = entry.getValue();
             addTaxonomy(this.root, taxonomy, value);
@@ -175,7 +174,7 @@ public class XBRLBuilder {
 
     public void addContexts() {
         final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-        for (final Entry<ContextData, String> entry : this.contextMap.entrySet()) {
+        for (final Map.Entry<ContextData, String> entry : this.contextMap.entrySet())
{
             final ContextData context = entry.getKey();
             final Element contextElement = this.root.addElement("context");
             contextElement.addAttribute("id", entry.getValue());
diff --git a/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLResultServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLResultServiceImpl.java
index c77bb4c..b756454 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLResultServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLResultServiceImpl.java
@@ -23,7 +23,7 @@ import java.math.BigDecimal;
 import java.sql.Date;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Map.Entry;
+import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import javax.script.ScriptEngine;
@@ -87,7 +87,7 @@ public class XBRLResultServiceImpl implements XBRLResultService {
             // <taxonomyId, value>
             final HashMap<MixTaxonomyData, BigDecimal> resultMap = new HashMap<>();
             setupBalanceMap(getAccountSql(startDate, endDate));
-            for (final Entry<String, String> entry : configMap.entrySet()) {
+            for (final Map.Entry<String, String> entry : configMap.entrySet()) {
                 final BigDecimal value = processMappingString(entry.getValue());
                 if (value != null) {
                     final MixTaxonomyData taxonomy = this.readTaxonomyService.retrieveOne(Long.parseLong(entry.getKey()));
diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java
b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java
index b807827..e7733e6 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java
@@ -37,7 +37,6 @@ import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Map.Entry;
 import org.apache.fineract.template.domain.Template;
 import org.apache.fineract.template.domain.TemplateFunctions;
 import org.codehaus.jackson.map.ObjectMapper;
@@ -179,7 +178,7 @@ public class TemplateMergeService {
             Map<String, Object> valueAsMap = (Map<String, Object>) value;
             // Map<String, Object> newValue = null;
             Map<String, Object> valueAsMap_second = new HashMap<>();
-            for (Entry<String, Object> valueAsMapEntry : valueAsMap.entrySet()) {
+            for (Map.Entry<String, Object> valueAsMapEntry : valueAsMap.entrySet())
{
                 Object valueAsMapEntryValue = valueAsMapEntry.getValue();
                 if (valueAsMapEntryValue instanceof Map) { // JSON Object
                     expandMapArrays(valueAsMapEntryValue);
diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesChecker.java
b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesChecker.java
index b631a0a..88f86f2 100644
--- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesChecker.java
+++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesChecker.java
@@ -24,7 +24,6 @@ import io.github.classgraph.ScanResult;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.stream.Collectors;
 
 /**
@@ -48,7 +47,7 @@ public class ClasspathHellDuplicatesChecker {
 
     public String toString(Map<String, List<String>> map) {
         StringBuilder sb = new StringBuilder();
-        for (Entry<String, List<String>> entry : map.entrySet()) {
+        for (Map.Entry<String, List<String>> entry : map.entrySet()) {
             sb.append(entry.getKey());
             sb.append('\n');
             for (String location : entry.getValue()) {
@@ -66,7 +65,7 @@ public class ClasspathHellDuplicatesChecker {
         // We intentionally do not use .classFilesOnly(), or
         // .nonClassFilesOnly(), to check both
         try (ScanResult scanResult = new ClassGraph().scan()) {
-            for (Entry<String, ResourceList> dupe : scanResult.getAllResources().findDuplicatePaths())
{
+            for (Map.Entry<String, ResourceList> dupe : scanResult.getAllResources().findDuplicatePaths())
{
                 String resourceName = dupe.getKey();
                 if (!isHarmlessDuplicate(resourceName)) {
                     boolean addIt = true;


Mime
View raw message