Why can I “fake” the stack trace of an exception in Java?

后端 未结 6 831
梦如初夏
梦如初夏 2021-02-19 10:39

If I run the following test, it fails:

public class CrazyExceptions {
    private Exception exception;

    @Before
    public void setUp(){
        exception =          


        
6条回答
  •  渐次进展
    2021-02-19 11:19

    The stack trace in the exception corresponds to the "new" operation, nothing else.

提交回复
热议问题