It's a bug, but you can safely ignore it. This is occurring while the
packager resolver is attempting to delete the temporary build directory it
uses.

However, the bug can only occur (according to the Javadocs) if an I/O error
has occurred while attempting to delete some file(s). This probably includes
problems like wrong permissions, etc., so you might investigate what might
prevent ivy from being allowed to delete files.

The attached patch should fix the exception (but not the underlying
problem). If you have a chance please file a bug and reference this patch.

-Archie

On Thu, Dec 23, 2010 at 12:10 PM, Jonathan Williams <
spamhammer1...@gmail.com> wrote:

> I recently started using a package resolver for some of my project's
> dependencies. It appears to work well for the most part except that at the
> end of the build, I occasionally see the following exceptions output to my
> console. It is of note that when I see this error output, the build has
> still reported as completing successfully.
>
> Exception in thread "Thread-16" java.lang.NullPointerException
>        at org.apache.ivy.util.FileUtil.forceDelete(FileUtil.java:303)
>        at org.apache.ivy.util.FileUtil.forceDelete(FileUtil.java:304)
>
-- 
Archie L. Cobbs
Index: src/java/org/apache/ivy/util/FileUtil.java
===================================================================
--- src/java/org/apache/ivy/util/FileUtil.java  (revision 1052360)
+++ src/java/org/apache/ivy/util/FileUtil.java  (working copy)
@@ -309,6 +309,8 @@
         }
         if (file.isDirectory()) {
             File[] files = file.listFiles();
+            if (files == null)
+                continue;
             for (int i = 0; i < files.length; i++) {
                 if (!forceDelete(files[i])) {
                     return false;

Reply via email to