Skip to content

Commit

Permalink
WW-5382 Update Dispatcher#getContainer JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Jan 1, 2024
1 parent 2246ea0 commit 13c805c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
import com.opensymphony.xwork2.util.location.LocatableProperties;
import com.opensymphony.xwork2.util.location.Location;
import com.opensymphony.xwork2.util.location.LocationUtils;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.LocaleUtils;
import org.apache.commons.lang3.StringUtils;
Expand All @@ -70,10 +74,6 @@
import org.apache.struts2.util.ObjectFactoryDestroyable;
import org.apache.struts2.util.fs.JBossFileManager;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
Expand Down Expand Up @@ -1063,7 +1063,11 @@ public ConfigurationManager getConfigurationManager() {
}

/**
* Expose the dependency injection container.
* Exposes a thread-cached reference of the dependency injection container. If the container is found to have
* changed since the last time it was cached, this Dispatcher instance is re-injected to ensure no stale
* configuration/dependencies persist.
* <p>
* A non-cached reference can be obtained by calling {@link #getConfigurationManager()}.
*
* @return Our dependency injection container
*/
Expand All @@ -1085,5 +1089,4 @@ public Container getContainer() {
}
}
}

}

0 comments on commit 13c805c

Please sign in to comment.