You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2023/11/07 21:38:06 UTC

(myfaces) branch 4.1.x updated: Deprecate composite:extension (#639)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/4.1.x by this push:
     new 19d309b37 Deprecate composite:extension (#639)
19d309b37 is described below

commit 19d309b37ce43ebd95ccfd9b3d414071b6a2110a
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Tue Nov 7 16:38:01 2023 -0500

    Deprecate composite:extension (#639)
---
 .../myfaces/view/facelets/tag/composite/ExtensionHandler.java | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ExtensionHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ExtensionHandler.java
index 2cfe3c7f2..12810ddb7 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ExtensionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ExtensionHandler.java
@@ -30,6 +30,9 @@ import jakarta.faces.view.facelets.TagHandler;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
 
 /**
+ * This tag is deprecated since 4.1 with plans to remove it in Faces 5.0 
+ * 
+ * @deprecated Since 4.1 
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
@@ -37,6 +40,9 @@ import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFacelet
 public class ExtensionHandler extends TagHandler
 {
 
+    // Log warning once rather than every time the page is accessed
+    private static boolean WARNING_LOGGED = false;
+
     private static final Logger log = Logger.getLogger(ExtensionHandler.class.getName());
     
     public ExtensionHandler(TagConfig config)
@@ -47,6 +53,11 @@ public class ExtensionHandler extends TagHandler
     @Override
     public void apply(FaceletContext ctx, UIComponent parent) throws IOException
     {
+        if (log.isLoggable(Level.WARNING) && !WARNING_LOGGED)
+        {
+                log.warning("The tag composite:extension is deprecated as of 4.1.");
+                WARNING_LOGGED = true;
+        }
         // TODO: In theory the xml data inside this tag should be saved,
         // but the spec does not say where and how this should be done.
         // For now we just prevent execute any handler inside this tag.