Skip to content

Commit

Permalink
Merge pull request #1004 from apache/7.0.x/WW-5411-delete-deprecated-3
Browse files Browse the repository at this point in the history
WW-5411 WW-5386 Delete final deprecated code
  • Loading branch information
kusalk authored Jul 26, 2024
2 parents 5cd03aa + 1ecfbae commit 6265455
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 990 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
*/
package org.apache.struts2.showcase.hangman;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Hangman implements Serializable {

private static final Logger log = LogManager.getLogger(Hangman.class);

@Serial
private static final long serialVersionUID = 8566954355839652509L;

Expand Down Expand Up @@ -64,8 +69,8 @@ public void guess(Character character) {
}
if (vocab.containsAllCharacter(charactersGuessed)) {
win = true;
log.info("Game won");
}
System.out.println(" *********************************** " + win);
}
}

Expand Down
1 change: 0 additions & 1 deletion apps/showcase/src/main/resources/struts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"/>
<constant name="struts.allowlist.classes" value="
org.apache.struts2.showcase.hangman.Hangman,
org.apache.struts2.showcase.hangman.HangmanConstants,
org.apache.struts2.showcase.hangman.Vocab
"/>

Expand Down
14 changes: 0 additions & 14 deletions apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* under the License.
*/
-->
<%@page import="org.apache.struts2.showcase.hangman.HangmanConstants" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
Expand Down Expand Up @@ -636,18 +635,5 @@
</div>
</div>
</div>
<br>
<br>
<p>
A secondary test for this JSP visually verifies expression access to a public constant.
A direct access to the same public constant via scriptlet provides secondary verification.
</p>
<br>
<div>
Test public static (constant) access (expression). Value: <s:property default="unavailable" value="@org.apache.struts2.showcase.hangman.HangmanConstants@HANGMAN_SESSION_KEY" />
</div>
<div>
Test public static (constant) access (scriptlet). Value: <%=org.apache.struts2.showcase.hangman.HangmanConstants.HANGMAN_SESSION_KEY%>
</div>
</body>
</html>
16 changes: 0 additions & 16 deletions core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,6 @@ protected void setEnableExpressionCache(String cache) {
enableExpressionCache = BooleanUtils.toBoolean(cache);
}

/**
* @deprecated since 6.4.0, changing maximum cache size after initialisation is not necessary.
*/
@Deprecated
protected void setExpressionCacheMaxSize(String maxSize) {
expressionCache.setEvictionLimit(Integer.parseInt(maxSize));
}

/**
* @deprecated since 6.4.0, changing maximum cache size after initialisation is not necessary.
*/
@Deprecated
protected void setBeanInfoCacheMaxSize(String maxSize) {
beanInfoCache.setEvictionLimit(Integer.parseInt(maxSize));
}

@Inject(value = StrutsConstants.STRUTS_OGNL_ENABLE_EVAL_EXPRESSION, required = false)
protected void setEnableEvalExpression(String evalExpression) {
this.enableEvalExpression = BooleanUtils.toBoolean(evalExpression);
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions core/src/main/resources/struts-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<interceptor name="debugging" class="org.apache.struts2.interceptor.debugging.DebuggingInterceptor"/>
<interceptor name="execAndWait" class="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"/>
<interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
<interceptor name="fileUpload" class="org.apache.struts2.interceptor.FileUploadInterceptor"/>
<interceptor name="actionFileUpload" class="org.apache.struts2.interceptor.ActionFileUploadInterceptor"/>
<interceptor name="i18n" class="org.apache.struts2.interceptor.I18nInterceptor"/>
<interceptor name="logger" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
Expand Down Expand Up @@ -114,12 +113,6 @@
<interceptor-ref name="workflow"/>
</interceptor-stack>

<!-- Sample file upload stack -->
<interceptor-stack name="fileUploadStack">
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="basicStack"/>
</interceptor-stack>

<!-- Action based file upload stack -->
<interceptor-stack name="actionFileUploadStack">
<interceptor-ref name="actionFileUpload"/>
Expand Down Expand Up @@ -169,7 +162,6 @@
<interceptor-ref name="prepare"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="actionFileUpload"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="actionMappingParams"/>
Expand Down Expand Up @@ -208,7 +200,6 @@
<interceptor-ref name="chain"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="actionFileUpload"/>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="datetime"/>
Expand Down
Loading

0 comments on commit 6265455

Please sign in to comment.