나는 다음과 같은 코드가 있습니다여기에 검사되지 않고 안전하지 않은 작업은 무엇입니까?
private static final Set<String> allowedParameters;
static {
Set<String> tmpSet = new HashSet();
tmpSet.add("aaa");
allowedParameters = Collections.unmodifiableSet(tmpSet);
}
을 그리고 원인 : HashSet();
앞에 "새로운"을 가리키는
Note: mygame/Game.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
을 내가 제안 된 옵션을 사용하여 컴파일 때 포인터 (^)를 참조하십시오 .
여기에서 무슨 일이 벌어지고 있는지 아는 사람이 있습니까?