[
https://issues.apache.org/jira/browse/FINERACT-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Saghy reassigned FINERACT-2267:
------------------------------------
Assignee: Adam Saghy
> Use the proper not-null annotation in Fineract code base
> --------------------------------------------------------
>
> Key: FINERACT-2267
> URL: https://issues.apache.org/jira/browse/FINERACT-2267
> Project: Apache Fineract
> Issue Type: Improvement
> Affects Versions: 1.12.0
> Reporter: Adam Saghy
> Assignee: Adam Saghy
> Priority: Minor
> Fix For: 1.13.0
>
>
> As of today, there are 3 different kind of “not-null” annotations are used in
> Fineract, and unfortunately, not always the correct one:
> * jakarta.validation.constraints.NotNull
> * org.springframework.lang.NonNull
> * org.jetbrains.annotations.NotNull
>
>
>
> ||Feature||jakarta.validation.constraints.NotNull||org.springframework.lang.NonNull||org.jetbrains.annotations.NotNull||
> |*Runtime validation*|✅ Yes|❌ No|❌ No|
> |*Static analysis support*|✅ Limited|✅ Yes (IDE, static tools)|✅ Strong (IDE,
> static tools)|
> |*Framework dependency*|Jakarta EE / Bean Validation (Hibernate)|Spring
> Framework|JetBrains (IDE, language tools)|
> |*Primary Use Case*|DTO/entity validation|Internal Spring code
> clarity|IDE-enhanced static analysis & Kotlin-Java interop|
>
>
> *Recommended changes*
> * *API / Validation* → Use jakarta.validation.constraints.NotNull
> * *Spring internal APIs* → Use org.springframework.lang.NonNull
> * *Remove* org.jetbrains.annotations.NotNull *completely*
> ** *Use one of the above, based on usage!*
> *** *API/Validation - > Jakarta NotNull*
> *** *Spring internal APIs / Services -> Spring NonNull*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)