Correct usage for using loading cache with a ?

I have a cache of String, Boolean.: Cache myCache = CacheBuilder.newBuilder().build(); My usage pattern is: if (myCache.get(“some-key”) == null) { // “some-…

BloomFilter to String and back

I want to conver BloomFilter to String, store it and then get it from String. If I do it using just byte array, without converting to String – everything is ok: BloomFilter filter = …

More succinct code for a defensive copy using Guava’s immutable types?

I want to make a defensive copy of a collection passed into a method using Guava’s immutable types, e.g. an ImmutableList. I must also be able to deal with null input and treat that like an empty …

No repackaged dependencies when building Apache Beam Cassandra JAR

Trying to compile and use the snapshot for Apache Beam Cassandra JAR. Seems like the build does not pack the Guava dependencies within the JAR. This causes compilation to fail when the JAR is used by …

Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)

I develop the selenium code that: import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome….

java 10 gradle project : automatic module not found

I created a java 10 project with intelliJ, using gradle. I copied some stuff into it (some “AppFx” class using the library guava and javaFx, and a personal build.gradle file). I also added a module-…

Incompatible library version selenium / guava

My app has a hard dependency on com.google.guava:guava:23.3 or superior +— com.github.ben-manes.caffeine:guava:2.6.0 | +— com.github.ben-manes.caffeine:caffeine:2.6.0 | — com.google….