File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,27 @@ public function execute(): void
5353 // If targeted method is an abstract or method is undefined, then to find in InnerClass.
5454 // NOTE: Currently, nested InnerClass does not supported.
5555
56+ $ foundClass = false ;
5657 foreach ($ objectref ->getDefinedInnerClasses () as [$ class ]) {
5758 /**
5859 * @var JavaClass $class
5960 */
60- if ($ class ->getClassName () === $ className ) {
61- $ class ->getInvoker ()->getDynamic ()->getMethods ()->call (
62- $ name ,
63- ...$ arguments
64- );
65- break ;
61+ if ($ class ->getClassName () !== $ className ) {
62+ continue ;
6663 }
64+
65+ $ class ->getInvoker ()->getDynamic ()->getMethods ()->call (
66+ $ name ,
67+ ...$ arguments
68+ );
69+
70+ $ foundClass = true ;
71+ break ;
72+ }
73+
74+ // Throw an exception if not found a class.
75+ if (!$ foundClass ) {
76+ throw $ e ;
6777 }
6878 }
6979 }
You can’t perform that action at this time.
0 commit comments