[jboss-jira] [JBoss JIRA] (ELY-1078) Elytron MatchRule.toString() method throws StringIndexOutOfBoundsException

Ondrej Lukas (JIRA) issues at jboss.org
Wed Apr 12 02:43:00 EDT 2017


     [ https://issues.jboss.org/browse/ELY-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ondrej Lukas updated ELY-1078:
------------------------------
    Affects Version/s: 1.1.0.Beta36


> Elytron MatchRule.toString() method throws StringIndexOutOfBoundsException
> --------------------------------------------------------------------------
>
>                 Key: ELY-1078
>                 URL: https://issues.jboss.org/browse/ELY-1078
>             Project: WildFly Elytron
>          Issue Type: Bug
>    Affects Versions: 1.1.0.Beta36
>            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)


More information about the jboss-jira mailing list