Skip to content

Commit 9120da8

Browse files
Test another dimension
1 parent 11fd6da commit 9120da8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pipeline/src/org/labkey/pipeline/api/PipelineJacksonTyping.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ private PipelineJacksonTyping()
9797
"java.lang.String",
9898
"java.lang.Integer",
9999
"java.lang.Double",
100-
"java.lang.Boolean"
100+
"java.lang.Boolean",
101+
"java.lang.Object" // Object[] container id [Ljava.lang.Object;; each element is still validated independently
101102
);
102103

103104
// Explicit denials, checked before the allowlist. None overlap ALLOWED_PREFIXES today, so this is belt-and-suspenders
@@ -230,6 +231,7 @@ public void allowsExpectedJobTypes() throws Exception
230231
// String[]/Integer[] exercise the component-type allow that a direct String/Integer value does not.
231232
map.put("stringArray", new String[]{"a", "b"});
232233
map.put("intArray", new Integer[]{1, 2});
234+
map.put("2dArray", new Object[]{new Object[]{"s", 4L, 5.0d}, "x", Boolean.TRUE});
233235
Holder holder = new Holder();
234236
holder.value = map;
235237

@@ -250,6 +252,7 @@ public void allowsExpectedJobTypes() throws Exception
250252

251253
assertTrue("Expected the String[] to survive", resultMap.get("stringArray") instanceof String[]);
252254
assertTrue("Expected the Integer[] to survive", resultMap.get("intArray") instanceof Integer[]);
255+
assertTrue("Expected the Object[] to survive", resultMap.get("2dArray") instanceof Object[]);
253256
}
254257

255258
@Test

0 commit comments

Comments
 (0)