You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2021/10/03 12:01:07 UTC

[maven-resolver-ant-tasks] branch MRESOLVER-210 updated (65ce057 -> 8d4010e)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MRESOLVER-210
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git.


 discard 65ce057  MRESOLVER-210 - Use try with resource.
     new 8d4010e  MRESOLVER-210 - Use try with resource.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (65ce057)
            \
             N -- N -- N   refs/heads/MRESOLVER-210 (8d4010e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:

[maven-resolver-ant-tasks] 01/01: MRESOLVER-210 - Use try with resource.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MRESOLVER-210
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git

commit 8d4010e7686f193f3b18fd074eb71d4cb6e81b81
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Sun Oct 3 09:51:19 2021 +0200

    MRESOLVER-210 - Use try with resource.
---
 .../java/org/apache/maven/resolver/internal/ant/AntRepoSys.java    | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
index b5736ad..61dafe3 100644
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
+++ b/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
@@ -806,8 +806,7 @@ public class AntRepoSys
         List<Dependency> dependencies = new ArrayList<Dependency>();
         try
         {
-            BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( file ), "UTF-8" ) );
-            try
+            try ( BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( file ), "UTF-8" ) ) )
             {
                 for ( String line = reader.readLine(); line != null; line = reader.readLine() )
                 {
@@ -826,10 +825,6 @@ public class AntRepoSys
                     dependencies.add( dependency );
                 }
             }
-            finally
-            {
-                reader.close();
-            }
         }
         catch ( IOException e )
         {