You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2025/04/22 13:57:00 UTC

[jira] [Created] (FINERACT-2267) Use the proper not-null annotation in Fineract code base

Adam Saghy created FINERACT-2267:
------------------------------------

             Summary: 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
            Reporter: Adam Saghy


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!*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)