@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2019 the original author or authors .
* Copyright 2002 - 2022 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -43,12 +43,12 @@ import static org.assertj.core.api.Assertions.assertThat;
@@ -43,12 +43,12 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Nicholas Williams
* /
@SuppressWarnings ( "serial" )
public class MessageTagTests extends AbstractTagTests {
class MessageTagTests extends AbstractTagTests {
@Test
public void messageTagWithMessageSourceResolvable ( ) throws JspException {
void messageTagWithMessageSourceResolvable ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -63,9 +63,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -63,9 +63,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCode ( ) throws JspException {
void messageTagWithCode ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -80,9 +80,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -80,9 +80,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndArgument ( ) throws JspException {
void messageTagWithCodeAndArgument ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -98,9 +98,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -98,9 +98,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndArguments ( ) throws JspException {
void messageTagWithCodeAndArguments ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -116,9 +116,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -116,9 +116,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndStringArgumentWithCustomSeparator ( ) throws JspException {
void messageTagWithCodeAndStringArgumentWithCustomSeparator ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -135,9 +135,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -135,9 +135,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndArrayArgument ( ) throws JspException {
void messageTagWithCodeAndArrayArgument ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -153,9 +153,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -153,9 +153,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndObjectArgument ( ) throws JspException {
void messageTagWithCodeAndObjectArgument ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -171,9 +171,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -171,9 +171,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndArgumentAndNestedArgument ( ) throws JspException {
void messageTagWithCodeAndArgumentAndNestedArgument ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -190,9 +190,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -190,9 +190,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndNestedArgument ( ) throws JspException {
void messageTagWithCodeAndNestedArgument ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -208,9 +208,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -208,9 +208,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndNestedArguments ( ) throws JspException {
void messageTagWithCodeAndNestedArguments ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -227,9 +227,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -227,9 +227,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithCodeAndText ( ) throws JspException {
void messageTagWithCodeAndText ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -245,9 +245,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -245,9 +245,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithText ( ) throws JspException {
void messageTagWithText ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -263,11 +263,11 @@ public class MessageTagTests extends AbstractTagTests {
@@ -263,11 +263,11 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithTextEncodingEscaped ( ) throws JspException {
void messageTagWithTextEncodingEscaped ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
pc . getServletContext ( ) . setInitParameter ( WebUtils . RESPONSE_ENCODED_HTML_ESCAPE_CONTEXT_PARAM , "true" ) ;
pc . getResponse ( ) . setCharacterEncoding ( "UTF-8" ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -283,9 +283,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -283,9 +283,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithTextAndJavaScriptEscape ( ) throws JspException {
void messageTagWithTextAndJavaScriptEscape ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -301,9 +301,9 @@ public class MessageTagTests extends AbstractTagTests {
@@ -301,9 +301,9 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageTagWithTextAndHtmlEscapeAndJavaScriptEscape ( ) throws JspException {
void messageTagWithTextAndHtmlEscapeAndJavaScriptEscape ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
final StringBuff er message = new StringBuff er ( ) ;
final StringBuild er message = new StringBuild er ( ) ;
MessageTag tag = new MessageTag ( ) {
@Override
protected void writeMessage ( String msg ) {
@ -320,7 +320,7 @@ public class MessageTagTests extends AbstractTagTests {
@@ -320,7 +320,7 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageWithVarAndScope ( ) throws JspException {
void messageWithVarAndScope ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
MessageTag tag = new MessageTag ( ) ;
tag . setPageContext ( pc ) ;
@ -343,7 +343,7 @@ public class MessageTagTests extends AbstractTagTests {
@@ -343,7 +343,7 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void messageWithVar ( ) throws JspException {
void messageWithVar ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
MessageTag tag = new MessageTag ( ) ;
tag . setPageContext ( pc ) ;
@ -365,7 +365,7 @@ public class MessageTagTests extends AbstractTagTests {
@@ -365,7 +365,7 @@ public class MessageTagTests extends AbstractTagTests {
}
@Test
public void nullMessageSource ( ) throws JspException {
void nullMessageSource ( ) throws JspException {
PageContext pc = createPageContext ( ) ;
ConfigurableWebApplicationContext ctx = ( ConfigurableWebApplicationContext )
RequestContextUtils . findWebApplicationContext ( ( HttpServletRequest ) pc . getRequest ( ) , pc . getServletContext ( ) ) ;
@ -381,7 +381,7 @@ public class MessageTagTests extends AbstractTagTests {
@@ -381,7 +381,7 @@ public class MessageTagTests extends AbstractTagTests {
@Test
@SuppressWarnings ( "rawtypes" )
public void requestContext ( ) throws ServletException {
void requestContext ( ) throws ServletException {
PageContext pc = createPageContext ( ) ;
RequestContext rc = new RequestContext ( ( HttpServletRequest ) pc . getRequest ( ) , pc . getServletContext ( ) ) ;
assertThat ( rc . getMessage ( "test" ) ) . isEqualTo ( "test message" ) ;