You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ar...@apache.org on 2022/11/02 09:43:12 UTC
[fineract] branch develop updated: Fix no enum constant http methods
This is an automated email from the ASF dual-hosted git repository.
arnold 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 ee3019603 Fix no enum constant http methods
ee3019603 is described below
commit ee3019603c45a74e36ca77b100e34fdb85f45d2e
Author: Jose Alberto Hernandez <al...@MacBook-Pro.local>
AuthorDate: Sat Oct 29 12:23:26 2022 -0500
Fix no enum constant http methods
---
.../fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java
index 099161fd0..dea636aa0 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java
@@ -19,7 +19,6 @@
package org.apache.fineract.infrastructure.jobs.filter;
import com.google.common.base.Splitter;
-import com.sun.research.ws.wadl.HTTPMethods;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
@@ -40,6 +39,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.GLIMAccountInfoRepositor
import org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.http.HttpStatus;
+import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
@@ -50,7 +50,7 @@ public class LoanCOBApiFilter extends OncePerRequestFilter {
private final GLIMAccountInfoRepository glimAccountInfoRepository;
private final LoanAccountLockService loanAccountLockService;
- private static final List<HTTPMethods> HTTP_METHODS = List.of(HTTPMethods.POST, HTTPMethods.PUT, HTTPMethods.DELETE);
+ private static final List<HttpMethod> HTTP_METHODS = List.of(HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE);
private static final Function<String, Boolean> URL_FUNCTION = s -> s.matches("/loans/\\d+.*") || s.matches("/loans/glimAccount/\\d+.*");
private static final Integer LOAN_ID_INDEX_IN_URL = 2;
private static final Integer GLIM_ID_INDEX_IN_URL = 3;
@@ -121,7 +121,7 @@ public class LoanCOBApiFilter extends OncePerRequestFilter {
if (StringUtils.isBlank(request.getPathInfo())) {
return false;
}
- return HTTP_METHODS.contains(HTTPMethods.fromValue(request.getMethod())) && URL_FUNCTION.apply(request.getPathInfo());
+ return HTTP_METHODS.contains(HttpMethod.valueOf(request.getMethod())) && URL_FUNCTION.apply(request.getPathInfo());
}
private boolean isGlim(Supplier<Stream<String>> streamSupplier) {