File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/io/fusionauth/domain/event Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package io .fusionauth .domain .event ;
1717
18+ import java .lang .reflect .Constructor ;
1819import java .util .Arrays ;
1920import java .util .HashMap ;
2021import java .util .List ;
@@ -223,7 +224,9 @@ public String eventName() {
223224
224225 public boolean isInstanceEvent () {
225226 try {
226- return Class .forName (getClass ().getPackage ().getName () + "." + name () + "Event" ).getConstructor ().newInstance () instanceof InstanceEvent ;
227+ Constructor <?> ctor = Class .forName (getClass ().getPackage ().getName () + "." + name () + "Event" ).getDeclaredConstructor ();
228+ ctor .setAccessible (true );
229+ return ctor .newInstance () instanceof InstanceEvent ;
227230 } catch (Exception ignore ) {
228231 }
229232
@@ -232,7 +235,9 @@ public boolean isInstanceEvent() {
232235
233236 public boolean isTransactionalEvent () {
234237 try {
235- return !(Class .forName (getClass ().getPackage ().getName () + "." + name () + "Event" ).getConstructor ().newInstance () instanceof NonTransactionalEvent );
238+ Constructor <?> ctor = Class .forName (getClass ().getPackage ().getName () + "." + name () + "Event" ).getDeclaredConstructor ();
239+ ctor .setAccessible (true );
240+ return !(ctor .newInstance () instanceof NonTransactionalEvent );
236241 } catch (Exception ignore ) {
237242 }
238243
You can’t perform that action at this time.
0 commit comments