tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r1006320 - in /tomcat/taglibs/standard/trunk/impl/src: main/java/org/apache/taglibs/standard/tag/common/fmt/ test/java/org/apache/taglibs/standard/tag/common/fmt/
Date Sun, 10 Oct 2010 17:13:16 GMT
Author: jboynes
Date: Sun Oct 10 17:13:16 2010
New Revision: 1006320

URL: http://svn.apache.org/viewvc?rev=1006320&view=rev
Log:
add test to confirm bugzilla #49900 and verify fix

Added:
    tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/
    tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupportTest.java
Modified:
    tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java

Modified: tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java?rev=1006320&r1=1006319&r2=1006320&view=diff
==============================================================================
--- tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java
(original)
+++ tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java
Sun Oct 10 17:13:16 2010
@@ -111,7 +111,8 @@ public abstract class BundleSupport exte
 
     // Releases any resources we may have (or inherit)
     public void release() {
-	init();
+        super.release();
+    	init();
     }
 
 

Added: tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupportTest.java
URL: http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupportTest.java?rev=1006320&view=auto
==============================================================================
--- tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupportTest.java
(added)
+++ tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupportTest.java
Sun Oct 10 17:13:16 2010
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.taglibs.standard.tag.common.fmt;
+
+import javax.servlet.jsp.tagext.BodyContent;
+
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ */
+public class BundleSupportTest {
+
+    private BundleSupport tag;
+
+    @Before
+    public void setup() {
+        tag = new BundleSupport() {
+        };
+    }
+
+    // test for bugzilla #49900 that bodyContent is not released
+    @Test
+    public void testBodyContentIsRelease() {
+        BodyContent b = EasyMock.createMock(BodyContent.class);
+        tag.setBodyContent(b);
+        tag.release();
+        Assert.assertNull(tag.getBodyContent());
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message