diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java index fe148d91782..20dfcf75cc4 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/SerializableUtils.java @@ -63,7 +63,7 @@ public static byte[] serializeToByteArray(Serializable value) { try { throw new IllegalArgumentException("unable to serialize " + ow.writeValueAsString(value), exn); } catch (JsonProcessingException ex) { - IllegalArgumentException("unable to jsonify " + value, exn); + throw new IllegalArgumentException("unable to jsonify " + value, exn); } } }