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 2015/02/04 11:14:55 UTC

[1/2] ant git commit: typo

Repository: ant
Updated Branches:
  refs/heads/master e6a5e8299 -> dc37a17ff


typo


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/6f318592
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/6f318592
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/6f318592

Branch: refs/heads/master
Commit: 6f3185926cb4b1fa7f76c0541f2cba0eb5085c79
Parents: e6a5e82
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Feb 4 11:11:13 2015 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Feb 4 11:11:13 2015 +0100

----------------------------------------------------------------------
 WHATSNEW | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/6f318592/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 1c2721d..5c78ad1 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -60,7 +60,7 @@ Fixed bugs:
    when applied to big outputs.
    Bugzilla Report 57341
 
- * removed spurious warning about inclosed ZipFiles when reading the
+ * removed spurious warning about unclosed ZipFiles when reading the
    archive failed.
    Port of https://issues.apache.org/jira/browse/COMPRESS-297
 


[2/2] ant git commit: NullPointerException in ResourceUtils.copyUsingFileChannels

Posted by bo...@apache.org.
NullPointerException in ResourceUtils.copyUsingFileChannels

Bugzilla Report 57533


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/dc37a17f
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/dc37a17f
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/dc37a17f

Branch: refs/heads/master
Commit: dc37a17ff84af8e9c7fec2aa93d7b2b989fb304c
Parents: 6f31859
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Feb 4 11:13:58 2015 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Feb 4 11:13:58 2015 +0100

----------------------------------------------------------------------
 WHATSNEW                                        |  6 +++++
 .../apache/tools/ant/util/ResourceUtils.java    | 23 ++++++++++++++------
 2 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/dc37a17f/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 5c78ad1..f53145f 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -64,6 +64,12 @@ Fixed bugs:
    archive failed.
    Port of https://issues.apache.org/jira/browse/COMPRESS-297
 
+ * FileUtils.rename which is used by several tasks can throw a
+   NullPointerException if the "normal" renameTo operation fails and
+   an exception occurs while rename falls back to copying and deleting
+   the file.
+   Bugzilla Report 57533
+
 Other changes:
 --------------
 

http://git-wip-us.apache.org/repos/asf/ant/blob/dc37a17f/src/main/org/apache/tools/ant/util/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ResourceUtils.java b/src/main/org/apache/tools/ant/util/ResourceUtils.java
index 0c1ce69..6397f71 100644
--- a/src/main/org/apache/tools/ant/util/ResourceUtils.java
+++ b/src/main/org/apache/tools/ant/util/ResourceUtils.java
@@ -435,11 +435,15 @@ public class ResourceUtils {
                     copyUsingFileChannels(sourceFile, destFile);
                     copied = true;
                 } catch (final IOException ex) {
-                    project.log("Attempt to copy " + sourceFile
-                                + " to " + destFile + " using NIO Channels"
-                                + " failed due to '" + ex.getMessage()
-                                + "'.  Falling back to streams.",
-                                Project.MSG_WARN);
+                    String msg = "Attempt to copy " + sourceFile
+                        + " to " + destFile + " using NIO Channels"
+                        + " failed due to '" + ex.getMessage()
+                        + "'.  Falling back to streams.";
+                    if (project != null) {
+                        project.log(msg, Project.MSG_WARN);
+                    } else {
+                        System.err.println(msg);
+                    }
                 }
             }
             if (!copied) {
@@ -828,8 +832,13 @@ public class ResourceUtils {
             if (a != null) {
                 return a.getAppendOutputStream();
             }
-            project.log("Appendable OutputStream not available for non-appendable resource "
-                    + resource + "; using plain OutputStream", Project.MSG_VERBOSE);
+            String msg = "Appendable OutputStream not available for non-appendable resource "
+                + resource + "; using plain OutputStream";
+            if (project != null) {
+                project.log(msg, Project.MSG_VERBOSE);
+            } else {
+                System.out.println(msg);
+            }
         }
         return resource.getOutputStream();
     }