I have the following code:
private static final Set<String> allowedParameters;
static {
Set<String> tmpSet = new HashSet();
tmpSet.add("aaa");
allowedParameters = Collections.unmodifiableSet(tmpSet);
}
And this causes:
Note: mygame/Game.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
And when I recompile with the proposed option, I see a pointer (^) pointing to the "new" before HashSet();.
Does anyone know what is going on here?
Roman source
share