You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2022/04/09 16:01:47 UTC

[ant] branch master updated (f7813aa7e -> 99be66bc0)

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

bodewig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


    from f7813aa7e Merge pull request #185 from chagmed/master
     add 2989738c9 plug resource leak as suggested by Mike Phillips in BZ issue 66001
     new 99be66bc0 Merge branch '1.9.x'

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:
 WHATSNEW                                           | 44 ++++++++++++----------
 .../ant/taskdefs/optional/ssh/ScpFromMessage.java  | 14 ++++---
 2 files changed, 33 insertions(+), 25 deletions(-)


[ant] 01/01: Merge branch '1.9.x'

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

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git

commit 99be66bc0f5d4f55a06b0d0af0f7a31458039096
Merge: f7813aa7e 2989738c9
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sat Apr 9 18:01:35 2022 +0200

    Merge branch '1.9.x'

 WHATSNEW                                           | 44 ++++++++++++----------
 .../ant/taskdefs/optional/ssh/ScpFromMessage.java  | 14 ++++---
 2 files changed, 33 insertions(+), 25 deletions(-)

diff --cc WHATSNEW
index dee8ed63c,0f69bd28b..d413d5866
--- a/WHATSNEW
+++ b/WHATSNEW
@@@ -1,51 -1,18 +1,55 @@@
 -Changes from Ant 1.9.16 TO Ant 1.9.17
 -=====================================
 +Changes from Ant 1.10.12 TO Ant 1.10.13
 +=======================================
  
  Changes that could break older environments:
 ---------------------------------------------
 +-------------------------------------------
  
- * <get> has a new attribute authenticateOnRedirect that can be used to
-   prevent Ant from sending the configured credentials when following a
-   redirect. It is false by default, which means builds that rely on
-   credentials being used on the redirected URI may break.
-   Github Pull Request #173
+  * <get> has a new attribute authenticateOnRedirect that can be used to
+    prevent Ant from sending the configured credentials when following a
+    redirect. It is false by default, which means builds that rely on
+    credentials being used on the redirected URI may break.
+    Github Pull Request #173
  
  Fixed bugs:
  -----------
  
- * the PropertyEnumerator change introduced in 1.10.9 proved to be not
-   fully backwards compatible when combined with certain custom
-   PropertyHelper implementations - for example when using AntXtras.
-   Bugzilla Report 65799
++ * the PropertyEnumerator change introduced in 1.10.9 proved to be not
++   fully backwards compatible when combined with certain custom
++   PropertyHelper implementations - for example when using AntXtras.
++   Bugzilla Report 65799
 +
- * legacy-xml reporter of the junitlauncher task now escapes ]]> when writing CDATA.
-   Bugzilla Report 65833
++ * legacy-xml reporter of the junitlauncher task now escapes ]]> when writing CDATA.
++   Bugzilla Report 65833
++
++ * <scp> may leak connections when trying to preserve the las modified
++   timestamps of files transferred recursively from a server.
++   Bugzilla Report 66001
 +
 +Other changes:
 +--------------
 +
- * added an implementation of the MIME Mail sender based on the
-   repackaged Jakarta Mail package rather than javax Mail.
-   Github Pull Request #161
++ * added an implementation of the MIME Mail sender based on the
++   repackaged Jakarta Mail package rather than javax Mail.
++   Github Pull Request #161
 +
- * The "listener" element in the junitlauncher task now supports
-   an "extension" attribute to control the filename extension
-   of the generated output file from the listener.
-   Github Pull Request #168
++ * The "listener" element in the junitlauncher task now supports
++   an "extension" attribute to control the filename extension
++   of the generated output file from the listener.
++   Github Pull Request #168
 +
- * <ftp> now supports FTPs.
-   Github Pull Request #170
++ * <ftp> now supports FTPs.
++   Github Pull Request #170
 +
 +Changes from Ant 1.10.11 TO Ant 1.10.12
 +=======================================
 +
 +Fixed bugs:
 +-----------
 +
 + * The http condition would follow redirects even when "followRedirects" attribute
 +   was set to "false". This has now been fixed.
 +   Bugzilla Report 65489
 +
   * Made sure setting build.compiler to the fully qualified classname
     that corresponds to extJavac or modern has the same effect as using
     the shorter alias names.
diff --cc src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
index 70df6f634,96be3447f..93e3554d9
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
@@@ -310,15 -310,21 +310,19 @@@ public class ScpFromMessage extends Abs
      private void setLastModified(final File localFile) throws JSchException {
          SftpATTRS fileAttributes = null;
          final ChannelSftp channel = openSftpChannel();
-         channel.connect();
          try {
-             fileAttributes = channel.lstat(remoteDir(remoteFile)
-                                            + localFile.getName());
-         } catch (final SftpException e) {
-             throw new JSchException("failed to stat remote file", e);
+             channel.connect();
+             try {
+                 fileAttributes = channel.lstat(remoteDir(remoteFile)
+                                                + localFile.getName());
+             } catch (final SftpException e) {
+                 throw new JSchException("failed to stat remote file", e);
+             }
+         } finally {
+             channel.disconnect();
          }
          FileUtils.getFileUtils().setFileLastModified(localFile,
 -                                                     ((long) fileAttributes
 -                                                      .getMTime())
 -                                                     * 1000);
 +                ((long) fileAttributes.getMTime()) * 1000);
      }
  
      /**