It should be the only place as it’s the case trying to decide whether or not to cache the value passed back from the server.
Just based on the logic alone, ‘0’ is clearly a gap here. The check should be >= 0 otherwise 0 gets converted to -1. I missed it on code review and somehow didn’t hit it in testing.
Edit: it’s also funny how things evolve because idiomatically speaking, I would not normally have code the block this way and would have opted for one return result at the end. The upside being you wouldn’t have hit this issue. The downside being that result=0 would never have been cached and we’d never know. Makes me think.
Not sure how to test it locally. I have the Zay-ES-Net fix in a local repo, I build the .jar-file. Now I dont know how to use this local updated jar in my gradle-project (instead the one from jcenter). Any pointers?
In your IDE right click on your local repo of Zay-ES-Net → tasks → install, this will install it to your maven local (USER_HOME/.m2) now you can use it in your gradle project by adding it in dependencies.
Edit:
Also make sure to add mavenLocal() in repositories
repositories {
//Uncomment this if you install local dependencies.
mavenLocal()
}
Edit2:
You can also install it with gradle install or gradlew install command without using an IDE.
It is, see there is already a build.gradle in it, but it also is a maven and netbeans projects too as it also has build.xml and nbproject.
If you want your IDE detects it as gradle projetc just rename build.xml to no_build.xml and nbproject to no_nbproject and restart your IDE.
I forgot those were still in there. They can be removed, I guess. One sec.
Edit: Ah, I remember why I left them… because the examples haven’t been converted to gradle yet and I was hoping that the whole thing was still buildable in netbeans (even if I haven’t tried it for 4+ years or whatever).
If you have been normally using the real version then switching your project dependencies to the -SNAPSHOT version in the build.gradle files should be enough.