Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 10030 invoked from network); 7 Jun 2010 20:07:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 20:07:25 -0000 Received: (qmail 59221 invoked by uid 500); 7 Jun 2010 20:07:25 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 59184 invoked by uid 500); 7 Jun 2010 20:07:25 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 59176 invoked by uid 99); 7 Jun 2010 20:07:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 20:07:24 +0000 X-ASF-Spam-Status: No, hits=-1476.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 20:07:24 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o57K74Hw017415 for ; Mon, 7 Jun 2010 20:07:04 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id o57K73J5017414; Mon, 7 Jun 2010 16:07:03 -0400 (EDT) Date: Mon, 7 Jun 2010 16:07:03 -0400 (EDT) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 49400] New: Log statements in AbstractFileset can cause NullPointerExceptions X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Core X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gavares@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=49400 Summary: Log statements in AbstractFileset can cause NullPointerExceptions Product: Ant Version: 1.8.1 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: notifications@ant.apache.org ReportedBy: gavares@gmail.com I use the tasks defined in Apache Ant programatically to perform simple unix tasks such as deleting directories, untarring files, etc. When using these tasks in this fashion, I do not create instances of Project to pass to the classes. Recently, after using the Delete class successfully some time, I began calling: delete.setFollowSymlinks(false) and started seeing NPE's after calling delete.execute(). Stacktrace: Caused by: java.lang.NullPointerException at org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:464) at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:430) at org.apache.tools.ant.types.FileSet.size(FileSet.java:82) at org.apache.tools.ant.types.resources.Resources$MyCollection.(Resources.java:74) at org.apache.tools.ant.types.resources.Resources.validate(Resources.java:229) at org.apache.tools.ant.types.resources.Resources.isFilesystemOnly(Resources.java:162) at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:587) This was run using ant version 1.7.0. Looking into the source code for AbstractFileSet, line 464 is: p.log(getDataTypeName() + ": Setup scanner in dir " + dir + " with " + ps, Project.MSG_DEBUG); It seems like project is null at this line when the log statement is called. This problem does not occur if I do not call setFollowSymlinks. This line corresponds with line 520 of AbstractFileSet in version 1.8.1. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.