[ https://issues.apache.org/jira/browse/LANG-1528?focusedWorklogId=445374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-445374 ]
ASF GitHub Bot logged work on LANG-1528: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Jun/20 15:31 Start Date: 13/Jun/20 15:31 Worklog Time Spent: 10m Work Description: garydgregory merged pull request #505: URL: https://github.com/apache/commons-lang/pull/505 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 445374) Time Spent: 40m (was: 0.5h) > replaceEachRepeatedly gives IllegalStateException > ------------------------------------------------- > > Key: LANG-1528 > URL: https://issues.apache.org/jira/browse/LANG-1528 > Project: Commons Lang > Issue Type: Bug > Components: lang.* > Affects Versions: 3.8, 3.9, 3.8.1 > Reporter: jimmy > Priority: Minor > Labels: easyfix > Time Spent: 40m > Remaining Estimate: 0h > > > ChurchilllaanTest1 fails, ChurchilllaanTest2 doesn't, why? > Please allow the ttl to be overridden. > {code:java} > @Test > public void ChurchilllaanTest1() { > String input = "Churchilllaan"; > String[][] replaceMap = new String[][] { > { "llaan", "laan" }, > }; > > String output = StringUtils.replaceEachRepeatedly( > input, > getColumn(0, replaceMap), > getColumn(1, replaceMap)); > Assert.assertEquals("Churchilaan", output); > } > @Test > public void ChurchilllaanTest2() { > String input = "Churchilllaan"; > String[][] replaceMap = new String[][] { > { "llaan", "laan" }, > { "C", "c" }, > }; > > String output = StringUtils.replaceEachRepeatedly( > input, > getColumn(0, replaceMap), > getColumn(1, replaceMap)); > Assert.assertEquals("churchilaan", output); > } > private String[] getColumn(int colIndex, String[][] from) { > return Arrays.stream(from).map(x -> > x[colIndex]).toArray(String[]::new); > } > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)