Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01F36919C for ; Thu, 27 Oct 2011 10:25:18 +0000 (UTC) Received: (qmail 40764 invoked by uid 500); 27 Oct 2011 10:25:17 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 40677 invoked by uid 500); 27 Oct 2011 10:25:14 -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 40665 invoked by uid 99); 27 Oct 2011 10:25:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 10:25:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 10:25:11 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 66EE83CD37; Thu, 27 Oct 2011 10:22:51 +0000 (UTC) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 52096] New: Package detection wrong in creation of empty package-info class (JAVAC task) Date: Thu, 27 Oct 2011 10:22:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Core tasks X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: achu.prav@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 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=52096 Bug #: 52096 Summary: Package detection wrong in creation of empty package-info class (JAVAC task) Product: Ant Version: 1.8.2 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: notifications@ant.apache.org ReportedBy: achu.prav@gmail.com Classification: Unclassified If the packages are created directly under the source directory for JAVAC,then the logic for creating empty package-info.class would be right. But in case there are sub-folders inside the source directory for JAVAC,then the logic for detecting the packages includes the sub-folders and hence the empty package-info.class gets always created and also created with the subfolders included in the destination directory of JAVAC. I think the removeleading path method in FileUtils class removes the leading path till the source directory ,but if there are sub-folders under the source directory ,this method cannot remove the same. Suppose for example: If I have a folder structure ->src -->java --->fld1 package:com.apache.test1 --->fld2 package:com.apache.test2 Suppose the source directory to JAVAC is "src/java".I have a package-info.java file inside package "com.apache.test1".Suppose the destination directory is build/classes.If I run JAVAC task using ant 1.8.2 ,it creates an empty package-info.class in build/classes/fld1/com/apache/test1. The problem seems to be in the construction of the packageinfo map and the usage of removeleadingpath in the fileutils class. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.