bdelacretaz commented on pull request #8:
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-core/pull/8#issuecomment-875373107


   > ...true about the duplication, but I haven't found a good way to avoid it 
at all or where to put it...
   
   If there's no good place for that, I suggest a named constant in each class 
with a comment that mentions the duplication:
   
       // Note that this constant is duplicated in several source files
       public static final int WARN_IF_LONGER_THAN_NSEC = 1000 * 1000;
   
   My failure case is changing it one place and forgetting the others, which 
this avoids.
   
   > ...measuring the timing of some operation is a concern we have in many 
places, and for which we don't have a good overall solution...
   
   Agreed, there's probably a library or pattern for that out there...


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to