Re: closeLoudly()

2009-12-05 Thread Simone Tripodi
Hi Jos,
nice to meet you :) Usually suggestions of this kind have to be
submitted by the issue tracker:

http://issues.apache.org/jira/browse/COCOON3

Make your own patch through the command line:

svn diff -x -u Main.java  arg-fix.patch

giving your patch file meaningful name.
Goof job!
Simo

On Sat, Dec 5, 2009 at 8:29 AM, Jos Snellings jos.snelli...@pandora.be wrote:
 URLResponse.java:

 Modifying the finally-clause to remain silent:

 finally {
            if (servletConnection != null)
 URLConnectionUtils.closeQuietly(servletConnection);
        }

 Jos





-- 
http://www.google.com/profiles/simone.tripodi


Re: closeLoudly()

2009-12-05 Thread Jos Snellings
Thank you, Simone. I will do that.

On Sat, 2009-12-05 at 09:21 +0100, Simone Tripodi wrote:
 Hi Jos,
 nice to meet you :) Usually suggestions of this kind have to be
 submitted by the issue tracker:
 
 http://issues.apache.org/jira/browse/COCOON3
 
 Make your own patch through the command line:
 
 svn diff -x -u Main.java  arg-fix.patch
 
 giving your patch file meaningful name.
 Goof job!
 Simo
 
 On Sat, Dec 5, 2009 at 8:29 AM, Jos Snellings jos.snelli...@pandora.be 
 wrote:
  URLResponse.java:
 
  Modifying the finally-clause to remain silent:
 
  finally {
 if (servletConnection != null)
  URLConnectionUtils.closeQuietly(servletConnection);
 }
 
  Jos
 
 
 
 
 




[jira] Created: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null

2009-12-05 Thread Jos Snellings (JIRA)
URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null
---

 Key: COCOON3-46
 URL: https://issues.apache.org/jira/browse/COCOON3-46
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-pipeline
Affects Versions: 3.0.0-alpha-2
Reporter: Jos Snellings
Assignee: Cocoon Developers Team
Priority: Minor
 Fix For: 3.0.0-alpha-3


finally clause in URLResponse method execute()
contains call to URLConnectionUtils.closeQuietly.

If  servletConnection = this.url.openConnection(); fails, servletConnection is 
null.

In that case closeQuietly causes a stacktrace to be output.

Solution is if (servletConnection != null) 
URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a test,
or even better, take into account in closeQuietly that the input parameter may 
be null.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: closeLoudly()

2009-12-05 Thread Jos Snellings
I attached the patch. Is this the proper way to submit?
Thanks, and please excuse me my ignorance. It is the first time.
(first times can be traumatic, so far I am feeling well).

Jos

On Sat, 2009-12-05 at 09:28 +0100, Jos Snellings wrote:
 Thank you, Simone. I will do that.
 
 On Sat, 2009-12-05 at 09:21 +0100, Simone Tripodi wrote:
  Hi Jos,
  nice to meet you :) Usually suggestions of this kind have to be
  submitted by the issue tracker:
  
  http://issues.apache.org/jira/browse/COCOON3
  
  Make your own patch through the command line:
  
  svn diff -x -u Main.java  arg-fix.patch
  
  giving your patch file meaningful name.
  Goof job!
  Simo
  
  On Sat, Dec 5, 2009 at 8:29 AM, Jos Snellings jos.snelli...@pandora.be 
  wrote:
   URLResponse.java:
  
   Modifying the finally-clause to remain silent:
  
   finally {
  if (servletConnection != null)
   URLConnectionUtils.closeQuietly(servletConnection);
  }
  
   Jos
  
  
  
  
  
 
 
 

Index: cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java
===
--- cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java	(revision 884744)
+++ cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/util/URLConnectionUtils.java	(working copy)
@@ -34,6 +34,8 @@
  * @param urlConnection {...@link URLConnection} to be closed.
  */
 public static void closeQuietly(URLConnection urlConnection) {
+	
+	if (urlConnection == null) return;
 if (urlConnection.getDoInput()) {
 InputStream inputStream = null;
 try {


[jira] Commented: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null

2009-12-05 Thread JIRA

[ 
https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12786368#action_12786368
 ] 

Jörg Heinicke commented on COCOON3-46:
--

Isn't it more convenient if closeQuietly(..) just handles null?

 URLConnectionUtils.closeQuietly() complains loudly if servletConnection == 
 null
 ---

 Key: COCOON3-46
 URL: https://issues.apache.org/jira/browse/COCOON3-46
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-pipeline
Affects Versions: 3.0.0-alpha-2
Reporter: Jos Snellings
Assignee: Cocoon Developers Team
Priority: Minor
 Fix For: 3.0.0-alpha-3


 finally clause in URLResponse method execute()
 contains call to URLConnectionUtils.closeQuietly.
 If  servletConnection = this.url.openConnection(); fails, servletConnection 
 is null.
 In that case closeQuietly causes a stacktrace to be output.
 Solution is if (servletConnection != null) 
 URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a 
 test,
 or even better, take into account in closeQuietly that the input parameter 
 may be null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [jira] Commented: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null

2009-12-05 Thread Jos Snellings
That is what I did.

On Sat, 2009-12-05 at 09:50 +, Jörg Heinicke (JIRA) wrote:
 [ 
 https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12786368#action_12786368
  ] 
 
 Jörg Heinicke commented on COCOON3-46:
 --
 
 Isn't it more convenient if closeQuietly(..) just handles null?
 
  URLConnectionUtils.closeQuietly() complains loudly if servletConnection == 
  null
  ---
 
  Key: COCOON3-46
  URL: https://issues.apache.org/jira/browse/COCOON3-46
  Project: Cocoon 3
   Issue Type: Improvement
   Components: cocoon-pipeline
 Affects Versions: 3.0.0-alpha-2
 Reporter: Jos Snellings
 Assignee: Cocoon Developers Team
 Priority: Minor
  Fix For: 3.0.0-alpha-3
 
 
  finally clause in URLResponse method execute()
  contains call to URLConnectionUtils.closeQuietly.
  If  servletConnection = this.url.openConnection(); fails, servletConnection 
  is null.
  In that case closeQuietly causes a stacktrace to be output.
  Solution is if (servletConnection != null) 
  URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a 
  test,
  or even better, take into account in closeQuietly that the input parameter 
  may be null.
 




Re: [jira] Commented: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null

2009-12-05 Thread Joerg Heinicke
Oh, you're right :-) I only read your mail on the mailing list, not the 
complete issue text.


Joerg

On 05.12.2009 11:04, Jos Snellings wrote:

That is what I did.

On Sat, 2009-12-05 at 09:50 +, Jörg Heinicke (JIRA) wrote:
[ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12786368#action_12786368 ] 


Jörg Heinicke commented on COCOON3-46:
--

Isn't it more convenient if closeQuietly(..) just handles null?


URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null
---

Key: COCOON3-46
URL: https://issues.apache.org/jira/browse/COCOON3-46
Project: Cocoon 3
 Issue Type: Improvement
 Components: cocoon-pipeline
   Affects Versions: 3.0.0-alpha-2
   Reporter: Jos Snellings
   Assignee: Cocoon Developers Team
   Priority: Minor
Fix For: 3.0.0-alpha-3


finally clause in URLResponse method execute()
contains call to URLConnectionUtils.closeQuietly.
If  servletConnection = this.url.openConnection(); fails, servletConnection is 
null.
In that case closeQuietly causes a stacktrace to be output.
Solution is if (servletConnection != null) 
URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a test,
or even better, take into account in closeQuietly that the input parameter may 
be null.





Re: closeLoudly()

2009-12-05 Thread Simone Tripodi
Hi Jos,
please don't think so, were are a community and we should help each other :)
In the past I did errors, but Reinhard and Steven kindly helped me as well ;)
Have a nice day,
Simo

On Sat, Dec 5, 2009 at 9:51 AM, Jos Snellings jos.snelli...@pandora.be wrote:
 I attached the patch. Is this the proper way to submit?
 Thanks, and please excuse me my ignorance. It is the first time.
 (first times can be traumatic, so far I am feeling well).

 Jos

 On Sat, 2009-12-05 at 09:28 +0100, Jos Snellings wrote:
 Thank you, Simone. I will do that.

 On Sat, 2009-12-05 at 09:21 +0100, Simone Tripodi wrote:
  Hi Jos,
  nice to meet you :) Usually suggestions of this kind have to be
  submitted by the issue tracker:
 
  http://issues.apache.org/jira/browse/COCOON3
 
  Make your own patch through the command line:
 
  svn diff -x -u Main.java  arg-fix.patch
 
  giving your patch file meaningful name.
  Goof job!
  Simo
 
  On Sat, Dec 5, 2009 at 8:29 AM, Jos Snellings jos.snelli...@pandora.be 
  wrote:
   URLResponse.java:
  
   Modifying the finally-clause to remain silent:
  
   finally {
              if (servletConnection != null)
   URLConnectionUtils.closeQuietly(servletConnection);
          }
  
   Jos
  
  
 
 
 








-- 
http://www.google.com/profiles/simone.tripodi


[jira] Created: (COCOON-2272) CLONE -Calling SitemapSource.getInputStream() twice

2009-12-05 Thread josh (JIRA)
CLONE -Calling SitemapSource.getInputStream() twice
---

 Key: COCOON-2272
 URL: https://issues.apache.org/jira/browse/COCOON-2272
 Project: Cocoon
  Issue Type: Bug
  Components: * Cocoon Core
 Environment: Operating System: other
Platform: Other
Reporter: josh
Priority: Critical


Hello,

It seems that Cocoon is broken WRT calling SitemapSource.getInputStream() twice.
 The first invocation is okay, but the second one is doing a refresh().  Then
the environment's context is reset, which is making the request fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.