Code review comment: You are right in theory but the practice is that we are doing the propagation and we are responsible for cleaning up afterwards (deactivate context). Following that principle, there cannot really be an active req. context on the "new" thread. Hence we have this `NOOP` snapshot here.

Code under review:
public ThreadContextSnapshot currentContext(Map<String, String> map) {
        ArcContainer arc = Arc.container();
        if (arc == null || !arc.isRunning()) {
            
            return null;
        }

        if (!isContextActiveOnThisThread(arc)) {
            
            return NOOP_SNAPSHOT;
        }

        
        InjectableContext.ContextState state = arc.requestContext().getState();
        return () -> {
            
            ArcContainer arcContainer = Arc.container();
            if (arcContainer == null || !arcContainer.isRunning()) {
                throw new IllegalStateException("Arc context propagation was attempted but the container is not running.");
            }
            ThreadContextController controller;
            ManagedContext requestContext = arcContainer.requestContext();
            
            if (isContextActiveOnThisThread(arcContainer)) {
                
                InjectableContext.ContextState stateToRestore = requestContext.getState();
                requestContext.deactivate();
                requestContext.activate(state);
                controller = () -> {
                    
                    requestContext.deactivate();
                    requestContext.activate(stateToRestore);
                };
            } else {
                
                requestContext.activate(state);
                controller = () -> {
                    requestContext.deactivate();
                };
            }
            return controller;
        };
    }

Line commented on: return NOOP_SNAPSHOT;

Revised code:
public ThreadContextSnapshot currentContext(Map<String, String> map) {
        ArcContainer arc = Arc.container();
        if (arc == null || !arc.isRunning()) {
            
            return null;
        }

        
        InjectableContext.ContextState state = isContextActiveOnThisThread(arc) ? arc.requestContext().getState() : null;
        return () -> {
            
            ArcContainer arcContainer = Arc.container();
            if (arcContainer == null || !arcContainer.isRunning()) {
                throw new IllegalStateException("Arc context propagation was attempted but the container is not running.");
            }
            ThreadContextController controller;
            ManagedContext requestContext = arcContainer.requestContext();
            
            if (isContextActiveOnThisThread(arcContainer)) {
                
                InjectableContext.ContextState stateToRestore = requestContext.getState();
                requestContext.deactivate();
                if (state != null) {
                    
                    requestContext.activate(state);
                }
                controller = () -> {
                    
                    if (state != null) {
                        
                        requestContext.deactivate();
                    }
                    requestContext.activate(stateToRestore);
                };
            } else {
                
                if (state != null) {
                    
                    requestContext.activate(state);

                }
                controller = () -> {
                    if (state != null) {
                        
                        requestContext.deactivate();
                    }
                };
            }
            return controller;
        };
    }