@Nullable
    static <T> T mapCurrent(
            Function<? super RequestContext, T> mapper,
            @Nullable Supplier<@Nullable T> defaultValueSupplier) {

        final RequestContext ctx = currentOrNull();
        if (ctx != null) {
            return mapper.apply(ctx);
        }

        if (defaultValueSupplier != null) {
            return defaultValueSupplier.get();
        }

        return null;
    }
Maps the context of the {@link Request} that is being handled in the current thread.

@param mapper the {@link Function} that maps the {@link RequestContext}
@param defaultValueSupplier the {@link Supplier} that provides the value when the context is unavailable
                            in the current thread. If {@code null}, the {@code null} will be returned
                            when the context is unavailable in the current thread.
core/src/main/java/com/linecorp/armeria/common/RequestContext.java