[seam-commits] Seam SVN: r8725 - in trunk/src/main/org/jboss/seam: navigation and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Aug 18 10:18:31 EDT 2008


Author: norman.richards at jboss.com
Date: 2008-08-18 10:18:30 -0400 (Mon, 18 Aug 2008)
New Revision: 8725

Modified:
   trunk/src/main/org/jboss/seam/mock/MockServletContext.java
   trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-3277

Modified: trunk/src/main/org/jboss/seam/mock/MockServletContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockServletContext.java	2008-08-18 12:57:59 UTC (rev 8724)
+++ trunk/src/main/org/jboss/seam/mock/MockServletContext.java	2008-08-18 14:18:30 UTC (rev 8725)
@@ -253,7 +253,8 @@
 
    public String getRealPath(String relativePath)
    {
-      return relativePath;
+       // spec says to return null if we can't figure it out
+       return null;
    }
 
    public String getServerInfo()

Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-08-18 12:57:59 UTC (rev 8724)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-08-18 14:18:30 UTC (rev 8725)
@@ -1662,9 +1662,14 @@
        }
 
        public void scanForPages(ServletContext context) {
-           HashSet<String> paths = new HashSet<String>();
-           paths.add(context.getRealPath("/"));
-           handle(paths);
+           if (context!=null)  {
+               String path = context.getRealPath("/");
+               if (path != null) {
+                   HashSet<String> paths = new HashSet<String>();
+                   paths.add(context.getRealPath("/"));
+                   handle(paths);
+               }
+           }
        }
    }
    




More information about the seam-commits mailing list