kaichiachen commented on code in PR #950:
URL: https://github.com/apache/yunikorn-k8shim/pull/950#discussion_r1950420724


##########
pkg/cache/application_state.go:
##########
@@ -470,7 +471,11 @@ func newAppState() *fsm.FSM { //nolint:funlen
                        RejectApplication.String(): func(_ context.Context, 
event *fsm.Event) {
                                app := event.Args[0].(*Application) 
//nolint:errcheck
                                eventArgs := make([]string, 1)
-                               if err := 
events.GetEventArgsAsStrings(eventArgs, event.Args[1].([]interface{})); err != 
nil {
+                               generic, ok := event.Args[1].([]interface{})
+                               if !ok {
+                                       panic(fmt.Sprintf("invalid event args 
type: %T", event.Args[1]))
+                               }

Review Comment:
   I see, sounds better!



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

Reply via email to