Re: [text] String substitution doesn't work with empty prefix and suffix

2020-09-30 Thread Gary Gregory
On Wed, Sep 30, 2020 at 8:20 PM Bruno P. Kinoshita wrote: > >Note: The Javadoc says the var markers must not be null. So we could > document null and empty as the same. > > +1 > > I think it doesn't make much sense, and I think it also doesn't work. > Maybe we should allow only for non-empty

Re: [text] String substitution doesn't work with empty prefix and suffix

2020-09-30 Thread Bruno P. Kinoshita
>Note: The Javadoc says the var markers must not be null. So we could document >null and empty as the same. +1 I think it doesn't make much sense, and I think it also doesn't work. Maybe we should allow only for non-empty prefix/sufix? Bruno On Thursday, 1 October 2020, 11:57:46 am

Re: [text] String substitution doesn't work with empty prefix and suffix

2020-09-30 Thread Gary Gregory
Note: The Javadoc says the var markers must not be null. So we could document null and empty as the same. The first question I have is how does this even make sense, both the start and end markers are empty strings... so... that matches each character in input since "a" starts with "" and ends

Re: [text] String substitution doesn't work with empty prefix and suffix

2020-09-30 Thread Bruno P. Kinoshita
Hi, I reproduced the same behaviour on master branch of [text]. And indeed, found nothing in the javadoc that says what is the expected behaviour. I think the class javadoc, as well as the setter javadoc would be good places to have such a documentation. Let's see what others think about it,

String substitution doesn't work with empty prefix and suffix

2020-09-30 Thread Thomas Auinger
Hi, I can run the following test without exception but it doesn't yield the expected result. Also I can find no information that prefix and or suffix must not be empty. @Test public void testNoPrefixAndSuffix() { final Map map = new HashMap<>(); map.put("name", "commons");