Fixes broken build due to spotless and error-prone

This commit is contained in:
thesmallstar
2020-06-20 08:28:08 +02:00
committed by Michael Vorburger ⛑️
parent 2323450e71
commit 2f04f6a3e7
16 changed files with 25 additions and 33 deletions
@@ -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());
}
@@ -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;
@@ -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);
@@ -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());
}
@@ -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());
@@ -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())) {
@@ -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();
@@ -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());
@@ -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()));
@@ -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);