8000 “NullPointerException”The number passed in the api is formatStackTrace is a null pointer. · Issue #2784 · zkoss/zk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
“NullPointerException”The number passed in the api is formatStackTrace is a null pointer. #2784
Open
@Cici-Musse-Lee

Description

@Cici-Musse-Lee

The file path is org.zkoss.lang.Exceptions
"java.lang.Throwable.printStackTrace(java.io.PrintWriter)"because "t"is null
source code:

public static final StringBuffer formatstackTrace(StringBuffer sb,Throwable t,String prefix,int maxcnt){
        final stringWriter sw new stringWriter();
        t.printstackTrace(new Printwriter(sw));
        final stringBuffer trace sw.getBuffer();
}

test code:

public void test_formatStackTrace_5_80()throws NoSuchFieldException,IllegalAccessException{
        java.lang.Throwable throwable0 null;
        java.lang.String string1 ="ftp://fhBD.wOJdSb.L.H63.4Hh.UxcBz.oGNV";
        org.zkoss.lang.Exceptions.formatstackTrace(throwable0,string1);
}

test result:

java.lang.NullPointerException:Cannot invoke "java.lang.Throwable.printStackTrace(java.io.PrintWriter)"because "t"is null
at org.zkoss.lang.Exceptions.formatStackTrace(Exceptions.java:418)
at org.zkoss.lang.Exceptions.formatStackTrace(Exceptions.java:400)
at org.zkoss.lang.Exceptions.formatStackTrace(Exceptions.java:390)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0