INERACT-821 Added and Enforced EmptyBlock Checkstyle
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
8a1863b3b9
commit
885a501c64
@@ -104,6 +104,10 @@
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="UpperEll"/>
|
||||
<module name="NeedBraces"/>
|
||||
@@ -144,10 +148,6 @@
|
||||
<module name="OuterTypeFilename"/>
|
||||
|
||||
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
|
||||
<module name="LeftCurly" />
|
||||
<module name="RightCurly">
|
||||
|
||||
+6
-6
@@ -30,6 +30,7 @@ import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignEnu
|
||||
import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignTriggerType;
|
||||
import org.apache.fineract.infrastructure.campaigns.sms.data.SmsProviderData;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException;
|
||||
import org.apache.fineract.portfolio.calendar.domain.CalendarWeekDaysType;
|
||||
import org.apache.fineract.portfolio.calendar.service.CalendarEnumerations;
|
||||
import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
@@ -70,19 +71,18 @@ public class SmsCampaignDropdownReadPlatformServiceImpl implements SmsCampaignDr
|
||||
public Collection<SmsProviderData> retrieveSmsProviders() {
|
||||
Collection<SmsProviderData> smsProviderOptions = new ArrayList<>();
|
||||
String hostName = "" ;
|
||||
try {
|
||||
Map<String, Object> hostConfig = this.smsConfigUtils.getMessageGateWayRequestURI("smsbridges", null);
|
||||
URI uri = (URI) hostConfig.get("uri");
|
||||
hostName = uri.getHost() ;
|
||||
HttpEntity<?> entity = (HttpEntity<?>) hostConfig.get("entity");
|
||||
ResponseEntity<Collection<SmsProviderData>> responseOne = restTemplate.exchange(uri, HttpMethod.GET, entity,
|
||||
new ParameterizedTypeReference<Collection<SmsProviderData>>() {});
|
||||
if (!responseOne.getStatusCode().equals(HttpStatus.OK)) {
|
||||
throw new PlatformDataIntegrityException("error.msg.mobile.service.provider.not.available",
|
||||
"Mobile service provider not available.");
|
||||
}
|
||||
smsProviderOptions = responseOne.getBody();
|
||||
if (!responseOne.getStatusCode().equals(HttpStatus.OK)) {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return smsProviderOptions;
|
||||
return smsProviderOptions;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -114,11 +114,6 @@ public class XBRLBuilder {
|
||||
|
||||
if (dims.length == 2) {
|
||||
context = new ContextData(dims[0], dims[1], taxonomy.getType());
|
||||
if (this.contextMap.containsKey(context)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -245,9 +245,10 @@ public class StaffReadPlatformServiceImpl implements StaffReadPlatformService {
|
||||
extraCriteria.append(" and s.is_active = 1 ");
|
||||
} else if (status.equalsIgnoreCase("inActive")) {
|
||||
extraCriteria.append(" and s.is_active = 0 ");
|
||||
} else if (status.equalsIgnoreCase("all")) {
|
||||
} else {
|
||||
} else{
|
||||
if (!status.equalsIgnoreCase("all")) {
|
||||
throw new UnrecognizedQueryParamException("status", status, new Object[]{"all", "active", "inactive"});
|
||||
}
|
||||
}
|
||||
}
|
||||
//adding the Authorization criteria so that a user cannot see an employee who does not belong to his office or a sub office for his office.
|
||||
|
||||
+3
-1
@@ -261,8 +261,10 @@ public class TellerManagementReadPlatformServiceImpl implements TellerManagement
|
||||
extraCriteria.append(" and status = 300 ");
|
||||
} else if (status.equalsIgnoreCase("inActive")) {
|
||||
extraCriteria.append(" and status = 0 ");
|
||||
} else if (status.equalsIgnoreCase("all")) {} else {
|
||||
} else {
|
||||
if (!status.equalsIgnoreCase("all")){
|
||||
throw new UnrecognizedQueryParamException("status", status, new Object[] { "all", "active", "inactive" });
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(extraCriteria.toString())) {
|
||||
|
||||
-2
@@ -197,8 +197,6 @@ public class AccountTransfersWritePlatformServiceImpl implements AccountTransfer
|
||||
this.accountTransferDetailRepository.saveAndFlush(accountTransferDetails);
|
||||
transferDetailId = accountTransferDetails.getId();
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
final CommandProcessingResultBuilder builder = new CommandProcessingResultBuilder().withEntityId(transferDetailId);
|
||||
|
||||
Reference in New Issue
Block a user