You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "a7med3del1973 (via GitHub)" <gi...@apache.org> on 2025/05/18 15:18:17 UTC
[PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
a7med3del1973 opened a new pull request, #4672:
URL: https://github.com/apache/fineract/pull/4672
## Description
Describe the changes made and why they were made.
Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [ ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
- [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [ ] Create/update unit or integration tests for verifying the changes made.
- [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [ ] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "IOhacker (via GitHub)" <gi...@apache.org>.
IOhacker commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2889101424
Yes, that Link issue is about to remove the use of Jetbrains... but maybe
is semantic I think remove the use of Jetbrains and change to
jakarta.validation.constraints.NotNull
or org.springframework.lang.NonNull. You are sending a change that is
proposing to skip/remove any NotNull validation. @Ádám Sághy
***@***.***>
El dom, 18 may 2025 a las 10:59, Ahmed Adel ***@***.***>)
escribió:
> *a7med3del1973* left a comment (apache/fineract#4672)
> <https://github.com/apache/fineract/pull/4672#issuecomment-2889098290>
>
> is there any reason to use Jetbrains instead of Jakarta ?
> (jakarta.validation.constraints.NotNull)
>
> Sorry, I don't understand your opinion... I followed this
> https://issues.apache.org/jira/browse/FINERACT-2267
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/fineract/pull/4672#issuecomment-2889098290>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALD2ZATEHTMTLWFVF7H4WID27C373AVCNFSM6AAAAAB5L4SFZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBZGA4TQMRZGA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2889104822
@a7med3del1973 Sorry, if my instructions were unclear on the story! Let me update the story as well and reply here as well:
We should change from `org.jetbrains.annotations.NotNull` to `jakarta.validation.constraints.NotNull` or `org.springframework.lang.NonNull` based on whether it is API validation or Spring internal APIs
@IOhacker FYI
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "a7med3del1973 (via GitHub)" <gi...@apache.org>.
a7med3del1973 commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2889098290
> is there any reason to use Jetbrains instead of Jakarta ? (jakarta.validation.constraints.NotNull)
Sorry, I don't understand your opinion... I followed this https://issues.apache.org/jira/browse/FINERACT-2267
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #4672:
URL: https://github.com/apache/fineract/pull/4672
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "IOhacker (via GitHub)" <gi...@apache.org>.
IOhacker commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2889096079
is there any reason to use Jetbrains instead of Jakarta ? (jakarta.validation.constraints.NotNull)
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "a7med3del1973 (via GitHub)" <gi...@apache.org>.
a7med3del1973 commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2889117060
> @a7med3del1973 Sorry, if my instructions were unclear on the story! Let me update the story as well and reply here as well: We should change from `org.jetbrains.annotations.NotNull` to `jakarta.validation.constraints.NotNull` or `org.springframework.lang.NonNull` based on whether it is API validation or Spring internal APIs @IOhacker FYI
No problem, working on it.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2267: Use the proper not-null annotation in Fineract code base [fineract]
Posted by "oleksii-novikov-onix (via GitHub)" <gi...@apache.org>.
oleksii-novikov-onix commented on PR #4672:
URL: https://github.com/apache/fineract/pull/4672#issuecomment-2892072999
@a7med3del1973 As part of this task, you should also check usages of `jakarta.validation.constraints.NotNull`, not only jetbrains annotations. Here isan example of incorrect jakarta usage:
```
SearchUtil {
...
@jakarta.validation.constraints.NotNull
public Map<String, ResultsetColumnHeaderData> mapHeadersToName(@jakarta.validation.constraints.NotNull Collection<ResultsetColumnHeaderData> columnHeaders) {
return columnHeaders.stream().collect(Collectors.toMap(ResultsetColumnHeaderData::getColumnName, e -> e));
}
...
}
```
Should be:
```
SearchUtil {
...
@org.springframework.lang.NonNull
public Map<String, ResultsetColumnHeaderData> mapHeadersToName(@org.springframework.lang.NonNull Collection<ResultsetColumnHeaderData> columnHeaders) {
return columnHeaders.stream().collect(Collectors.toMap(ResultsetColumnHeaderData::getColumnName, e -> e));
}
...
}
```
`jakarta.validation.constraints` makes sense only for runtime validation, such as input data (e.g. requests). Please refer to the table in the task description, Adam gave an excellent explanation there.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org