if (assertionStatusMethod != null) {
try {
Object[] args = new Object[] {enableAssertions ? Boolean.TRUE : Boolean.FALSE};
assertionStatusMethod.invoke(bundleClassLoader, args);
} catch (IllegalAccessException e) {
throw new NestedRuntimeException("Unable to access the assertion enablement method", e);
} catch (InvocationTargetException e) {
throw new NestedRuntimeException("Unable to invoke the assertion enablement method", e);
}
}
return host;
}