Ondrej Lukas created ELY-1078:
---------------------------------
Summary: Elytron MatchRule.toString() method throws
StringIndexOutOfBoundsException
Key: ELY-1078
URL:
https://issues.jboss.org/browse/ELY-1078
Project: WildFly Elytron
Issue Type: Bug
Reporter: Ondrej Lukas
Assignee: Darran Lofthouse
Priority: Critical
In case when implementation of {{asString(StringBuilder b)}} for MatchRule does not change
length of passed parameter (which is 0) then
'java.lang.StringIndexOutOfBoundsException: String index out of range: -1' is
thrown for calling {{MatchRule.toString()}} due to calling
{{StringBuilder.setLength(-1)}}.
e.g. MatchRule {{ALL}} in implementation {{asString(StringBuilder b)}} just returns passed
parameter, which results to mentioned exception.
Thrown exception:
{code}
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:180)
at java.lang.StringBuilder.setLength(StringBuilder.java:76)
at org.wildfly.security.auth.client.MatchRule.toString(MatchRule.java:581)
...
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)