tbonelee commented on code in PR #5312:
URL: https://github.com/apache/zeppelin/pull/5312#discussion_r3601356727
##########
zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/Resource.java:
##########
@@ -390,17 +390,12 @@ public static ByteBuffer serializeObject(Object o) throws
IOException {
if (o == null || !(o instanceof Serializable)) {
return null;
}
-
+
Review Comment:
Nit: trailing whitespace.
```suggestion
```
##########
zeppelin-interpreter/src/test/java/org/apache/zeppelin/resource/ResourceTest.java:
##########
@@ -90,4 +92,19 @@ void testInvokeMethod_shouldAbleToInvokeMethodWithClass()
throws ClassNotFoundEx
Resource r = new Resource(null, new ResourceId("pool1", "name1"),
"object");
assertEquals(true, r.invokeMethod("startsWith", new Class[]{
java.lang.String.class }, new Object[]{"obj"}));
}
+
+ @Test
+ void testSerializeObject_shouldPropagateIOException() {
+ IOException exception = assertThrows(IOException.class, () ->
Resource.serializeObject(new FailingSerializable()));
+ assertEquals("Serialization failed", exception.getMessage());
+ }
+
Review Comment:
Nit: trailing whitespace.
```suggestion
```
--
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]