You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by sugartxy <gi...@git.apache.org> on 2015/06/19 11:13:55 UTC

[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

GitHub user sugartxy opened a pull request:

    https://github.com/apache/maven/pull/53

    #MNG-5844: Close IO Streams in finally block

    Place the close method in the finally clause, so we can ensure it always
    runs regardless of how the method exits.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sugartxy/maven Close-In-Finally

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven/pull/53.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #53
    
----
commit f7de4ed38169d775f685d1b3756a69db34b51a0a
Author: sugartxy <tg...@163.com>
Date:   2015-06-19T09:10:43Z

    #MNG-5844: Close IO Streams in finally block
    
    Place the close method in the finally clause, so we can ensure it always
    runs regardless of how the method exits.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by Tibor17 <gi...@git.apache.org>.
Github user Tibor17 commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113717735
  
    try-with-resources is cool.
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by krosenvold <gi...@git.apache.org>.
Github user krosenvold commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113734189
  
    Unfortunately I just merged the gigantic migrate everything to jdk7 branch, which made this pull request stale. Can you re-align it, and I will merge it ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by sugartxy <gi...@git.apache.org>.
Github user sugartxy commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113709155
  
    @jvanzyl  Please let me know if you want something else to be done on this pull request before you could merge it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by krosenvold <gi...@git.apache.org>.
Github user krosenvold commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113769042
  
    There were some minor adjustments I did to your stuff, but nothing significant :) Thanks a lot !


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by jvanzyl <gi...@git.apache.org>.
Github user jvanzyl commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113505944
  
    +1 please use try-with-resources


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by sugartxy <gi...@git.apache.org>.
Github user sugartxy commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113748452
  
    @krosenvold sorry for the mistake I've made. Does it work now?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by ifedorenko <gi...@git.apache.org>.
Github user ifedorenko commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113485035
  
    Maven is targeting java 7 already, try-with-resource is more appropriate way to guarantee IO streams are closed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/maven/pull/53


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by sugartxy <gi...@git.apache.org>.
Github user sugartxy commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113768295
  
    Oops! I misunderstood. Thank u! :) 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by sugartxy <gi...@git.apache.org>.
Github user sugartxy commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113508412
  
    @ifedorenko @jvanzyl thx. I will rewrite it using try-with-resources ASAP. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] maven pull request: #MNG-5844: Close IO Streams in finally block

Posted by jvanzyl <gi...@git.apache.org>.
Github user jvanzyl commented on the pull request:

    https://github.com/apache/maven/pull/53#issuecomment-113755269
  
    @sugartxy looks like @krosenvold is doing some JDK7 work so I'll let him merge this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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