verhas commented on issue #461: Lang 1491
URL: https://github.com/apache/commons-lang/pull/461#issuecomment-538671412
 
 
   "I'm still more comfortable with JUnit 4." 
   
   If I were you I would not disclose that information in public. JUnit 5 was 
released more than two years ago.
   
   "But from what I understood, JUnit 5 now supports multiple modifiers instead 
of requiring public."
   
   No, it does not. It requires that the tests are at least package-private. 
There is no library, except some security enforcing or style check tools that 
warn or fail you if an protection of a member is looser than it is needed. 
After all, you may want to call your test methods from some code that needs it 
to be public. JUnit 5 does not require it to be public, so the test methods 
should be declared only public if there is some extra use of them other than 
the JUnit 5 framework that needs them to be public.
   
   "Do you have a link to the docs about why it needs to be default now, 
instead of public?"
   
   Common sense when programming in Java. Every class and member should be 
declared with the least permissive modifier. Why don't we just declare 
everything public? In the case of JUnit 5 tests that is package-private.
   
   I also feel some inconsistency not liking this pull request because some 
future pull-requests may still come up using the public modifier in tests and 
the same time saying that if some other pull requests (without this one merged) 
come up without the public modifier they are ok.
   
   
   

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