In version 2.6.1 there is no problem. But with mariadb-java-client 3.0.3 there is.
Here is a negative test to describe the problem. Mind you that you need a working connection for the test to work and this example code does not close anything to keep things simple.
rs.next() should return false, because getGeneratedKeys() API documentation says
"If this Statement object didnot generate any keys, an empty ResultSetobject is returned."
Instead, with the new version it returns true, and value 0 is returned when no keys are generated.