[jboss-jira] [JBoss JIRA] (ELY-1078) Elytron MatchRule.toString() method throws StringIndexOutOfBoundsException
Darran Lofthouse (JIRA)
issues at jboss.org
Fri Jun 2 13:20:01 EDT 2017
[ https://issues.jboss.org/browse/ELY-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darran Lofthouse updated ELY-1078:
----------------------------------
Fix Version/s: 1.1.0.Beta50
(was: 1.1.0.Beta49)
> 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
> Fix For: 1.1.0.Beta50
>
>
> 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