[ https://issues.apache.org/jira/browse/BEAM-1009?focusedWorklogId=297997&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-297997 ]
ASF GitHub Bot logged work on BEAM-1009: ---------------------------------------- Author: ASF GitHub Bot Created on: 20/Aug/19 16:15 Start Date: 20/Aug/19 16:15 Worklog Time Spent: 10m Work Description: kennknowles commented on pull request #9338: [BEAM-1009] Upgrade to Mockito 3 URL: https://github.com/apache/beam/pull/9338#discussion_r315780154 ########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java ########## @@ -479,6 +479,14 @@ private static DoFnSignature parseSignature(Class<? extends DoFn<?, ?>> fnClass) return signature; } + private static Class<?> getDeclaringClass(Method onTimerMethod) { Review comment: Well, I'll turn that around and say that reflection is often OK when it is not fancy and mocking is generally not a good idea :-p. That said, both are worth avoiding if possible. The relevant kind of reflection here is pretty elementary for annotation-driven API. I guess thinking about this case, the trigger of the issue is that we check that a couple classes are exactly the same class? Anathema to inheritance-based style but with the benefits of being simple and correct. Created https://issues.apache.org/jira/browse/BEAM-8013 If it is a different trigger of the problem, can correct the Jira. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 297997) Time Spent: 3h 20m (was: 3h 10m) > Upgrade to Mockito 3 > -------------------- > > Key: BEAM-1009 > URL: https://issues.apache.org/jira/browse/BEAM-1009 > Project: Beam > Issue Type: Test > Components: sdk-java-core > Reporter: Pei He > Priority: Major > Time Spent: 3h 20m > Remaining Estimate: 0h > > Mockito 2 provides useful features, and the mockito-all module is no longer > generated. -- This message was sent by Atlassian Jira (v8.3.2#803003)