FireStack-Lab / LaksaJ

LaksaJ -- Zilliqa Blockchain Java Library
GNU General Public License v3.0
19 stars 9 forks source link

Please remove redundant output message. #15

Closed erickorbit closed 5 years ago

erickorbit commented 5 years ago

HttpProvider.getBalance() writes system output. We are suffering from this log messages. Please remove it.

(I'm using version laksaj-0.4.6)


    public Rep<BalanceResult> getBalance(String address) throws IOException {
        Req req = Req.builder().id("1").jsonrpc("2.0").method("GetBalance").params(new String[]{address}).build();
        Response response = client.newCall(buildRequest(req)).execute();
        String resultString = Objects.requireNonNull(response.body()).string();
// remove it ---->         System.out.println(resultString);
        Type type = new TypeToken<Rep<BalanceResult>>() {
        }.getType();
        Rep<BalanceResult> rep = gson.fromJson(resultString, type);

//        Assert.assertNotNull("result is null, check your account address!", rep.getResult());
        if (null == rep.getResult()) {
            BalanceResult balanceResult = new BalanceResult();
            balanceResult.setBalance("0");
            balanceResult.setNonce("0");
            rep.setResult(balanceResult);
        }
        return rep;
    }
erickorbit commented 5 years ago

Is there any updates?

renlulu commented 5 years ago

Sorry for not replaying in time, but I will do it as soon as possible

erickorbit commented 5 years ago

When I get the fixed version? Let me know roughly schedule if you are busy.

renlulu commented 5 years ago

By tomorrow morning.

renlulu commented 5 years ago

You can use 0.4.7-RELEASE now. Please check

erickorbit commented 5 years ago

I see the commit but I don't see 0.4.7 on maven repository.

renlulu commented 5 years ago

It will take some time can be searched on the maven repository browser. But you can still use maven or gradle to download it. Just try 0.4.7-RELEASE

erickorbit notifications@github.com 于 2019年7月25日周四 下午7:56写道:

I see the commit but I don't see 0.4.7 on maven repository.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FireStack-Lab/LaksaJ/issues/15?email_source=notifications&email_token=AB6FQOZSHGWJT5HUZCZNFJLQBGIFZA5CNFSM4ICCGXD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZIAGI#issuecomment-515014681, or mute the thread https://github.com/notifications/unsubscribe-auth/AB6FQO6INOGAOLZGUW4Z443QBGIFZANCNFSM4ICCGXDQ .

erickorbit commented 5 years ago

OK, I'll wait some time. Thank you.