I just want to know for what java.util.Collections.checkedList()
is actually used.
I have some code that I know is returning me a List<String>
but it's being passed through a chain of messaging calls and returned to me as a java.io.Serializable
. Is that checkedList call good for me to turn my Serializable
into a List<String>
? I know I can cast it to a java.util.List
, but I'd rather not have to check each element and I'm not comfortable with assuming each element is a String
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…