@Override
    public String[] resolveFrom(final JoinPoint joinPoint, final Object returnValue) {
        if (returnValue == null) {
            return ArrayUtils.EMPTY_STRING_ARRAY;
        }
        if (returnValue instanceof final Event event) {
            val sourceName = event.getSource().getClass().getSimpleName();
            val values = new HashMap<String, String>();
            values.put("event", event.getId());
            values.put("timestamp", DateTimeUtils.localDateTimeOf(event.getTimestamp()).toString());
            values.put("source", sourceName);
            if (event.getAttributes() != null && !event.getAttributes().isEmpty()) {
                val attributes = new HashMap<>(event.getAttributes().asMap());
                attributes.entrySet().removeIf(entry -> entry.getKey().startsWith(CentralAuthenticationService.NAMESPACE));
                attributes.forEach((key, value) -> {
                    if (value != null) {
                        values.put(key, value.toString());
                    }
                });
            }
            if (auditFormat == AuditTrailManager.AuditFormats.JSON) {
                return resourcePostProcessor.apply(new String[]{AuditTrailManager.toJson(values)});
            }
            return resourcePostProcessor.apply(new String[]{values.toString()});
        }
        return resourcePostProcessor.apply(this.delegate.resolveFrom(joinPoint, returnValue));
    }
This is {@link NullableReturnValueAuditResourceResolver}.

@author Misagh Moayyed
@since 1.0
core/cas-server-core-audit-api/src/main/java/org/apereo/inspektr/audit/spi/support/NullableReturnValueAuditResourceResolver.java