[ 
https://issues.apache.org/jira/browse/LANG-1528?focusedWorklogId=408473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-408473
 ]

ASF GitHub Bot logged work on LANG-1528:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Mar/20 01:36
            Start Date: 24/Mar/20 01:36
    Worklog Time Spent: 10m 
      Work Description: kinow commented on issue #505: [LANG-1528] 
replaceEachRepeatedly gives IllegalStateException
URL: https://github.com/apache/commons-lang/pull/505#issuecomment-602956284
 
 
   Updated the title to match what's in JIRA. Thanks for updating the PR until 
Travis CI passes :+1: 
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 408473)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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)

Reply via email to