in src/main/java/org/apache/sling/commons/log/logback/internal/util/Util.java [133:145]
public static Object toObject(Object propValue) {
if (propValue == null) {
return null;
} else if (propValue.getClass().isArray()) {
Object[] prop = (Object[]) propValue;
return prop.length > 0 ? prop[0] : null;
} else if (propValue instanceof Collection<?>) {
Collection<?> prop = (Collection<?>) propValue;
return prop.isEmpty() ? null : prop.iterator().next();
} else {
return propValue;
}
}