Skip to content

Instantly share code, notes, and snippets.

package example;
import org.apache.commons.beanutils.expression.DefaultResolver;
public class SafeResolver extends DefaultResolver {
@Override
public String next(String expression) {
String property = super.next(expression);
if ("class".equalsIgnoreCase(property)) {
@kawasima
kawasima / SafeResolver.java
Last active October 3, 2020 02:40
Struts1 S2-020対応
/**
* A Resolver that doesn't call getClass().
*
* @author kawasima
*/
public class SafeResolver extends DefaultResolver {
private static final char NESTED = '.';
private static final char MAPPED_START = '(';
private static final char MAPPED_END = ')';
private static final char INDEXED_START = '[';