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: unused code
Date Thu, 24 Jan 2019 20:24:52 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 b516ccb  unused code
b516ccb is described below

commit b516ccb6a4ccc7a2a862943c2c1789622d931c7e
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Thu Jan 24 21:25:21 2019 +0100

    unused code
---
 .../org/apache/myfaces/config/FacesConfigurator.java | 20 +++++---------------
 .../myfaces/config/element/ContractMapping.java      | 16 +---------------
 .../impl/digester/elements/ContractMappingImpl.java  | 12 ------------
 3 files changed, 6 insertions(+), 42 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java b/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
index 31938e6..d7c1d81 100755
--- a/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
+++ b/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
@@ -828,23 +828,13 @@ public class FacesConfigurator
         
         for (ContractMapping mapping : dispenser.getResourceLibraryContractMappings())
         {
-            if (mapping.getUrlPattern() != null)
+            List<String> urlMappingsList = mapping.getUrlPatternList();
+            for (String urlPattern: urlMappingsList)
             {
-                // Deprecated way
-                String urlPattern = mapping.getUrlPattern();
-                String[] contracts = StringUtils.trim(StringUtils.splitShortString(mapping.getContracts(),
' '));
-                runtimeConfig.addContractMapping(urlPattern, contracts);
-            }
-            else
-            {
-                List<String> urlMappingsList = mapping.getUrlPatternList();
-                for (String urlPattern: urlMappingsList)
+                for (String contract : mapping.getContractList())
                 {
-                    for (String contract : mapping.getContractList())
-                    {
-                        String[] contracts = StringUtils.trim(StringUtils.splitShortString(contract,
' '));
-                        runtimeConfig.addContractMapping(urlPattern, contracts);
-                    }
+                    String[] contracts = StringUtils.trim(StringUtils.splitShortString(contract,
' '));
+                    runtimeConfig.addContractMapping(urlPattern, contracts);
                 }
             }
         }
diff --git a/impl/src/main/java/org/apache/myfaces/config/element/ContractMapping.java b/impl/src/main/java/org/apache/myfaces/config/element/ContractMapping.java
index 8d157fe..5992d11 100644
--- a/impl/src/main/java/org/apache/myfaces/config/element/ContractMapping.java
+++ b/impl/src/main/java/org/apache/myfaces/config/element/ContractMapping.java
@@ -26,21 +26,7 @@ import java.util.List;
  * @author Leonardo Uribe
  */
 public abstract class ContractMapping implements Serializable
-{
-    /**
-     * @deprecated 
-     * @return 
-     */
-    @Deprecated
-    public abstract String getUrlPattern();
-    
-    /**
-     * @deprecated 
-     * @return 
-     */
-    @Deprecated
-    public abstract String getContracts();
-    
+{    
     public abstract List<String> getUrlPatternList();
     
     public abstract List<String> getContractList();
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ContractMappingImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ContractMappingImpl.java
index 186d502..a327bb0 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ContractMappingImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ContractMappingImpl.java
@@ -88,16 +88,4 @@ public class ContractMappingImpl extends ContractMapping
         }
         urlPatternList.add(urlPattern);
     }
-
-    @Override
-    public String getUrlPattern()
-    {
-        return null;
-    }
-
-    @Override
-    public String getContracts()
-    {
-        return null;
-    }
 }


Mime
View raw message