I have a few lines of Android Java code which are supposed to create a JReJSON (A Java Client Library for RedisJSON) object and print some data from my DB to Logcat:
GenericObjectPoolConfig config = new GenericObjectPoolConfig();
config.setJmxEnabled(false);
config.setMaxTotal(128);
JedisPool pool = new JedisPool(config,"192.168.0.120", 6381);
JReJSON client = new JReJSON(pool);
client.set("foo", "bar");
Log.d("myTag", (String)client.get("foo"));
LinkedTreeMap RusPro = client.get("RusPro");
String str = RusPro.toString();
Log.d("myTag", str + "xxx");
Log.d("MyTag", (String)client.get("ANV"));
Log.d("myTag", (String)client.get("foo"));
and Log.d("MyTag", (String)client.get("ANV"));
work well: the strings stored in this keys are showed in Logcat. But Log.d("myTag", str + "xxx");
doesn't do anything: there is no message from this line of code in Logcat. So, my program just skips this piece of code not executing it. If I simply write Log.d("myTag", "xxx");
, it will work. But as soon as I add str
in the method, it won't.
So, this is the Logcat:
2020-04-30 21:57:36.545 9740-9928/io.SamsungProject D/myTag: bar //"foo" value
2020-04-30 21:57:36.552 9740-9928/io.SamsungProject D/MyTag: hello! //"ANV" value
What is the problem? Why the program "pass by" the line? There is not any exceptions as well.