annotaton之@SuppressWarning

@SuppressWarning 意思是指,讓編譯器忽略代碼中的錯誤。其功能:可以用來屏蔽某些已知OK的代碼,

然後排查特定代碼的錯誤;

可以追加參數,因JAVA版本不同而有所差異
例如:

@SuppressWarnings("unused")
@SuppressWarnings("finally")
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked")
@SuppressWarnings("static-access")

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章