Use multiline to string format.
@@ -4,6 +4,7 @@ import java.lang.reflect.Field;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
public abstract class ConfigItem {
@@ -19,7 +20,8 @@ public abstract class ConfigItem {
@Override
public String toString() {
- return new ReflectionToStringBuilder(this) {
+ return new ReflectionToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) {
+ @Override
protected boolean accept(Field f) {
return super.accept(f) && !f.getName().toLowerCase().contains("password");
}
