Skip to content
Snippets Groups Projects
Select Git revision
  • 59edf46b3ca16a3aef164678ed7da77d57059892
  • main default protected
  • OZG-7985-Statistik-Datenfreigabe
  • OZG-8073-date-component
  • OZG-7970-AlfaCodeFlow
  • OZG-7856_schadcode_scanner
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • ods-remove-class-inputs
  • release-info
  • release-administration
  • release
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
  • 2.21.0-alfa
  • 1.5.0-info
  • 1.5.0-administration
41 results

DelegatingContextAwareRunnable.java

Blame
  • DelegatingContextAwareRunnable.java 659 B
    package de.itvsh.goofy;
    
    import org.springframework.web.context.request.RequestAttributes;
    import org.springframework.web.context.request.RequestContextHolder;
    
    import lombok.RequiredArgsConstructor;
    
    @RequiredArgsConstructor
    class DelegatingContextAwareRunnable implements Runnable {
    
    	private final Runnable delegate;
    	private final RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
    
    	@Override
    	public void run() {
    		try {
    			if (requestAttributes != null) {
    				RequestContextHolder.setRequestAttributes(requestAttributes);
    			}
    			delegate.run();
    		} finally {
    			RequestContextHolder.resetRequestAttributes();
    		}
    	}
    
    }