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 11:56:24 UTC
[maven-resolver-ant-tasks] branch MRESOLVER-210 created (now
65ce057)
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.
at 65ce057 MRESOLVER-210 - Use try with resource.
This branch includes the following new commits:
new 65ce057 MRESOLVER-210 - Use try with resource.
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.
[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 65ce057a90587804c7422f93e2336c50cc31ff91
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 )
{