From notifications-return-5051-apmail-ant-notifications-archive=ant.apache.org@ant.apache.org Thu Oct 02 08:06:12 2008 Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 66952 invoked from network); 2 Oct 2008 08:06:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2008 08:06:11 -0000 Received: (qmail 54582 invoked by uid 500); 2 Oct 2008 08:06:10 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 54562 invoked by uid 500); 2 Oct 2008 08:06:10 -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 54553 invoked by uid 99); 2 Oct 2008 08:06:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 01:06:10 -0700 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; Thu, 02 Oct 2008 08:05:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2893223889A0; Thu, 2 Oct 2008 01:05:50 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r701026 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: plugins/parser/m2/PomModuleDescriptorBuilder.java plugins/parser/m2/PomModuleDescriptorParser.java plugins/parser/m2/PomReader.java util/XMLHelper.java Date: Thu, 02 Oct 2008 08:05:49 -0000 To: notifications@ant.apache.org From: xavier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081002080550.2893223889A0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: xavier Date: Thu Oct 2 01:05:49 2008 New Revision: 701026 URL: http://svn.apache.org/viewvc?rev=701026&view=rev Log: fix style Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=701026&r1=701025&r2=701026&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java Thu Oct 2 01:05:49 2008 @@ -194,7 +194,8 @@ private ParserSettings parserSettings; - public PomModuleDescriptorBuilder(ModuleDescriptorParser parser, Resource res, ParserSettings ivySettings) { + public PomModuleDescriptorBuilder( + ModuleDescriptorParser parser, Resource res, ParserSettings ivySettings) { ivyModuleDescriptor = new DefaultModuleDescriptor(parser, res); ivyModuleDescriptor.setResolvedPublicationDate(new Date(res.getLastModified())); for (int i = 0; i < MAVEN2_CONFIGURATIONS.length; i++) { @@ -242,7 +243,8 @@ DependencyResolver resolver = parserSettings.getResolver(mrid); if (resolver != null) { - DefaultArtifact artifact = new DefaultArtifact(mrid, new Date(), artifactId, "jar", "jar"); + DefaultArtifact artifact = new DefaultArtifact( + mrid, new Date(), artifactId, "jar", "jar"); ArtifactOrigin artifactOrigin = resolver.locate(artifact); if (!ArtifactOrigin.isUnknown(artifactOrigin)) { Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=701026&r1=701025&r2=701026&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java Thu Oct 2 01:05:49 2008 @@ -108,7 +108,8 @@ public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL, Resource res, boolean validate) throws ParseException, IOException { - PomModuleDescriptorBuilder mdBuilder = new PomModuleDescriptorBuilder(this, res, ivySettings); + PomModuleDescriptorBuilder mdBuilder = new PomModuleDescriptorBuilder( + this, res, ivySettings); try { PomReader domReader = new PomReader(descriptorURL, res); Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java?rev=701026&r1=701025&r2=701026&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java Thu Oct 2 01:05:49 2008 @@ -89,10 +89,11 @@ InputStream stream = new AddDTDFilterInputStream(descriptorURL.openStream()); try { Document pomDomDoc = XMLHelper.parseToDom(stream, res, new EntityResolver() { - public InputSource resolveEntity(String publicId, String systemId) throws SAXException, - IOException { + public InputSource resolveEntity(String publicId, String systemId) + throws SAXException, IOException { if ((systemId != null) && systemId.endsWith("m2-entities.ent")) { - return new InputSource(PomReader.class.getResourceAsStream("m2-entities.ent")); + return new InputSource( + PomReader.class.getResourceAsStream("m2-entities.ent")); } return null; } @@ -496,7 +497,8 @@ } private static final class AddDTDFilterInputStream extends FilterInputStream { - private static String DOCTYPE = "\n"; + private static final int MARK = 10000; + private static final String DOCTYPE = "\n"; private int count; private byte[] prefix = DOCTYPE.getBytes(); @@ -508,7 +510,7 @@ throw new IllegalArgumentException("The inputstream doesn't support mark"); } - in.mark(10000); + in.mark(MARK); int bytesToSkip = 0; LineNumberReader reader = new LineNumberReader(new InputStreamReader(in, "UTF-8")); @@ -541,8 +543,8 @@ public int read(byte[] b, int off, int len) throws IOException { if (b == null) { throw new NullPointerException(); - } else if ((off < 0) || (off > b.length) || (len < 0) || - ((off + len) > b.length) || ((off + len) < 0)) { + } else if ((off < 0) || (off > b.length) || (len < 0) + || ((off + len) > b.length) || ((off + len) < 0)) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return 0; Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java?rev=701026&r1=701025&r2=701026&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java Thu Oct 2 01:05:49 2008 @@ -195,13 +195,14 @@ } - public static Document parseToDom(InputStream stream, Resource res, EntityResolver entityResolver) throws IOException, - SAXException { + public static Document parseToDom( + InputStream stream, Resource res, EntityResolver entityResolver) + throws IOException, SAXException { DocumentBuilder docBuilder = getDocBuilder(entityResolver); Document pomDomDoc; try { pomDomDoc = docBuilder.parse(stream, res.getName()); - } catch (SAXException e ) { + } catch (SAXException e) { e.printStackTrace(); throw e; } finally {