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

Julian Reschke commented on OAK-3471:
-------------------------------------

I would recommend to change ClusterNodeInfo to support this with protected 
methods, and then have the tests a friend class in that package that allows 
calling it from the unit tests.

> Avoid reflection in DocumentDiscoveryLiteServiceTest
> ----------------------------------------------------
>
>                 Key: OAK-3471
>                 URL: https://issues.apache.org/jira/browse/OAK-3471
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.3.7
>            Reporter: Stefan Egli
>             Fix For: 1.3.8
>
>
> [DocumentDiscoveryLiteServiceTest.setFinalStatic|https://github.com/apache/jackrabbit-oak/blob/f173e50b6a9540da4cd135d892c48ea621f30ebe/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java#L605]
>  uses reflection to set a private static field. This was a very hacky way to 
> avoid having to refactor ClusterNodeInfo and move forward with 
> discovery-lite. To avoid unmaintainability, this should be replaced with a 
> better mechanism however.
> /cc [~reschke]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to