Hi Mario, can you do the same in 1.2?
regards, Martin On 9/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Author: imario > Date: Mon Sep 24 01:38:12 2007 > New Revision: 578709 > > URL: http://svn.apache.org/viewvc?rev=578709&view=rev > Log: > avoid NPE if there is no ViewRoot which might happen in the restore > phase > > Modified: > > myfaces/core/trunk/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java > > Modified: > myfaces/core/trunk/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java > URL: > http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java?rev=578709&r1=578708&r2=578709&view=diff > ============================================================================== > --- > myfaces/core/trunk/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java > (original) > +++ > myfaces/core/trunk/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java > Mon Sep 24 01:38:12 2007 > @@ -123,7 +123,7 @@ > writer.write(ex.getClass().getName()); > } > } > - > + > public static void debugHtml(Writer writer, FacesContext faces, > Exception e) throws IOException { > init(); > Date now = new Date(); > @@ -140,8 +140,10 @@ > } else if ("now".equals(ERROR_PARTS[i])) { > writer.write(DateFormat.getDateTimeInstance().format(now)); > } else if ("tree".equals(ERROR_PARTS[i])) { > - writeComponent(writer, faces.getViewRoot(), getErrorId(e)); > - } else if ("vars".equals(ERROR_PARTS[i])) { > + if (faces.getViewRoot() != null) { > + writeComponent(writer, > faces.getViewRoot(), getErrorId(e)); > + } > + } else if ("vars".equals(ERROR_PARTS[i])) { > writeVariables(writer, faces); > } else if ("cause".equals(ERROR_PARTS[i])) { > writeCause(writer, e); > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
