Skip to content

Commit

Permalink
Merge b6b74a4 into ba041e1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Jun 14, 2022
2 parents ba041e1 + b6b74a4 commit e529aee
Show file tree
Hide file tree
Showing 43 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion bundles/admin/pom.xml
Expand Up @@ -29,7 +29,7 @@

<artifactId>struts2-osgi-admin-bundle</artifactId>
<packaging>bundle</packaging>
<name>DEPRECATED: Struts 2 OSGi Admin Bundle - since 2.6</name>
<name>DEPRECATED: Struts 2 OSGi Admin Bundle - since 6.0.0</name>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion bundles/demo/pom.xml
Expand Up @@ -29,7 +29,7 @@

<artifactId>struts2-osgi-demo-bundle</artifactId>
<packaging>bundle</packaging>
<name>DEPRECATED: Struts 2 OSGi Demo Bundle - since 2.6</name>
<name>DEPRECATED: Struts 2 OSGi Demo Bundle - since 6.0.0</name>

<dependencies>

Expand Down
2 changes: 1 addition & 1 deletion bundles/pom.xml
Expand Up @@ -29,7 +29,7 @@

<artifactId>struts2-osgi-bundles</artifactId>
<packaging>pom</packaging>
<name>DEPRECATED: Struts 2 OSGi Bundles - since 2.6</name>
<name>DEPRECATED: Struts 2 OSGi Bundles - since 6.0.0</name>

<modules>
<module>admin</module>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -31,7 +31,7 @@
<name>Struts 2 Core</name>

<properties>
<tlib.version>2.6</tlib.version>
<tlib.version>6.0</tlib.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
Expand Up @@ -24,7 +24,7 @@
* Adds support for invoke async actions. This allows us to support action methods that return {@link Callable}
* as well as invoking them in separate not-container thread then executing the result in another container thread.
*
* @since 2.6
* @since 6.0.0
*/
public interface AsyncManager {
boolean hasAsyncActionResult();
Expand Down
Expand Up @@ -21,7 +21,7 @@
/**
* Used across different places to check if given string is not excluded and is accepted
* @see <a href="https://securitylab.github.com/research/apache-struts-double-evaluation/">here</a>
* @since 2.6
* @since 6.0.0
*/
public interface NotExcludedAcceptedPatternsChecker extends ExcludedPatternsChecker, AcceptedPatternsChecker {

Expand Down
Expand Up @@ -235,7 +235,7 @@ public void setDelegatedClassLoader(final ClassLoader classLoader) {
*
* @param bundleName The bundle to remove from the bundle map
*
* @deprecated A "no-op" since 2.6. Use {@link #clearBundle(java.lang.String, java.util.Locale)} instead.
* @deprecated A "no-op" since 6.0.0. Use {@link #clearBundle(java.lang.String, java.util.Locale)} instead.
*/
public void clearBundle(final String bundleName) {
LOG.debug("No-op. Did NOT clear resource bundle [{}], result: false.", bundleName);
Expand All @@ -248,7 +248,7 @@ public void clearBundle(final String bundleName) {
* @param bundleName The bundle (combined with locale) to remove from the bundle map
* @param locale Provides the locale to combine with the bundle to get the key
*
* @since 2.6
* @since 6.0.0
*/
protected void clearBundle(final String bundleName, Locale locale) {
final String key = createMissesKey(String.valueOf(getCurrentThreadContextClassLoader().hashCode()), bundleName, locale);
Expand All @@ -266,7 +266,7 @@ protected void clearBundle(final String bundleName, Locale locale) {
* {@link AbstractLocalizedTextProvider} has already been used for failed bundle
* lookups of a given key, or some transitory state made a bundle lookup fail.
*
* @since 2.6
* @since 6.0.0
*/
protected void clearMissingBundlesCache() {
missingBundles.clear();
Expand Down Expand Up @@ -313,7 +313,7 @@ protected void reloadBundles(Map<String, Object> context) {
* The <code>clearCache()</code> methods have been available since Java 1.6, so
* it is anticipated the logic will work on any subsequent JVM versions.
*
* @since 2.6
* @since 6.0.0
*/
private void clearResourceBundleClassloaderCaches() {
final ClassLoader ccl = getCurrentThreadContextClassLoader();
Expand Down Expand Up @@ -436,7 +436,7 @@ public void setDevMode(String devMode) {
*
* @param searchDefaultBundlesFirst provide {@link String} "true" or "false" to set the flag state accordingly.
*
* @since 2.6
* @since 6.0.0
*/
@Inject(value = StrutsConstants.STRUTS_I18N_SEARCH_DEFAULTBUNDLES_FIRST, required = false)
public void setSearchDefaultBundlesFirst(String searchDefaultBundlesFirst) {
Expand Down
26 changes: 13 additions & 13 deletions core/src/main/java/org/apache/struts2/StrutsConstants.java
Expand Up @@ -43,7 +43,7 @@ public final class StrutsConstants {
* Note: This control flag may not be meaningful to all provider implementations, and should be false by default.
* </p>
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_I18N_SEARCH_DEFAULTBUNDLES_FIRST = "struts.i18n.search.defaultbundles.first";

Expand Down Expand Up @@ -254,15 +254,15 @@ public final class StrutsConstants {
* Specifies an OGNL expression cache factory implementation. A default implementation is provided, but
* could be replaced by a custom one if desired.
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_EXPRESSION_CACHE_FACTORY = "struts.ognl.expressionCacheFactory";

/**
* Specifies an OGNL BeanInfo cache factory implementation. A default implementation is provided, but
* could be replaced by a custom one if desired.
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_BEANINFO_CACHE_FACTORY = "struts.ognl.beanInfoCacheFactory";

Expand All @@ -275,7 +275,7 @@ public final class StrutsConstants {
* For the optional LRU cache, once the maximum is reached, the least-recently-used (LRU) entry will be
* removed when a new entry needs to be added (cache is fully-utilized).
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_BEANINFO_CACHE_MAXSIZE = "struts.ognl.beanInfoCacheMaxSize";

Expand All @@ -287,32 +287,32 @@ public final class StrutsConstants {
* Note: When enabling LRU cache mode you must also set a maximum size (via {@link #STRUTS_OGNL_BEANINFO_CACHE_MAXSIZE})
* for it to be effective. Otherwise, there is no condition to evict a LRU entry (cache has no limit).
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_BEANINFO_CACHE_LRU_MODE = "struts.ognl.beanInfoCacheLRUMode";

/**
* Logs properties that are not found (very verbose)
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_LOG_MISSING_PROPERTIES = "struts.ognl.logMissingProperties";

/**
* Logs properties that are not found (very verbose)
* @deprecated as of 2.6. Use {@link #STRUTS_OGNL_LOG_MISSING_PROPERTIES} instead.
* @deprecated as of 6.0.0. Use {@link #STRUTS_OGNL_LOG_MISSING_PROPERTIES} instead.
*/
@Deprecated
public static final String STRUTS_LOG_MISSING_PROPERTIES = STRUTS_OGNL_LOG_MISSING_PROPERTIES;

/**
* Enables caching of parsed OGNL expressions
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_ENABLE_EXPRESSION_CACHE = "struts.ognl.enableExpressionCache";

/**
* Enables caching of parsed OGNL expressions
* @deprecated as of 2.6. Use {@link #STRUTS_OGNL_ENABLE_EXPRESSION_CACHE} instead.
* @deprecated as of 6.0.0. Use {@link #STRUTS_OGNL_ENABLE_EXPRESSION_CACHE} instead.
*/
public static final String STRUTS_ENABLE_OGNL_EXPRESSION_CACHE = STRUTS_OGNL_ENABLE_EXPRESSION_CACHE;

Expand All @@ -325,7 +325,7 @@ public final class StrutsConstants {
* For the optional LRU cache, once the maximum is reached, the least-recently-used (LRU) entry will be
* removed when a new entry needs to be added (cache is fully-utilized).
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE = "struts.ognl.expressionCacheMaxSize";

Expand All @@ -337,19 +337,19 @@ public final class StrutsConstants {
* Note: When enabling LRU cache mode you must also set a maximum size (via {@link #STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE})
* for it to be effective. Otherwise, there is no condition to evict a LRU entry (cache has no limit).
*
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_EXPRESSION_CACHE_LRU_MODE = "struts.ognl.expressionCacheLRUMode";

/**
* Enables evaluation of OGNL expressions
* @since 2.6
* @since 6.0.0
*/
public static final String STRUTS_OGNL_ENABLE_EVAL_EXPRESSION = "struts.ognl.enableEvalExpression";

/**
* Enables evaluation of OGNL expressions
* @deprecated as of 2.6. Use {@link #STRUTS_OGNL_ENABLE_EVAL_EXPRESSION} instead.
* @deprecated as of 6.0.0. Use {@link #STRUTS_OGNL_ENABLE_EVAL_EXPRESSION} instead.
*/
public static final String STRUTS_ENABLE_OGNL_EVAL_EXPRESSION = STRUTS_OGNL_ENABLE_EVAL_EXPRESSION;

Expand Down
Expand Up @@ -29,12 +29,12 @@
* Please note that the {@link CookieInterceptor} needs to be
* activated to receive a cookies map.
*
* @since 2.6
* @since 6.0.0
*/
public interface CookiesAware {
/**
* Sets a map of filtered cookies.
* @param cookies the cookies
*/
void withCookies(Map<String, String> cookies);
}
}
Expand Up @@ -28,7 +28,7 @@
* One common use for this is to have the action propagate parameters to internally instantiated data
* objects.
*
* @since 2.6
* @since 6.0.0
*/
public interface ParametersAware {

Expand Down
Expand Up @@ -23,7 +23,7 @@
/**
* For components that have a dependence on the Servlet context.
*
* @since 2.6
* @since 6.0.0
*/
public interface ServletContextAware {

Expand Down
Expand Up @@ -538,7 +538,7 @@ public boolean usesBody() {
* Override to set if body content should be HTML-escaped.
*
* @return always true (default) for this component.
* @since 2.6
* @since 6.0.0
*/
public boolean escapeHtmlBody() {
return escapeHtmlBody;
Expand Down Expand Up @@ -600,7 +600,7 @@ public boolean getPerformClearTagStateForTagPoolingServers() {
*
* @param expression of the component
* @return true|false
* @since 2.6
* @since 6.0.0
*/
protected boolean isAcceptableExpression(String expression) {
NotExcludedAcceptedPatternsChecker.IsAllowed isAllowed = notExcludedAcceptedPatterns.isAllowed(expression);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/apache/struts2/components/Date.java
Expand Up @@ -59,7 +59,7 @@
* </p>
*
* <p>
* <b>Note</b>: Since Struts 2.6 a new Java 8 API has been used to format the Date, it's based on
* <b>Note</b>: Since Struts 6.0.0 a new Java 8 API has been used to format the Date, it's based on
* <a href="https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html">DateTimeFormatter</a>
* which uses a bit different patterns.
* </p>
Expand Down
Expand Up @@ -83,14 +83,14 @@ public StrutsXmlConfigurationProvider(String filename, @Deprecated boolean error
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN", "struts-2.1.7.dtd");
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.3//EN", "struts-2.3.dtd");
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.5//EN", "struts-2.5.dtd");
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.6//EN", "struts-2.6.dtd");
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 6.0//EN", "struts-6.0.dtd");
setDtdMappings(dtdMappings);
File file = new File(filename);
if (file.getParent() != null) {
this.baseDir = file.getParentFile();
}
}

/* (non-Javadoc)
* @see com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#register(com.opensymphony.xwork2.inject.ContainerBuilder, java.util.Properties)
*/
Expand Down Expand Up @@ -175,7 +175,7 @@ public boolean needsReload() {
}

}

public String toString() {
return ("Struts XML configuration provider ("+filename+")");
}
Expand Down
Expand Up @@ -295,7 +295,7 @@ protected void doExecute(String finalLocation, ActionInvocation invocation) thro
*
* @param expression of result
* @return true|false
* @since 2.6
* @since 6.0.0
*/
protected boolean isAcceptableExpression(String expression) {
NotExcludedAcceptedPatternsChecker.IsAllowed isAllowed = notExcludedAcceptedPatterns.isAllowed(expression);
Expand Down
Expand Up @@ -154,7 +154,7 @@ public void setForceAddSchemeHostAndPort(String forceAddSchemeHostAndPort) {
*
* @param escapeHtmlBody
*
* @since 2.6
* @since 6.0.0
*/
public void setEscapeHtmlBody(String escapeHtmlBody) {
this.escapeHtmlBody = escapeHtmlBody;
Expand Down
Expand Up @@ -81,7 +81,7 @@ public void setSrc(String src) {
*
* @param escapeHtmlBody
*
* @since 2.6
* @since 6.0.0
*/
public void setEscapeHtmlBody(boolean escapeHtmlBody) {
this.escapeHtmlBody = escapeHtmlBody;
Expand Down
Expand Up @@ -26,8 +26,8 @@
Use the following DOCTYPE
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.6//EN"
"http://struts.apache.org/dtds/struts-2.6.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
"http://struts.apache.org/dtds/struts-6.0.dtd">
-->

<!ELEMENT struts ((package|include|bean|constant)*,bean-selection?, unknown-handler-stack?)>
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/resources/struts-default.xml
Expand Up @@ -31,8 +31,8 @@
and {@link com.opensymphony.xwork2.inject.Inject}
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.6//EN"
"http://struts.apache.org/dtds/struts-2.6.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
"struts-6.0.dtd">

<struts>

Expand Down
Expand Up @@ -264,7 +264,7 @@ public void testXW404() {
* Unit test to confirm expected behaviour of "clearing methods" provided to
* StrutsLocalizedTextProvider (from AbstractLocalizedTextProvider).
*
* @since 2.6
* @since 6.0.0
*/
public void testLocalizedTextProviderClearingMethods() {
TestStrutsLocalizedTextProvider testStrutsLocalizedTextProvider = new TestStrutsLocalizedTextProvider();
Expand Down Expand Up @@ -331,7 +331,7 @@ public void testLocalizedTextProviderClearingMethods() {
* Unit test to confirm the basic behaviour of bundle reload methods provided to
* StrutsLocalizedTextProvider (from AbstractLocalizedTextProvider).
*
* @since 2.6
* @since 6.0.0
*/
public void testLocalizedTextProviderReloadMethods() {
TestStrutsLocalizedTextProvider testStrutsLocalizedTextProvider = new TestStrutsLocalizedTextProvider();
Expand Down Expand Up @@ -582,7 +582,7 @@ protected void tearDown() throws Exception {
/**
* Basic test class to allow specific testing of StrutsLocalizedTextProvider.
*
* @since 2.6
* @since 6.0.0
*/
class TestStrutsLocalizedTextProvider extends StrutsLocalizedTextProvider {

Expand Down
Expand Up @@ -20,6 +20,6 @@
*/
-->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.6//EN"
"http://struts.apache.org/dtds/struts-2.6.dtd">
<struts />
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
"struts-6.0.dtd">
<struts/>
Expand Up @@ -21,14 +21,14 @@
-->

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.6//EN"
"http://struts.apache.org/dtds/struts-2.6.dtd">
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
"struts-6.0.dtd">

<struts>

<!-- CUSTOM ACTION MAPPER -->
<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="WW3090" class="org.apache.struts2.views.jsp.URLTagTest$RedBlueActionMapper" />
<constant name="struts.mapper.class" value="WW3090" />
<!-- CUSTOM ACTION MAPPER -->
<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="WW3090" class="org.apache.struts2.views.jsp.URLTagTest$RedBlueActionMapper"/>
<constant name="struts.mapper.class" value="WW3090"/>

</struts>

0 comments on commit e529aee

Please sign in to comment.