Description
This following snippet works as expected on Struts 6.0.3, but fails on 6.1.x.
import org.junit.Test; import com.opensymphony.xwork2.util.NamedVariablePatternMatcher; public class NamedVariablePatternMatcherTest { @Test public void test() { new NamedVariablePatternMatcher().compilePattern("/{first}/two/{third}"); new NamedVariablePatternMatcher().compilePattern("/first/two/{third}"); new NamedVariablePatternMatcher().compilePattern("/first/{two}/{third}"); new NamedVariablePatternMatcher().compilePattern("/{first}/{two}/third"); // java.lang.IllegalArgumentException: Missing openning '{' in [/ {first}/{two}/third]! new NamedVariablePatternMatcher().compilePattern("/{first}/two"); //java.lang.IllegalArgumentException: Missing openning '{' in [/{first} /two]! } }