Skip to content

Instantly share code, notes, and snippets.

View dmansfield's full-sized avatar

David Mansfield dmansfield

View GitHub Profile
@AlainODea
AlainODea / HelloCovariance.java
Last active November 16, 2022 12:31
Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
public class HelloCovariance {
public static void main(String[] args) {
ConcurrentHashMap<String, String> properties = new ConcurrentHashMap<>();
Set<String> keySet = properties.keySet();
}
}