vert-x3/vertx-zookeeper

Using map names with forward slashes (`/` character) returns empty childData

doctorpangloss opened this issue · 2 comments

Version

vertx-hazelcast:3.9.1

Context

key = childData.getPath().substring(mapPath.length() + 1).split("/", 2);

Observe that if the user supplies a map key that contains forward slashes, empty data will be returned from Zookeeper due to this split.

Do you have a reproducer?

Simply create a map named Test/map.

One possibility is to throw an IllegalArgumentException that is implementation specific, so that at least people don't get an extremely cryptic crash (it right now fails to deserialize an empty object)