如何调试已删除文件的打开文件描述符?

时间:2017-03-09 23:45:13

标签: java file file-descriptor

我没有收到太多文件打开错误,但是很多被删除的文件仍然有文件描述符。如何调试此问题?

global PageReference login() {

    //Get refUrl
    String strRefUrl = System.currentPageReference().getParameters().get('refURL'); 

    //Get startUrl
    String strStartUrl = System.currentPageReference().getParameters().get('startURL'); 

   if(strRefUrl != null && strRefUrl != '' && ! strRefUrl.startsWithIgnoreCase(Site.getBaseInsecureUrl() )){     
        //Need to remove domain part because site.login() does not redirect to absolute URL
        strStartUrl  = strRefUrl.replace(Site.getBaseRequestUrl(),'');
    }
    else if (strRefUrl.startsWithIgnoreCase(Site.getBaseInsecureUrl())){ 
        //Redirect to base URL if refUrl is empty
        strStartUrl = Site.getBaseUrl() + '/LoginPage';
    } 

    return Site.login(username, password, strStartUrl );

}

0 个答案:

没有答案