pjfanning commented on code in PR #445:
URL: https://github.com/apache/incubator-pekko/pull/445#discussion_r1242624077


##########
actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunit5Extension.scala:
##########
@@ -23,7 +23,7 @@ final class TestKitJunit5Extension() extends AfterAllCallback 
with BeforeTestExe
    */
   override def beforeTestExecution(context: ExtensionContext): Unit = {
 
-    context.getTestInstance.ifPresent(instance => {
+    context.getTestInstance.ifPresent((instance: AnyRef)  => {
       val fielValue = AnnotationSupport.findAnnotatedFieldValues(instance, 
classOf[Junit5TestKit]).asScala.toList.head

Review Comment:
   could you fix the val name? - should be `fieldValue`
   
   also calling .head on a list is dangerous - could you check that there is 
actually something in the list first?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to