You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/09/24 12:05:19 UTC
[maven-invoker-plugin] branch master updated (28870c3 -> e654521)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git.
from 28870c3 Agree verb with subject
new 656e3af Extract reader to local variable
new e654521 Auto-close exploited resource
The 2 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:
src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[maven-invoker-plugin] 02/02: Auto-close exploited resource
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git
commit e654521fff7e4f4715eca52912786e491fa73943
Author: Piotrek Żygieło <pz...@users.noreply.github.com>
AuthorDate: Fri Sep 24 11:19:30 2021 +0200
Auto-close exploited resource
---
src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java b/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
index 511d8e5..12cf8c0 100644
--- a/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
+++ b/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
@@ -236,8 +236,10 @@ class InvokerSession
buildLogMessage.append( System.lineSeparator() );
buildLogMessage.append( "*** begin build.log for: " + buildJob.getProject() + " ***" );
buildLogMessage.append( System.lineSeparator() );
- FileReader buildLogReader = new FileReader( buildLogFile );
- buildLogMessage.append( IOUtil.toString( buildLogReader ) );
+ try ( FileReader buildLogReader = new FileReader( buildLogFile ) )
+ {
+ buildLogMessage.append( IOUtil.toString( buildLogReader ) );
+ }
buildLogMessage.append( "*** end build.log for: " + buildJob.getProject() + " ***" );
buildLogMessage.append( System.lineSeparator() );
[maven-invoker-plugin] 01/02: Extract reader to local variable
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git
commit 656e3af6caec81cd21443631990504de245c0743
Author: Piotrek Żygieło <pz...@users.noreply.github.com>
AuthorDate: Fri Sep 24 10:07:38 2021 +0200
Extract reader to local variable
---
src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java b/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
index 06cead4..511d8e5 100644
--- a/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
+++ b/src/main/java/org/apache/maven/plugins/invoker/InvokerSession.java
@@ -236,7 +236,8 @@ class InvokerSession
buildLogMessage.append( System.lineSeparator() );
buildLogMessage.append( "*** begin build.log for: " + buildJob.getProject() + " ***" );
buildLogMessage.append( System.lineSeparator() );
- buildLogMessage.append( IOUtil.toString( new FileReader( buildLogFile ) ) );
+ FileReader buildLogReader = new FileReader( buildLogFile );
+ buildLogMessage.append( IOUtil.toString( buildLogReader ) );
buildLogMessage.append( "*** end build.log for: " + buildJob.getProject() + " ***" );
buildLogMessage.append( System.lineSeparator() );