You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by GitBox <gi...@apache.org> on 2019/02/16 07:29:23 UTC

[GitHub] kinow commented on issue #66: Avoid Code Duplication: Reuse Sleep from ThreadMonitor

kinow commented on issue #66: Avoid Code Duplication: Reuse Sleep from ThreadMonitor
URL: https://github.com/apache/commons-io/pull/66#issuecomment-464305120
 
 
   Hi @DaGeRe !
   
   Agree that code duplication is bad. But the change could perhaps be changed a little bit to make it easier to accept it in my opinion.
   
   In `ThreadMonitor`, when you make it public, it also means that we are telling users that they are free to use this class in their code as well. Instead of it being hidden in the package level (which doesn't necessarily stops them, but discourages and at least raises the question of whether they should use it).
   
   But I agree with the remaining changes (except by one incorrect indentation that may raise a checkstyle issue).
   
   Would you like to try, perhaps, creating a test class in the same package, but under the test sources? That way you can either wrap or extend the origin `ThreadMonitor` and still remove the duplication in the `sleep` method. Also making it easier for us to maintain the code :-)
   
   Cheers
   Bruno

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org