For example, many methods in frameworks/JDK might throw
java.lang.SecurityException
but this is not indicated in the method signature (since that is a practice normally reserved for checked exceptions).
I want to argue that declaring RuntimeExceptions in method sigs has many benefits (akin to static type checking for example). Am I drunk or otherwise?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…