CPD Results

The following document contains the results of PMD's CPD 6.55.0.

Duplications

File Line
org/apache/strutsel/taglib/logic/ELMatchTag.java 44
org/apache/strutsel/taglib/logic/ELNotMatchTag.java 44
private String expr;

    /**
     * Returns the evaluated expression.
     */
    public String getExpr() {
        return expr;
    }

    /**
     * Sets the evaluated expression.
     */
    public void setExpr(String expr) {
        this.expr = expr;
    }

    /**
     * Releases state of custom tag so this instance can be reused.
     */
    public void release() {
        super.release();
        setExpr(null);
    }

    /**
     * Evaluates the condition that is being tested by this particular tag,
     * and returns {@code true} if the nested body content of this tag
     * should be evaluated, or {@code false} if it should be skipped.
     *
     * @param desired Desired value for a true result
     * @throws JspException if a JSP exception occurs
     */
    protected boolean condition(boolean desired)
        throws JspException {
        boolean result = false;

        if (getExpr() != null) {
            result =
                ELMatchSupport.condition(desired, getExpr(), value,
                    location, messages, pageContext);
        } else {
            result = super.condition(desired);
        }

        return result;
    }
}