[ 
https://issues.apache.org/jira/browse/FLINK-6444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178254#comment-16178254
 ] 

Hai Zhou_UTC+8 edited comment on FLINK-6444 at 9/24/17 3:43 PM:
----------------------------------------------------------------

[~StephanEwen]  I implemented a maven module "flink-spotbugs-plugin" that 
contains a *VisibleForTestingDetector* class used to detect whether 
'@VisibleForTesting' methods was used illegally.

commit: 
https://github.com/yew1eb/flink/commit/d8edc6625ad98302cca54d80c5321d7fe3948b82


But,I am troubled. this module needs to be deployed to a remote maven 
repository, and It dep the “flink-annotation” module, the version of 
flink-annotation is not certain. 
Can you give me some suggestions? 
Or have no choice but to use the second plan like 
*CheckForbiddenMethodsUsage.java*.

BTW, via VisibleForTestingDetector detector, I did find that many 
'@VisibleForTesting' methods are called not in the test code.


was (Author: yew1eb):
[~StephanEwen]  I implemented a maven module "flink-spotbugs-plugin" that 
contains a *VisibleForTestingDetector* class used to detect whether 
'@VisibleForTesting' methods was used illegally.
commit: 
https://github.com/yew1eb/flink/commit/d8edc6625ad98302cca54d80c5321d7fe3948b82

But,I am troubled. this module needs to be deployed to a remote maven 
repository, and It dep the “flink-annotation” module, the version of 
flink-annotation is not certain. 
Can you give me some suggestions? 
Or have no choice but to use the second plan like 
*CheckForbiddenMethodsUsage.java*.

BTW, via VisibleForTestingDetector detector, I did find that many 
'@VisibleForTesting' methods are called not in the test code.

> Add a check that '@VisibleForTesting' methods are only used in tests
> --------------------------------------------------------------------
>
>                 Key: FLINK-6444
>                 URL: https://issues.apache.org/jira/browse/FLINK-6444
>             Project: Flink
>          Issue Type: Improvement
>          Components: Build System
>            Reporter: Stephan Ewen
>            Assignee: mingleizhang
>
> Some methods are annotated with {{@VisibleForTesting}}. These methods should 
> only be called from tests.
> This is currently not enforced / checked during the build. We should add such 
> a check.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to