myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1409469 - /myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
Date Wed, 14 Nov 2012 22:02:38 GMT
Author: lu4242
Date: Wed Nov 14 22:02:38 2012
New Revision: 1409469

URL: http://svn.apache.org/viewvc?rev=1409469&view=rev
Log:
MYFACES-3641 ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(String viewId)
should not throw exception if no associate VDL can be found

Modified:
    myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java

Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java?rev=1409469&r1=1409468&r2=1409469&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
(original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
Wed Nov 14 22:02:38 2012
@@ -90,7 +90,13 @@ public class ViewDeclarationLanguageFact
             }
         }
         
-        throw new FacesException("Cannot find a valid PDL for view id " + viewId);
+        // throw new FacesException("Cannot find a valid PDL for view id " + viewId);
+        // It does not have sense to throw an exception in this point. Instead
+        // just return null, to indicate that no VDL can handle the viewId.
+        // For example, in org.apache.myfaces.shared.application.DefaultViewHandlerSupport
+        // first getViewDeclarationLanguage(String viewId) is called and if returns null
+        // try the default strategy (look for a file in web folder).
+        return null;
     }
     
     /**



Mime
View raw message