You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we use apache common-lang3 to generate toString presentations. Starting with commons-lang3 3.11 the output was changed for maps. See https://issues.apache.org/jira/browse/LANG-1543
If we update the apache dependency our test will failed due the to-string-verifier does not expect this new style.
Please fix this.
Example:
public class Example {
private Map<String, Integer> exampleMap;
public Map<String, Integer> getExampleMap() {
return exampleMap;
}
public void setExampleMap(Map<String, Integer> exampleMap) {
this.exampleMap = exampleMap;
}
@Override
public String toString() {
return new ReflectionToStringBuilder(this, ToStringStyle.JSON_STYLE).append("class", this.getClass().getCanonicalName())
.toString();
}
}
@Test
public void testExampleToString() {
ToStringVerifier.forClass(Example.class).verify();
}
the result with to-string-verifier 1.4.8 is:
java.lang.AssertionError:
Failed verification:
com.Example
Expected auto generated toString:
{"class":"com.Example","exampleMap":{"3585d9b7-9589-4a2c-a291-151b6d5551df":-1387581510}}
To contain fields with values:
- exampleMap: {3585d9b7-9589-4a2c-a291-151b6d5551df=-1387581510
The problem seems to be the equals-sign "=". It was replaced with ":" for legal json representation.
With kind regards
Dennis
The text was updated successfully, but these errors were encountered:
Hello,
we use apache common-lang3 to generate toString presentations. Starting with commons-lang3 3.11 the output was changed for maps. See https://issues.apache.org/jira/browse/LANG-1543
If we update the apache dependency our test will failed due the to-string-verifier does not expect this new style.
Please fix this.
Example:
the result with to-string-verifier 1.4.8 is:
java.lang.AssertionError:
Failed verification:
The problem seems to be the equals-sign "=". It was replaced with ":" for legal json representation.
With kind regards
Dennis
The text was updated successfully, but these errors were encountered: