Code example for PrivilegedActionException

Methods: getException

0
            this.baseDir = (File) retval[0];
            this.canonicalPath = (String) retval[1]; 
        } 
        catch(PrivilegedActionException e)
        { 
            throw (IOException)e.getException();
        } 
    } 
     
    public Object findTemplateSource(final String name)
    throws 
    	IOException 
    { 
        try { 
            return AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws IOException {
                    File source = new File(baseDir, SEP_IS_SLASH ? name : 
                        name.replace('/', File.separatorChar));
                    if(!source.isFile()) {
                        return null; 
Stop searching for code, let great code find you!  Add Codota to your java IDE