ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
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 GMT
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 = "<!DOCTYPE project SYSTEM \"m2-entities.ent\">\n";
+        private static final int MARK = 10000;
+        private static final String DOCTYPE = "<!DOCTYPE project SYSTEM \"m2-entities.ent\">\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 {



Mime
View raw message