F0otman commented on code in PR #276:
URL: https://github.com/apache/commons-beanutils/pull/276#discussion_r1734961310
##########
src/main/java/org/apache/commons/beanutils2/BeanUtilsBean.java:
##########
@@ -1067,4 +1023,59 @@ public void setProperty(final Object bean, String name,
final Object value)
(e, "Cannot set " + propName);
}
}
+
+ /**
+ * <p>Build the stringBuilder by using set/copy bean property for log, only
+ * run when log level is <b>trace</b>. Sequentially fill stringBuilder by
+ * {@code bean.toString}, property name and property value.</p>
+ *
+ * <p><strong>When the bean's toString method is override, hide the detail
+ * of value.</strong></p>
+ *
+ * @param bean Bean on which setting is to be performed
+ * @param name Property name (can be nested/indexed/mapped/combo)
+ * @param value Value to be set
+ * @param sb the start of stringBuilder
+ * @return the value should log as trace
+ */
+ protected static StringBuilder traceLogRecord(Object bean, String name,
Object value, StringBuilder sb) {
Review Comment:
Your suggestion may right, the futher code I wrote tried to keep as same as
original possibly.
Your's are more sence
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]