Github user pnowojski commented on the issue:

    https://github.com/apache/flink/pull/4705
  
    Hmmm, I looked a little bit and it seems like there are tools doing this:
    https://github.com/google/guava/issues/1640
    https://github.com/WorksApplications/findbugs-plugin
    
https://github.com/WorksApplications/findbugs-plugin/commit/d77ca84a9dcc8a99a99a155423c5e7b707a1a5fc
    
    It evens seems to be working based on 
    ```
     * <p>A detector to ensure that implementation (class in src/main/java) 
doesn't call
     * package-private method in other class which is annotated by {@code 
@VisibleForTesting}.
    ```
    
    If above doesn't work/fit us, we could probably easily implement our own 
check for that using 
[findbugs-maven-plugin](https://gleclaire.github.io/findbugs-maven-plugin/usage.html),
 maybe like described 
[here](https://writeoncereadmany.wordpress.com/2016/04/08/how-to-find-bugs-part-3-visiblefortesting/).
    
    Nevertheless I think this feature should be first discussed on a dev 
mailing list. I am not against it (as long as it will not significantly prolong 
builds), but it would be better to discuss this with the community. 


---

Reply via email to