Add fixture methods that strip leading/trailing whitespace #407
Labels
new feature
A new feature such as a new class, method, package, group of classes, etc.
Milestone
We created the
Fixtures
class because Dropwizard deprecated itsFixtureHelpers
. Until yesterday I had never seen any differences or problems when changing fromFixtureHelpers
toFixtures
. But in several services, some tests started failing. The reason is thatFixtureHelpers
trims leading and trailing whitespace whileFixtures
does not. (FixtureHelpers
does not mention this in its javadoc, but it clearly callsString#trim
in the code.)This issue is adds one or more methods to
Fixtures
that strip leading and/or trailing whitespace. Also, since Java 11 added thestrip
,stripLeading
, andstripTrailing
methods, these are generally preferred over the (much older)trim
method which only handles ASCII whitespace. We could also have methods that use one or the other, but that's probably not necessary right now.Some example method signatures:
The above names are pretty long, so need to think whether there are shorter names that still convey the intent.
The text was updated successfully, but these errors were encountered: