You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Jos Snellings (JIRA)" <ji...@apache.org> on 2009/12/05 09:41:20 UTC

[jira] Created: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == 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.


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

Posted by "Steven Dolg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788132#action_12788132 ] 

Steven Dolg commented on COCOON3-46:
------------------------------------

All the patch does is introduce a null check for closeQuietly(..).
Feels like the right thing to do.

Applied with minor formatting changes.

> 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: Steven Dolg
>            Priority: Minor
>             Fix For: 3.0.0-alpha-3
>
>         Attachments: closeQuietly-fix.patch
>
>
> 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.


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

Posted by "Steven Dolg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Dolg closed COCOON3-46.
------------------------------

    Resolution: Fixed

> 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: Steven Dolg
>            Priority: Minor
>             Fix For: 3.0.0-alpha-3
>
>         Attachments: closeQuietly-fix.patch
>
>
> 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

Posted by Joerg Heinicke <jo...@gmx.de>.
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 +0000, Jörg Heinicke (JIRA) wrote:
>> [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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

Posted by Jos Snellings <Jo...@pandora.be>.
That is what I did.

On Sat, 2009-12-05 at 09:50 +0000, Jörg Heinicke (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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.
> 



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

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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.


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

Posted by "Jos Snellings (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jos Snellings updated COCOON3-46:
---------------------------------

    Attachment: closeQuietly-fix.patch

> 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
>
>         Attachments: closeQuietly-fix.patch
>
>
> 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.


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

Posted by "Steven Dolg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Dolg reassigned COCOON3-46:
----------------------------------

    Assignee: Steven Dolg  (was: Cocoon Developers Team)

> 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: Steven Dolg
>            Priority: Minor
>             Fix For: 3.0.0-alpha-3
>
>         Attachments: closeQuietly-fix.patch
>
>
> 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.