diff --git a/examples/src/main/java/io/zenoh/ZBytesExamples.java b/examples/src/main/java/io/zenoh/ZBytesExamples.java index c96e7cb..2021cf2 100644 --- a/examples/src/main/java/io/zenoh/ZBytesExamples.java +++ b/examples/src/main/java/io/zenoh/ZBytesExamples.java @@ -137,22 +137,19 @@ public static void main(String[] args) { // Map example Map input15 = Map.of("one", 1, "two", 2, "three", 3); var zbytes15 = zSerialize(input15, new TypeToken<>() {}); - Map output15 = zDeserialize(zbytes15, new TypeToken<>() { - }); + Map output15 = zDeserialize(zbytes15, new TypeToken<>() {}); assert input15.equals(output15); // Nested List example List> input18 = List.of(List.of(1, 2, 3)); var zbytes18 = zSerialize(input18, new TypeToken<>() {}); - List> output18 = zDeserialize(zbytes18, new TypeToken<>() { - }); + List> output18 = zDeserialize(zbytes18, new TypeToken<>() {}); assert input18.equals(output18); // Combined types example List> input19 = List.of(Map.of("a", 1, "b", 2)); var zbytes19 = zSerialize(input19, new TypeToken<>() {}); - List> output19 = zDeserialize(zbytes19, new TypeToken<>() { - }); + List> output19 = zDeserialize(zbytes19, new TypeToken<>() {}); assert input19.equals(output19); } } diff --git a/zenoh-jni/src/zbytes.rs b/zenoh-jni/src/zbytes.rs index e2ecb87..627bb8b 100644 --- a/zenoh-jni/src/zbytes.rs +++ b/zenoh-jni/src/zbytes.rs @@ -151,7 +151,7 @@ fn decode_token_type(env: &mut JNIEnv, type_obj: JObject) -> ZResult { return Ok(JavaType::List(Box::new(decode_token_type(env, arg1)?))); } - return Err(zerror!("Unsupported type: {}", qualified_name)); + Err(zerror!("Unsupported type: {}", qualified_name)) } } }