commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henrib <hen...@apache.org>
Subject Re: [jexl] Unified jexl throws exception when processing white space in file
Date Mon, 23 Apr 2012 16:22:50 GMT
Hi Clay;
Thanks for the bug report - cause this is a bug indeed...
Correction will most likely be:

<code>
    protected int startsWith(CharSequence sequence, CharSequence pattern) {
        int length = sequence.length();
        int s = 0;
        while (s < length && Character.isSpaceChar(sequence.charAt(s))) {
            s += 1;
        }
        if (s < length && pattern.length() <= (length - s)) {
            sequence = sequence.subSequence(s, length);
            if (sequence.subSequence(0, pattern.length()).equals(pattern)) {
                return s + pattern.length();
            }
        }
        return -1;
    }
</code>

I'll create the bug for 2.1.x and 3.0 and commit the correction in the
branch and trunk momentarily.
Cheers,
Henrib

--
View this message in context: http://apache-commons.680414.n4.nabble.com/jexl-Unified-jexl-throws-exception-when-processing-white-space-in-file-tp4578778p4580952.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message