Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 32481 invoked from network); 10 Dec 2004 06:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Dec 2004 06:25:55 -0000 Received: (qmail 99485 invoked by uid 500); 10 Dec 2004 06:25:53 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 99191 invoked by uid 500); 10 Dec 2004 06:25:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 99177 invoked by uid 500); 10 Dec 2004 06:25:51 -0000 Received: (qmail 99172 invoked by uid 99); 10 Dec 2004 06:25:51 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 09 Dec 2004 22:25:51 -0800 Received: (qmail 32428 invoked by uid 1431); 10 Dec 2004 06:25:50 -0000 Date: 10 Dec 2004 06:25:50 -0000 Message-ID: <20041210062550.32427.qmail@minotaur.apache.org> From: dion@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util PropertiesTag.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dion 2004/12/09 22:25:50 Modified: jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util suite.jelly jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util PropertiesTag.java Added: jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util deletable.properties Log: Jelly-172. properties tag doesn't close files Revision Changes Path 1.7 +27 -0 jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/suite.jelly Index: suite.jelly =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/suite.jelly,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- suite.jelly 26 Oct 2004 16:42:56 -0000 1.6 +++ suite.jelly 10 Dec 2004 06:25:49 -0000 1.7 @@ -33,6 +33,7 @@ --> + @@ -64,6 +65,7 @@ + Should have found the file via the file $${base.dir}/project.xml with base.dir=${base.dir} @@ -90,6 +92,7 @@ + The URI doesNotExist.xml should not exist! @@ -101,6 +104,7 @@ Should have replaced a back slash with a forward one + A\B @@ -115,6 +119,7 @@ + Should have only substituted the 1 for the A, since the old/newChar attributes were used. @@ -144,7 +149,25 @@ Loaded properties value ${props} + + + + + + + + + + + ${f.delete()} + + + The file ${name} should no longer exist + + + + @@ -154,6 +177,7 @@ + ${testCollection.add('Hello')} ${testCollection.add('World')} ${testCollection.add('Jelly')} @@ -166,6 +190,7 @@ + @@ -177,6 +202,7 @@ + @@ -187,5 +213,6 @@ + 1.1 jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/deletable.properties Index: deletable.properties =================================================================== # Copyright 2002-2004 The Apache Software Foundation # # Licensed 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. foo=ABC bar=XYZ 1.7 +11 -2 jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/PropertiesTag.java Index: PropertiesTag.java =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/PropertiesTag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PropertiesTag.java 9 Sep 2004 12:22:43 -0000 1.6 +++ PropertiesTag.java 10 Dec 2004 06:25:50 -0000 1.7 @@ -75,7 +75,16 @@ } catch (IOException e) { throw new JellyTagException("properties tag could not load from file",e); } - + finally { + if (is != null) { + try { + is.close(); + } catch (IOException ioe) { + ; + } + } + } + if (var != null) { context.setVariable(var, props); } --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org