amaliujia commented on code in PR #1596:
URL: https://github.com/apache/ratis/pull/1596#discussion_r4078921711


##########
ratis-common/src/test/java/org/apache/ratis/util/TestIOUtils.java:
##########
@@ -50,19 +68,91 @@ public void testReadObjectAllowsStackTraceElements() {
   }
 
   @Test
-  public void testReadObjectRejectsDisallowedClass() throws IOException {
+  public void testAllowedList() throws Exception {
+    // BigDecimal is in java.math which is in neither the allow-list nor the 
disallow-list
+    final BigDecimal pi = new BigDecimal("3.14");
+    assertDisallowed(pi, false);
+
+    // Hide it inside a list
+    final List<Object> list = new ArrayList<>();
+    list.add("testing");
+    list.add(pi);
+    assertDisallowed(list, false);

Review Comment:
   ah sure thanks!



-- 
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]

Reply via email to