You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/11/18 17:01:04 UTC

svn commit: r881814 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java

Author: lu4242
Date: Wed Nov 18 16:01:04 2009
New Revision: 881814

URL: http://svn.apache.org/viewvc?rev=881814&view=rev
Log:
MYFACES-2404 JspViewDeclarationLanguageStrategy is always the default strategy, so it should always return true on handles() method

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java?rev=881814&r1=881813&r2=881814&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/jsp/JspViewDeclarationLanguageStrategy.java Wed Nov 18 16:01:04 2009
@@ -18,12 +18,6 @@
  */
 package org.apache.myfaces.view.jsp;
 
-import java.util.LinkedList;
-import java.util.StringTokenizer;
-
-import javax.faces.application.ViewHandler;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
 import javax.faces.view.ViewDeclarationLanguage;
 
 import org.apache.myfaces.view.ViewDeclarationLanguageStrategy;
@@ -37,7 +31,7 @@
 public class JspViewDeclarationLanguageStrategy implements ViewDeclarationLanguageStrategy
 {
     private ViewDeclarationLanguage _language;
-    private LinkedList<String> _suffixes;
+    //private LinkedList<String> _suffixes;
     
     public JspViewDeclarationLanguageStrategy()
     {
@@ -45,7 +39,7 @@
         
         _language = new JspViewDeclarationLanguage();
         
-        _suffixes = loadSuffixes (FacesContext.getCurrentInstance().getExternalContext());
+        //_suffixes = loadSuffixes (FacesContext.getCurrentInstance().getExternalContext());
     }
     
     /**
@@ -61,6 +55,8 @@
      */
     public boolean handles(String viewId)
     {
+        return true;
+        /*
         for (String suffix : _suffixes) {
             if (viewId.endsWith (suffix)) {
                 return true;
@@ -68,8 +64,10 @@
         }
         
         return false;
+        */
     }
     
+    /*
     private LinkedList<String> loadSuffixes (ExternalContext context) {
         LinkedList<String> result = new LinkedList<String>();
         String definedSuffixes = context.getInitParameter (ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
@@ -89,4 +87,5 @@
         
         return result;
     }
+    */
 }