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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to