If you have fields in your singleton, you got to initialize them in the fields themselves and not in the constructor
class MyClass { private List<String> keys = new ArrayList<>(); private MyClass() {} }