myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: refactored
Date Tue, 22 Jan 2019 16:54:46 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 910faf6  refactored
910faf6 is described below

commit 910faf6610ecf0a7ebaa8467cfeeaff475ff8a0e
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Tue Jan 22 17:53:53 2019 +0100

    refactored
---
 .../resource/BaseResourceHandlerSupport.java       | 34 ----------------------
 .../myfaces/resource/ResourceHandlerSupport.java   | 16 +---------
 .../org/apache/myfaces/resource/ResourceImpl.java  |  2 +-
 3 files changed, 2 insertions(+), 50 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/resource/BaseResourceHandlerSupport.java
b/impl/src/main/java/org/apache/myfaces/resource/BaseResourceHandlerSupport.java
index 9403ceb..c5458e7 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/BaseResourceHandlerSupport.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/BaseResourceHandlerSupport.java
@@ -117,40 +117,6 @@ public class BaseResourceHandlerSupport extends ResourceHandlerSupport
     }
 
     @Override
-    public boolean isExtensionMapping()
-    {
-        FacesServletMapping mapping = FacesServletMappingUtils.getCurrentRequestFacesServletMapping(
-                FacesContext.getCurrentInstance());
-        if (mapping != null)
-        {
-            if (mapping.isExtensionMapping())
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    @Override
-    public String getMapping()
-    {
-        FacesServletMapping mapping = FacesServletMappingUtils.getCurrentRequestFacesServletMapping(
-                FacesContext.getCurrentInstance());
-        if (mapping != null)
-        {
-            if (mapping.isExtensionMapping())
-            {
-                return mapping.getExtension();
-            }
-            else
-            {
-                return mapping.getPrefix();
-            }
-        }
-        return "";
-    }
-    
-    @Override
     public long getStartupTime()
     {
         return _startupTime;
diff --git a/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerSupport.java b/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerSupport.java
index 8f11cac..89e6f88 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerSupport.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/ResourceHandlerSupport.java
@@ -71,21 +71,7 @@ public abstract class ResourceHandlerSupport
      * @return 
      */
     public abstract ResourceLoader[] getViewResourceLoaders();
-    
-    /**
-     * Check if the mapping used is done using extensions (.xhtml, .jsf)
-     * or if it is not (/faces/*)
-     * @return
-     */
-    public abstract boolean isExtensionMapping();
-    
-    /**
-     * Get the mapping used as prefix(/faces) or sufix(.jsf)
-     * 
-     * @return
-     */
-    public abstract String getMapping();
-    
+
     /**
      * Return the time when the app started. This is useful to set the
      * "Last-Modified" header in some specific cases.
diff --git a/impl/src/main/java/org/apache/myfaces/resource/ResourceImpl.java b/impl/src/main/java/org/apache/myfaces/resource/ResourceImpl.java
index dbf4120..40115ce 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/ResourceImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/ResourceImpl.java
@@ -126,7 +126,7 @@ public class ResourceImpl extends Resource implements ContractResource
                 path = _resourceHandlerSupport.getResourceIdentifier() + '/' + 
                     getResourceName() + mapping.getExtension();
             }
-            else if (mapping.isPrefixMapping())
+            else
             {
                 path = _resourceHandlerSupport.getResourceIdentifier() + '/' + getResourceName();
                 path = (mapping.getPrefix() == null) ? path : mapping.getPrefix() + path;


Mime
View raw message