kwin commented on code in PR #81:
URL:
https://github.com/apache/sling-org-apache-sling-models-impl/pull/81#discussion_r2758556509
##########
src/main/java/org/apache/sling/models/impl/ModelConfigurationPrinter.java:
##########
@@ -54,6 +54,39 @@ public class ModelConfigurationPrinter {
this.adapterImplementations = adapterImplementations;
}
+ /**
+ * Converts an arbitrary property value to its string representation.
+ * Properly handles arrays, nulls, and various types.
+ *
+ * @param value the property value to convert (can be null, array, or any
object)
+ * @return a string representation of the value, or "null" if value is null
+ */
+ private String propertyToString(Object value) {
+ if (value == null) {
+ return "null";
+ }
+
+ // Handle arrays
+ if (value.getClass().isArray()) {
Review Comment:
Right, simplified in
https://github.com/apache/sling-org-apache-sling-models-impl/pull/81/commits/ef2db9930b98598b0121581fdbd3acbf6c619c27.
--
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]