Ambika-Sony commented on code in PR #5510:
URL: https://github.com/apache/fineract/pull/5510#discussion_r2837886833
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiParameterHelper.java:
##########
@@ -138,4 +147,24 @@ public static boolean genericResultSet(final
MultivaluedMap<String, String> quer
public static boolean genericResultSetPassed(final MultivaluedMap<String,
String> queryParams) {
return queryParams.getFirst(GENERIC_RESULT_SET) != null;
}
+
+ public static Integer extractLimitParameter(MultivaluedMap<String, String>
queryParameters) {
+ Objects.requireNonNull(queryParameters, "queryParameters map cannot be
null");
+ String limit = queryParameters.getFirst("limit");
+ return (StringUtils.isNotBlank(limit)) ? Integer.valueOf(limit.trim())
: null;
+ }
+
+ public static Integer extractOffsetParameter(MultivaluedMap<String,
String> queryParameters) {
+ Objects.requireNonNull(queryParameters, "queryParameters map cannot be
null");
+ String offset = queryParameters.getFirst("offset");
Review Comment:
> @Ambika-Sony try running ./gradlew compileJava for errorProne for more
info.
Hi @Aman-Mittal, I've updated ApiParameterHelper.java to resolve the
ErrorProne warnings.I replaced all split() regex calls with StringUtils.split()
and manual trimming,refined the excludeAssociationsForResponseIfProvided logic
to be more robust and Cleaned up imports and verified the build locally with
./gradlew compileJava.
Please let me know if any further changes are needed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]