@Nullable
    private static Map<String, String> getDelegateContextMap() {
        assert delegate != null;
        try {
            // Try to use `LogbackMDCAdapter.getPropertyMap()` which does not make a copy.
            @SuppressWarnings("unchecked")
            final Map<String, String> map =
                    delegateGetPropertyMap != null ? (Map<String, String>) delegateGetPropertyMap.invokeExact()
                                                   : delegate.getCopyOfContextMap();
            return map;
        } catch (Throwable t) {
            // We should not reach here because we tested `invokeExact()` works
            // in the class initializer above.
            Exceptions.throwUnsafely(t);
        }
        return null;
    }
Copies all thread-local {@link MDC} properties to the specified {@link RequestContext}.

@param ctx the {@link RequestContext}
core/src/main/java/com/linecorp/armeria/common/logging/RequestScopedMdc.java