(DataType<?> t)
| 763 | } |
| 764 | |
| 765 | private static final boolean hasFormattedTypes(DataType<?> t) { |
| 766 | if (t.isArray()) { |
| 767 | DataType<?> ct = t.getArrayComponentDataType(); |
| 768 | |
| 769 | // [#19067] This currently applies to arrays of UDTs only. Let's not complicate things for ordinary arrays. |
| 770 | if (ConvertedDataType.delegate(ct) instanceof UDTDataType<?> ut) |
| 771 | return hasFormattedTypes(ut); |
| 772 | else |
| 773 | return ct.getBinding().formatter() != null; |
| 774 | } |
| 775 | else if (ConvertedDataType.delegate(t) instanceof UDTDataType<?> ut) { |
| 776 | for (Field<?> f : ut.getRow().fields()) |
| 777 | if (hasFormattedTypes(f.getDataType())) |
| 778 | return true; |
| 779 | } |
| 780 | |
| 781 | return false; |
| 782 | } |
| 783 | |
| 784 | private static final Function<? super UDTDataType<?>, ? extends Field<?>> toJSONArrayOfUDTs(Context<?> ctx, Field<?> field) { |
| 785 | return ut -> { |
no test coverage detected