myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1341898 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java
Date Wed, 23 May 2012 15:30:37 GMT
Author: lofwyr
Date: Wed May 23 15:30:37 2012
New Revision: 1341898

URL: http://svn.apache.org/viewvc?rev=1341898&view=rev
Log:
TOBAGO-1143: Setting tobago-theme.xml to deprecated

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java?rev=1341898&r1=1341897&r2=1341898&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceLocator.java
Wed May 23 15:30:37 2012
@@ -23,6 +23,7 @@ import org.apache.myfaces.tobago.context
 import org.apache.myfaces.tobago.internal.config.ThemeParser;
 import org.apache.myfaces.tobago.internal.config.TobagoConfigFragment;
 import org.apache.myfaces.tobago.internal.config.TobagoConfigParser;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.util.XmlUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -227,6 +228,10 @@ class ResourceLocator {
   private void addResources(ResourceManagerImpl resources, URL themeUrl, String prefix, int
skipPrefix)
       throws IOException, ServletException {
     String fileName = themeUrl.toString();
+    if (fileName.endsWith(META_INF_TOBAGO_THEME_XML)) {
+      Deprecation.LOG.warn(
+          "The use of 'tobago-theme.xml' is deprecated, please use 'tobago-config.xml' to
define a theme!");
+    }
     int index = fileName.indexOf("!");
     String protocol = themeUrl.getProtocol();
     if (index != -1) {



Mime
View raw message