lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting URIParametrizerAction.java
Date Tue, 05 Aug 2003 11:58:16 GMT
andreas     2003/08/05 04:58:16

  Modified:    src/java/org/apache/lenya/cms/cocoon/acting
                        URIParametrizerAction.java
  Log:
  releasing source
  
  Revision  Changes    Path
  1.16      +17 -11    cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/URIParametrizerAction.java
  
  Index: URIParametrizerAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/URIParametrizerAction.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- URIParametrizerAction.java	4 Aug 2003 13:48:45 -0000	1.15
  +++ URIParametrizerAction.java	5 Aug 2003 11:58:16 -0000	1.16
  @@ -201,7 +201,6 @@
        */
       protected Map parameterize(String uri, String src, Parameters parameters, SourceResolver
resolver)
           throws ParameterException, ProcessingException, SAXException, IOException {
  -        Source inputSource = null;
           URIParametrizerConsumer xmlConsumer = new URIParametrizerConsumer();
           Map uriParameters = new HashMap();
   
  @@ -215,13 +214,20 @@
               
               if (value == null) {
                   String parameterSrc = parameters.getParameter(parameterNames[i]) + "/"
+ src;
  -                inputSource = resolver.resolveURI(parameterSrc);
  +                
  +                Source inputSource = null;
  +                try {
  +                    inputSource = resolver.resolveURI(parameterSrc);
   
  -                if (this.getLogger().isDebugEnabled()) {
  -                    this.getLogger().debug("File resolved to " + inputSource.getURI());
  -                }
  +                    if (this.getLogger().isDebugEnabled()) {
  +                        this.getLogger().debug("File resolved to " + inputSource.getURI());
  +                    }
   
  -                SourceUtil.toSAX(inputSource, xmlConsumer);
  +                    SourceUtil.toSAX(inputSource, xmlConsumer);
  +                }
  +                finally {
  +                    resolver.release(inputSource);
  +                }
                   value = xmlConsumer.getParameter();
                   cache.put(key, value);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message