Source:
<code>public void invoke(final A event) { Runnable r = () -> { ClassLoader contextClassLoader = null; Transaction transaction = suspendIfNeeded(); if (classLoader.get() != null) { contextClassLoader = SecurityActions.setContextClassLoader(classLoader.get()); } try { if (subject != null) { try { Security.doAs(subject, (PrivilegedExceptionAction<Void>) () -> { if (trace) { <START> log.tracef("Invoking listener: %s passing event %s using subject", target, event); <END> } method.invoke(target, event); return null; }); } catch (PrivilegedActionException e) { Throwable cause = e.getCause(); if (cause instanceof InvocationTargetException) { throw (InvocationTargetException)cause; } else if (cause instanceof IllegalAccessException) { throw (IllegalAccessException)cause; } else { throw new InvocationTargetException(cause); } } } else { if (trace) { log.tracef("Invoking listener: %s passing event %s", target, event); } method.invoke(target, event); } } catch (InvocationTargetException exception) { Throwable cause = getRealException(exception); if (sync) { throw getLog().exceptionInvokingListener( cause.getClass().getName(), method, target, cause); } else { getLog().unableToInvokeListenerMethod(method, target, cause); } } catch (IllegalAccessException exception) { getLog().unableToInvokeListenerMethodAndRemoveListener(method, target, exception); removeListener(target); } finally { if (classLoader.get() != null) { SecurityActions.setContextClassLoader(contextClassLoader); } resumeIfNeeded(transaction); } }; if (sync) syncProcessor.execute(r); else asyncProcessor.execute(r); }</code><technical_language>getLog L395</technical_language>

Target:
public void invoke(final A event) { Runnable r = () -> { ClassLoader contextClassLoader = null; Transaction transaction = suspendIfNeeded(); if (classLoader.get() != null) { contextClassLoader = SecurityActions.setContextClassLoader(classLoader.get()); } try { if (subject != null) { try { Security.doAs(subject, (PrivilegedExceptionAction<Void>) () -> { getLog().tracef("Invoking listener: %s passing event %s using subject", target, event); method.invoke(target, event); return null; }); } catch (PrivilegedActionException e) { Throwable cause = e.getCause(); if (cause instanceof InvocationTargetException) { throw (InvocationTargetException)cause; } else if (cause instanceof IllegalAccessException) { throw (IllegalAccessException)cause; } else { throw new InvocationTargetException(cause); } } } else { getLog().tracef("Invoking listener: %s passing event %s", target, event); method.invoke(target, event); } } catch (InvocationTargetException exception) { Throwable cause = getRealException(exception); if (sync) { throw getLog().exceptionInvokingListener( cause.getClass().getName(), method, target, cause); } else { getLog().unableToInvokeListenerMethod(method, target, cause); } } catch (IllegalAccessException exception) { getLog().unableToInvokeListenerMethodAndRemoveListener(method, target, exception); removeListener(target); } finally { if (classLoader.get() != null) { SecurityActions.setContextClassLoader(contextClassLoader); } resumeIfNeeded(transaction); } }; if (sync) syncProcessor.execute(r); else asyncProcessor.execute(r); }