incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r422911 - /incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
Date Mon, 17 Jul 2006 23:19:06 GMT
Author: awiner
Date: Mon Jul 17 16:19:05 2006
New Revision: 422911

URL: http://svn.apache.org/viewvc?rev=422911&view=rev
Log:
ADFFACES-67: TableRenderingContext not always cleaned up properly

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java?rev=422911&r1=422910&r2=422911&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
Mon Jul 17 16:19:05 2006
@@ -229,10 +229,7 @@
     UIComponent         component,
     FacesBean           bean) throws IOException
   {
-
-    TableRenderingContext tContext = createRenderingContext(context,
-                                                            arc,
-                                                            component);
+    TableRenderingContext tContext = null;
 
     // save current skin resource map, if any, on the local property
     Map oldSkinResourceMap = arc.getSkinResourceKeyMap();
@@ -243,6 +240,13 @@
 
     try
     {
+      // Note: because createRenderingContext() might throw
+      // an exception, it is critical that this be inside the
+      // try/finally block.
+      tContext = createRenderingContext(context,
+                                        arc,
+                                        component);
+
       ResponseWriter rw = context.getResponseWriter();
 
       rw.startElement("div", component);
@@ -350,10 +354,11 @@
     }
     finally
     {
-      tContext.release();
-
       // restore current skin resource map. Most likely there won't be one.
       arc.setSkinResourceKeyMap(oldSkinResourceMap);
+
+      if (tContext != null)
+        tContext.release();
     }
 
   }



Mime
View raw message