From notifications-return-12641-apmail-ant-notifications-archive=ant.apache.org@ant.apache.org Wed Jun 09 20:38:46 2010 Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 68134 invoked from network); 9 Jun 2010 20:38:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jun 2010 20:38:46 -0000 Received: (qmail 90773 invoked by uid 500); 9 Jun 2010 20:38:46 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 90749 invoked by uid 500); 9 Jun 2010 20:38:46 -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 90742 invoked by uid 99); 9 Jun 2010 20:38:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 20:38:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 20:38:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F2DAE23889CB; Wed, 9 Jun 2010 20:38:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r953152 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java Date: Wed, 09 Jun 2010 20:38:00 -0000 To: notifications@ant.apache.org From: gscokart@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100609203800.F2DAE23889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gscokart Date: Wed Jun 9 20:38:00 2010 New Revision: 953152 URL: http://svn.apache.org/viewvc?rev=953152&view=rev Log: Fix ConstantNameCheck checkstyle error Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java?rev=953152&r1=953151&r2=953152&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java Wed Jun 9 20:38:00 2010 @@ -162,21 +162,21 @@ public final class XmlModuleDescriptorUp private static class UpdaterHandler extends DefaultHandler implements LexicalHandler { /** standard attributes of ivy-module/info */ - private static final Collection stdAtts = Arrays.asList(new String[] {"organisation", "module", "branch", - "revision", "status", "publication", "namespace"}); + private static final Collection STD_ATTS = Arrays.asList(new String[] {"organisation", + "module", "branch", "revision", "status", "publication", "namespace"}); /** elements that may appear inside ivy-module, in expected order */ - private static final List moduleElements = Arrays.asList(new String[] { + private static final List MODULE_ELEMENTS = Arrays.asList(new String[] { "info", "configurations", "publications", "dependencies", "conflicts" }); /** element position of "configurations" inside "ivy-module" */ - private static final int CONFIGURATIONS_POSITION = moduleElements.indexOf("configurations"); + private static final int CONFIGURATIONS_POSITION = MODULE_ELEMENTS.indexOf("configurations"); /** element position of "dependencies" inside "ivy-module" */ - private static final int DEPENDENCIES_POSITION = moduleElements.indexOf("dependencies"); + private static final int DEPENDENCIES_POSITION = MODULE_ELEMENTS.indexOf("dependencies"); /** elements that may appear inside of ivy-module/info */ - private static final Collection infoElements = Arrays.asList(new String[]{ - "extends", "ivyauthor", "license", "repository", "description" }); + private static final Collection INFO_ELEMENTS = Arrays.asList(new String[] {"extends", + "ivyauthor", "license", "repository", "description"}); private final ParserSettings settings; @@ -354,7 +354,7 @@ public final class XmlModuleDescriptorUp //if the descriptor already contains a description, don't bother printing //the merged version. hasDescription = true; - } else if (!infoElements.contains(qName)) { + } else if (!INFO_ELEMENTS.contains(qName)) { //according to the XSD, we should write description after all of the other //standard elements but before any extended elements. writeInheritedDescription(merged); @@ -699,7 +699,7 @@ public final class XmlModuleDescriptorUp extraAttributes = new LinkedHashMap(attributes.getLength()); for (int i = 0; i < attributes.getLength(); i++) { String qname = attributes.getQName(i); - if (!stdAtts.contains(qname)) { + if (!STD_ATTS.contains(qname)) { extraAttributes.put(qname, substitute(settings, attributes.getValue(i))); } } @@ -1047,8 +1047,8 @@ public final class XmlModuleDescriptorUp && !(mergedConfigurations && mergedDependencies)) { //calculate the position of the element in ivy-module - int position = moduleElement == null ? moduleElements.size() - : moduleElements.indexOf(moduleElement); + int position = moduleElement == null ? MODULE_ELEMENTS.size() + : MODULE_ELEMENTS.indexOf(moduleElement); ModuleDescriptor merged = options.getMergedDescriptor();