BetterCloud / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://bettercloud.github.io/vault-java-driver/
335 stars 224 forks source link

parseResponseData crashes and returns empty object (for 5.1.0) #238

Open jsay-api opened 3 years ago

jsay-api commented 3 years ago

hey guys, I'm using vault-java-driver in scala for v2 reads. While working with version 3.1.0 everything was fine, after switching to 5.1.0, I started getting () as a response with no errors. While debugging, found out that actually the client gets the response, starts to parse it, but crashes here with no exceptions: File: com/bettercloud/vault-java-driver/5.1.0/vault-java-driver-5.1.0.jar!/com/bettercloud/vault/response/LogicalResponse.class

private void parseResponseData(logicalOperations operation) {
        try {
            ...
            }
           ...
            this.dataObject = jsonObject.get("data").asObject();
            Iterator var4 = this.dataObject.iterator();

The line of iterator is never reached and the object is returned empty, though this.dataObject = jsonObject.get("data").asObject(); works fine. Please advice