File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/java/org/axonframework/intellij/ide/plugin/handler Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,14 @@ public boolean isSagaEvent() {
44
44
45
45
public static Handler createEventHandler (PsiMethod method ) {
46
46
PsiType [] methodArguments = getMethodArguments (method );
47
- return new CommandEventHandler (methodArguments [0 ], method );
47
+ return methodArguments . length > 0 ? new CommandEventHandler (methodArguments [0 ], method ) : null ;
48
48
}
49
49
50
50
private static PsiType [] getMethodArguments (PsiMethod method ) {
51
- PsiParameterList list = method .getParameterList ();
52
- PsiType [] argument = new PsiType [list .getParametersCount ()];
53
- for (int i = 0 ; i < list .getParameters ().length ; i ++) {
54
- PsiParameter psiParameter = list .getParameters ()[i ];
55
- argument [i ] = psiParameter .getType ();
51
+ PsiParameter [] listParameters = method .getParameterList ().getParameters ();
52
+ PsiType [] argument = new PsiType [listParameters .length ];
53
+ for (int i = 0 ; i < listParameters .length ; i ++) {
54
+ argument [i ] = listParameters [i ].getType ();
56
55
}
57
56
return argument ;
58
57
}
You can’t perform that action at this time.
0 commit comments