vorburger commented on issue #606: remove only use of Apache BVal @NotEmpty 
annotation (in InteropIdentifierRequest/Response)
URL: https://github.com/apache/fineract/pull/606#issuecomment-509102619
 
 
   >  so to me it seems that if you replace @notempty with @NotNull you would 
affect the functionality.
   
   @marta-jankovics yes, I agree, this affects functionality in the sense that 
it no longer checks for empty String in a few of the 
InteropIdentifierRequest/Response fields.
   
   The point here, which I should have made much more clear in the initial 
comment proposing this, is the following: This [Apache 
BVal](https://bval.apache.org) `@NotEmpty` annotation is used ONLY in 
InteropIdentifierRequest/Response, and nowhere else in all of Fineract. (I've 
updated the title to more accurately reflect this.)
   
   This use blocks #607, which blocks #601, which would help to clean up with 
seems to be a classpath mess.
   
   So I'm proposing that we simplify things by removing our dependency on BVal, 
understanding that we loose a (minor?) convenience (?) use of `@NotEmpty` 
annotation. I doubt that was actually ever intended to be available at all - 
it's, likely, more of a side effect of the (wrong) use of `openjpa-all` (which 
is a "shaded" JAR which contains far to much). 
   
   I'm also not entirely sure if this  `@NotEmpty` annotation check even 
actually worked? At least [the OpenJPA documentation makes no mention of Apache 
BVal, or even any annotation based 
validation](http://openjpa.apache.org/builds/2.4.3/apache-openjpa/docs/manual.html).
   
   Long story short, I'm suggesting this (very minor) change despite it 
(possibly, not even sure) causing a minor regression in checking for 
(unlikely?) empty fields in one particular request.
   
   The alternative would be to add a real integration test for `@NotEmpty`, and 
if that currently works, add an explicit dependency to BVal, or some other 
artifact JAR with these validation annotations. To me, both seem unnecessary, 
and avoiding it will likely reduce other dependency issues (in #601 I'd like to 
try to clean up what, to me, currently seems to be a bit of a mess in terms of 
Fineracts depenencies).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to