ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r632731 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: ./ ant/ core/ core/event/resolve/ plugins/latest/ plugins/parser/ plugins/parser/m2/ plugins/parser/xml/ plugins/resolver/ tools/analyser/
Date Sun, 02 Mar 2008 10:08:30 GMT
Author: xavier
Date: Sun Mar  2 02:08:29 2008
New Revision: 632731

URL: http://svn.apache.org/viewvc?rev=632731&view=rev
Log:
diverse easy checkstyle fix

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy14.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyBuildNumber.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/event/resolve/ResolveDependencyEvent.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestTimeStrategy.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarJarDependencyAnalyser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModule.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModuleFinder.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/RepositoryAnalyser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java Sun Mar  2 02:08:29 2008
@@ -31,8 +31,6 @@
 
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.LogOptions;
-import org.apache.ivy.core.cache.DefaultResolutionCacheManager;
-import org.apache.ivy.core.cache.RepositoryCacheManager;
 import org.apache.ivy.core.cache.ResolutionCacheManager;
 import org.apache.ivy.core.check.CheckEngine;
 import org.apache.ivy.core.deliver.DeliverEngine;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy14.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy14.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy14.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy14.java Sun Mar  2 02:08:29 2008
@@ -27,7 +27,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ivy.core.cache.DefaultResolutionCacheManager;
 import org.apache.ivy.core.deliver.DeliverOptions;
 import org.apache.ivy.core.deliver.PublishingDependencyRevisionResolver;
 import org.apache.ivy.core.module.descriptor.Artifact;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyBuildNumber.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyBuildNumber.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyBuildNumber.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyBuildNumber.java Sun Mar  2 02:08:29
2008
@@ -121,10 +121,10 @@
             module, branch, revision));
         String revision = rmr == null ? null : rmr.getId().getRevision();
         NewRevision newRevision = computeNewRevision(revision);
-        setProperty("revision", newRevision.revision);
-        setProperty("new.revision", newRevision.newRevision);
-        setProperty("build.number", newRevision.buildNumber);
-        setProperty("new.build.number", newRevision.newBuildNumber);
+        setProperty("revision", newRevision.getRevision());
+        setProperty("new.revision", newRevision.getNewRevision());
+        setProperty("build.number", newRevision.getBuildNumber());
+        setProperty("new.build.number", newRevision.getNewBuildNumber());
     }
 
     private void setProperty(String propertyName, String value) {
@@ -150,7 +150,8 @@
                 if (r == null) { // no number found
                     return new NewRevision(revision, defaultValue, null, null);
                 } else {
-                    long n = Long.parseLong(defaultValue.substring(r.startIndex, r.endIndex));
+                    long n = Long.parseLong(
+                        defaultValue.substring(r.getStartIndex(), r.getEndIndex()));
                     return new NewRevision(revision, defaultValue, null, String.valueOf(n));
                 }
             }
@@ -169,8 +170,8 @@
                         + (revPrefix.endsWith(revSep) ? "1" : revSep + "1"), null, "1");
             }
         }
-        long n = Long.parseLong(revision.substring(r.startIndex, r.endIndex)) + 1;
-        return new NewRevision(revision, revision.substring(0, r.startIndex) + n, String
+        long n = Long.parseLong(revision.substring(r.getStartIndex(), r.getEndIndex())) +
1;
+        return new NewRevision(revision, revision.substring(0, r.getStartIndex()) + n, String
                 .valueOf(n - 1), String.valueOf(n));
     }
 
@@ -219,6 +220,14 @@
             this.startIndex = startIndex;
             this.endIndex = endIndex;
         }
+
+        public int getStartIndex() {
+            return startIndex;
+        }
+
+        public int getEndIndex() {
+            return endIndex;
+        }
     }
 
     private static class NewRevision {
@@ -236,6 +245,22 @@
             this.newRevision = newRevision;
             this.buildNumber = buildNumber;
             this.newBuildNumber = newBuildNumber;
+        }
+
+        public String getRevision() {
+            return revision;
+        }
+
+        public String getNewRevision() {
+            return newRevision;
+        }
+
+        public String getBuildNumber() {
+            return buildNumber;
+        }
+
+        public String getNewBuildNumber() {
+            return newBuildNumber;
         }
     }
 

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java Sun Mar  2 02:08:29
2008
@@ -160,7 +160,8 @@
         return substituteVariables(pattern, variables, new Stack());
     }
 
-    private static String substituteVariables(String pattern, IvyVariableContainer variables,
Stack substituting) {
+    private static String substituteVariables(
+            String pattern, IvyVariableContainer variables, Stack substituting) {
         // if you supply null, null is what you get
         if (pattern == null) {
             return null;
@@ -329,7 +330,8 @@
         return substituteParams(pattern, new IvyVariableContainerImpl(params), new Stack());
     }
 
-    private static String substituteParams(String pattern, IvyVariableContainer params, Stack
substituting) {
+    private static String substituteParams(
+            String pattern, IvyVariableContainer params, Stack substituting) {
         // TODO : refactor this with substituteVariables
         // if you supply null, null is what you get
         if (pattern == null) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/event/resolve/ResolveDependencyEvent.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/event/resolve/ResolveDependencyEvent.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/event/resolve/ResolveDependencyEvent.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/event/resolve/ResolveDependencyEvent.java
Sun Mar  2 02:08:29 2008
@@ -20,7 +20,6 @@
 import org.apache.ivy.core.event.IvyEvent;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
-import org.apache.ivy.core.resolve.ResolveData;
 import org.apache.ivy.plugins.resolver.DependencyResolver;
 
 public class ResolveDependencyEvent extends IvyEvent {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestTimeStrategy.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestTimeStrategy.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestTimeStrategy.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestTimeStrategy.java Sun
Mar  2 02:08:29 2008
@@ -20,7 +20,7 @@
 import java.util.Comparator;
 
 public class LatestTimeStrategy extends ComparatorLatestStrategy {
-    private static Comparator COMPARATOR = new Comparator() {
+    private static final Comparator COMPARATOR = new Comparator() {
         public int compare(Object o1, Object o2) {
             long d1 = ((ArtifactInfo) o1).getLastModified();
             long d2 = ((ArtifactInfo) o2).getLastModified();

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParser.java
Sun Mar  2 02:08:29 2008
@@ -72,7 +72,7 @@
 
         private List errors = new ArrayList();
 
-        protected DefaultModuleDescriptor md;
+        private DefaultModuleDescriptor md;
 
         private ModuleDescriptorParser parser;
 
@@ -352,6 +352,14 @@
             for (int i = 0; i < configs.length; i++) {
                 configs[i].replaceWildcards(md);
             }
+        }
+
+        protected void setMd(DefaultModuleDescriptor md) {
+            this.md = md;
+        }
+
+        protected DefaultModuleDescriptor getMd() {
+            return md;
         }
     }
 

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=632731&r1=632730&r2=632731&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 Sun Mar  2
02:08:29 2008
@@ -316,6 +316,8 @@
                 case Node.TEXT_NODE:
                     result.append(child.getNodeValue());
                     break;
+                default:
+                    break;
             }
         }
         

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
Sun Mar  2 02:08:29 2008
@@ -206,17 +206,18 @@
                 XMLHelper.parse(xmlURL, schemaURL, this);
                 checkConfigurations();
                 replaceConfigurationWildcards();
-                md.setModuleArtifact(
+                getMd().setModuleArtifact(
                     DefaultArtifact.newIvyArtifact(
-                        md.getResolvedModuleRevisionId(), md.getPublicationDate()));
+                        getMd().getResolvedModuleRevisionId(), getMd().getPublicationDate()));
                 if (!artifactsDeclared) {
-                    String[] confs = md.getConfigurationsNames();
+                    String[] confs = getMd().getConfigurationsNames();
                     for (int i = 0; i < confs.length; i++) {
-                        md.addArtifact(confs[i], new MDArtifact(md, md.getModuleRevisionId()
-                                .getName(), "jar", "jar"));
+                        getMd().addArtifact(confs[i], 
+                            new MDArtifact(getMd(), getMd().getModuleRevisionId().getName(),

+                                "jar", "jar"));
                     }
                 }
-                md.check();
+                getMd().check();
             } catch (ParserConfigurationException ex) {
                 IllegalStateException ise = new IllegalStateException(ex.getMessage() + "
in "
                         + xmlURL);
@@ -239,13 +240,14 @@
                 checkConfigurations();
                 replaceConfigurationWildcards();
                 if (!artifactsDeclared) {
-                    String[] confs = md.getConfigurationsNames();
+                    String[] confs = getMd().getConfigurationsNames();
                     for (int i = 0; i < confs.length; i++) {
-                        md.addArtifact(confs[i], new MDArtifact(md, md.getModuleRevisionId()
-                                .getName(), "jar", "jar"));
+                        getMd().addArtifact(confs[i], 
+                            new MDArtifact(getMd(), getMd().getModuleRevisionId().getName(),

+                                "jar", "jar"));
                     }
                 }
-                md.check();
+                getMd().check();
             } catch (ParserConfigurationException ex) {
                 IllegalStateException ise = new IllegalStateException(ex.getMessage());
                 ise.initCause(ex);
@@ -269,10 +271,10 @@
                 } else if ("info".equals(qName)) {
                     infoStarted(attributes);
                 } else if (state == INFO && "license".equals(qName)) {
-                    md.addLicense(new License(ivy.substitute(attributes.getValue("name")),
ivy
+                    getMd().addLicense(new License(ivy.substitute(attributes.getValue("name")),
ivy
                             .substitute(attributes.getValue("url"))));
                 } else if (state == INFO && "description".equals(qName)) {
-                    md.setHomePage(ivy.substitute(attributes.getValue("homepage")));
+                    getMd().setHomePage(ivy.substitute(attributes.getValue("homepage")));
                     state = DESCRIPTION;
                 } else if (state == INFO && "ivyauthor".equals(qName)) {
                     // nothing to do, we don't store this
@@ -301,7 +303,7 @@
                 } else if ("exclude".equals(qName) && state == DEPS) {
                     state = EXCLUDE;
                     parseRule(qName, attributes);
-                    md.addExcludeRule((ExcludeRule) confAware);
+                    getMd().addExcludeRule((ExcludeRule) confAware);
                 } else if ("dependency".equals(qName)) {
                     dependencyStarted(attributes);
                 } else if ("conf".equals(qName)) {
@@ -360,7 +362,7 @@
                 addError("unknown matcher: " + matcherName);
                 return;
             }
-            md.addConflictManager(new ModuleId(org, mod), matcher, cm);
+            getMd().addConflictManager(new ModuleId(org, mod), matcher, cm);
         }
 
         private void includeConfStarted(Attributes attributes) 
@@ -376,24 +378,24 @@
             // create a new temporary parser to read the configurations from
             // the specified file.
             Parser parser = new Parser(getModuleDescriptorParser(), ivy, false, url);
-            parser.md = new DefaultModuleDescriptor(getModuleDescriptorParser(),
-                    new URLResource(url));
+            parser.setMd(new DefaultModuleDescriptor(getModuleDescriptorParser(),
+                    new URLResource(url)));
             XMLHelper.parse(url , null, parser);
 
             // add the configurations from this temporary parser to this module descriptor
             Configuration[] configs = parser.getModuleDescriptor().getConfigurations();
             for (int i = 0; i < configs.length; i++) {
-                md.addConfiguration(configs[i]);
+                getMd().addConfiguration(configs[i]);
             }
             if (parser.getDefaultConfMapping() != null) {
                 Message.debug("setting default conf from imported configurations file: "
                         + parser.getDefaultConfMapping());
                 setDefaultConfMapping(parser.getDefaultConfMapping());
             }
-            if (parser.md.isMappingOverride()) {
+            if (parser.getMd().isMappingOverride()) {
                 Message.debug("enabling mapping-override from imported configurations" 
                         + " file");
-                md.setMappingOverride(true);
+                getMd().setMappingOverride(true);
             }
         }
 
@@ -416,18 +418,18 @@
                     ExtendableItemHelper.fillExtraAttributes(configuration, attributes,
                         new String[] {"name", "visibility", "extends", "transitive",
                                 "description", "deprecated"});
-                    md.addConfiguration(configuration);
+                    getMd().addConfiguration(configuration);
                     break;
                 case PUB:
                     if ("*".equals(conf)) {
-                        String[] confs = md.getConfigurationsNames();
+                        String[] confs = getMd().getConfigurationsNames();
                         for (int i = 0; i < confs.length; i++) {
                             artifact.addConfiguration(confs[i]);
-                            md.addArtifact(confs[i], artifact);
+                            getMd().addArtifact(confs[i], artifact);
                         }
                     } else {
                         artifact.addConfiguration(conf);
-                        md.addArtifact(conf, artifact);
+                        getMd().addArtifact(conf, artifact);
                     }
                     break;
                 case DEP:
@@ -457,7 +459,7 @@
             state = DEP;
             String org = ivy.substitute(attributes.getValue("org"));
             if (org == null) {
-                org = md.getModuleRevisionId().getOrganisation();
+                org = getMd().getModuleRevisionId().getOrganisation();
             }
             boolean force = Boolean.valueOf(ivy.substitute(attributes.getValue("force")))
                     .booleanValue();
@@ -476,11 +478,11 @@
             Map extraAttributes = ExtendableItemHelper.getExtraAttributes(
                 attributes, DEPENDENCY_REGULAR_ATTRIBUTES);
             dd = new DefaultDependencyDescriptor(
-                md, 
+                getMd(), 
                 ModuleRevisionId.newInstance(org, name, branch, rev, extraAttributes), 
                 ModuleRevisionId.newInstance(org, name, branch, revConstraint, extraAttributes),

                 force, changing, transitive);
-            md.addDependency(dd);
+            getMd().addDependency(dd);
             String confs = ivy.substitute(attributes.getValue("conf"));
             if (confs != null && confs.length() > 0) {
                 parseDepsConfs(confs, dd);
@@ -492,13 +494,13 @@
             if (state == PUB) {
                 // this is a published artifact
                 String artName = ivy.substitute(attributes.getValue("name"));
-                artName = artName == null ? md.getModuleRevisionId().getName() : artName;
+                artName = artName == null ? getMd().getModuleRevisionId().getName() : artName;
                 String type = ivy.substitute(attributes.getValue("type"));
                 type = type == null ? "jar" : type;
                 String ext = ivy.substitute(attributes.getValue("ext"));
                 ext = ext != null ? ext : type;
                 String url = ivy.substitute(attributes.getValue("url"));
-                artifact = new MDArtifact(md, artName, type, ext, url == null ? null
+                artifact = new MDArtifact(getMd(), artName, type, ext, url == null ? null
                         : new URL(url), ExtendableItemHelper.getExtraAttributes(attributes,
                     new String[] {"ext", "type", "name", "conf"}));
                 String confs = ivy.substitute(attributes.getValue("conf"));
@@ -508,13 +510,13 @@
                 if (confs != null && confs.length() > 0) {
                     String[] conf;
                     if ("*".equals(confs)) {
-                        conf = md.getConfigurationsNames();
+                        conf = getMd().getConfigurationsNames();
                     } else {
                         conf = confs.split(",");
                     }
                     for (int i = 0; i < conf.length; i++) {
                         artifact.addConfiguration(conf[i].trim());
-                        md.addArtifact(conf[i].trim(), artifact);
+                        getMd().addArtifact(conf[i].trim(), artifact);
                     }
                 }
             } else if (state == DEP) {
@@ -538,7 +540,7 @@
             String confMappingOverride = ivy.substitute(attributes
                     .getValue("confmappingoverride"));
             if (confMappingOverride != null) {
-                md.setMappingOverride(Boolean.valueOf(confMappingOverride).booleanValue());
+                getMd().setMappingOverride(Boolean.valueOf(confMappingOverride).booleanValue());
             }
             checkConfigurations();
         }
@@ -547,7 +549,7 @@
             state = CONF;
             setDefaultConfMapping(ivy
                     .substitute(attributes.getValue("defaultconfmapping")));
-            md
+            getMd()
                     .setMappingOverride(Boolean.valueOf(
                         ivy.substitute(attributes.getValue("confmappingoverride")))
                             .booleanValue());
@@ -559,7 +561,7 @@
             String module = ivy.substitute(attributes.getValue("module"));
             String revision = ivy.substitute(attributes.getValue("revision"));
             String branch = ivy.substitute(attributes.getValue("branch"));
-            md.setModuleRevisionId(ModuleRevisionId.newInstance(org, module, branch,
+            getMd().setModuleRevisionId(ModuleRevisionId.newInstance(org, module, branch,
                 revision, ExtendableItemHelper.getExtraAttributes(attributes, new String[]
{
                         "organisation", "module", "revision", "status", "publication",
                         "branch", "namespace", "default", "resolver"})));
@@ -568,28 +570,28 @@
             if (namespace != null) {
                 Namespace ns = ivy.getNamespace(namespace);
                 if (ns == null) {
-                    Message.warn("namespace not found for " + md.getModuleRevisionId()
+                    Message.warn("namespace not found for " + getMd().getModuleRevisionId()
                             + ": " + namespace);
                 } else {
-                    md.setNamespace(ns);
+                    getMd().setNamespace(ns);
                 }
             }
 
             String status = ivy.substitute(attributes.getValue("status"));
-            md.setStatus(status == null ? ivy.getStatusManager().getDefaultStatus()
+            getMd().setStatus(status == null ? ivy.getStatusManager().getDefaultStatus()
                     : status);
-            md.setDefault(Boolean.valueOf(ivy.substitute(attributes.getValue("default")))
+            getMd().setDefault(Boolean.valueOf(ivy.substitute(attributes.getValue("default")))
                     .booleanValue());
             String pubDate = ivy.substitute(attributes.getValue("publication"));
             if (pubDate != null && pubDate.length() > 0) {
                 try {
-                    md.setPublicationDate(Ivy.DATE_FORMAT.parse(pubDate));
+                    getMd().setPublicationDate(Ivy.DATE_FORMAT.parse(pubDate));
                 } catch (ParseException e) {
                     addError("invalid publication date format: " + pubDate);
-                    md.setPublicationDate(getDefaultPubDate());
+                    getMd().setPublicationDate(getDefaultPubDate());
                 }
             } else {
-                md.setPublicationDate(getDefaultPubDate());
+                getMd().setPublicationDate(getDefaultPubDate());
             }
         }
 
@@ -612,7 +614,7 @@
             
             for (int i = 0; i < attributes.getLength(); i++) {
                 if (attributes.getQName(i).startsWith("xmlns:")) {
-                    md.addExtraAttributeNamespace(
+                    getMd().addExtraAttributeNamespace(
                         attributes.getQName(i).substring("xmlns:".length()), 
                         attributes.getValue(i));
                 }
@@ -685,7 +687,7 @@
             if (confs != null && confs.length() > 0) {
                 String[] conf;
                 if ("*".equals(confs)) {
-                    conf = md.getConfigurationsNames();
+                    conf = getMd().getConfigurationsNames();
                 } else {
                     conf = confs.split(",");
                 }
@@ -738,10 +740,10 @@
         public void endElement(String uri, String localName, String qName) throws SAXException
{
             if (state == PUB && "artifact".equals(qName)
                     && artifact.getConfigurations().length == 0) {
-                String[] confs = md.getConfigurationsNames();
+                String[] confs = getMd().getConfigurationsNames();
                 for (int i = 0; i < confs.length; i++) {
                     artifact.addConfiguration(confs[i]);
-                    md.addArtifact(confs[i], artifact);
+                    getMd().addArtifact(confs[i], artifact);
                 }
             } else if ("configurations".equals(qName)) {
                 checkConfigurations();
@@ -750,7 +752,7 @@
                     || (state == ARTIFACT_EXCLUDE && "exclude".equals(qName))) {
                 state = DEP;
                 if (confAware.getConfigurations().length == 0) {
-                    String[] confs = md.getConfigurationsNames();
+                    String[] confs = getMd().getConfigurationsNames();
                     for (int i = 0; i < confs.length; i++) {
                         addConfiguration(confs[i]);
                     }
@@ -758,7 +760,7 @@
                 confAware = null;
             } else if (state == EXCLUDE) {
                 if (confAware.getConfigurations().length == 0) {
-                    String[] confs = md.getConfigurationsNames();
+                    String[] confs = getMd().getConfigurationsNames();
                     for (int i = 0; i < confs.length; i++) {
                         addConfiguration(confs[i]);
                     }
@@ -777,22 +779,22 @@
             } else if (state == DESCRIPTION && "description".equals(qName)) {
                 state = INFO;
             } else if (state == EXTRA_INFO) {
-                md.addExtraInfo(qName, buffer == null ? "" : buffer.toString());
+                getMd().addExtraInfo(qName, buffer == null ? "" : buffer.toString());
                 buffer = null;
                 state = INFO;
             }
         }
 
         private void checkConfigurations() {
-            if (md.getConfigurations().length == 0) {
-                md.addConfiguration(new Configuration("default"));
+            if (getMd().getConfigurations().length == 0) {
+                getMd().addConfiguration(new Configuration("default"));
             }
         }
 
         private void replaceConfigurationWildcards() {
-            Configuration[] configs = md.getConfigurations();
+            Configuration[] configs = getMd().getConfigurations();
             for (int i = 0; i < configs.length; i++) {
-                configs[i].replaceWildcards(md);
+                configs[i].replaceWildcards(getMd());
             }
         }
 

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=632731&r1=632730&r2=632731&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
Sun Mar  2 02:08:29 2008
@@ -545,8 +545,8 @@
             ModuleRevisionId systemMid = ns == null ? localMid : ns.getToSystemTransformer()
                     .transform(localMid);
 
-            write("<info organisation=\"" + XMLHelper.escape(systemMid.getOrganisation())
+ "\" module=\""
-                    + XMLHelper.escape(systemMid.getName()) + "\"");
+            write("<info organisation=\"" + XMLHelper.escape(systemMid.getOrganisation())

+                + "\" module=\"" + XMLHelper.escape(systemMid.getName()) + "\"");
             if (systemMid.getRevision() != null) {
                 write(" revision=\"" + XMLHelper.escape(systemMid.getRevision()) + "\"");
             }
@@ -751,8 +751,9 @@
             UpdaterHandler updaterHandler = new UpdaterHandler(settings, out, resolvedRevisions,
                     status, revision, pubdate, ns, replaceInclude, confsToExclude, inStreamCtx);
             InputSource inSrc = new InputSource(in);
-            if (inStreamCtx != null)
+            if (inStreamCtx != null) {
                 inSrc.setSystemId(inStreamCtx.toExternalForm());
+            }
             XMLHelper.parse(inSrc, null, updaterHandler, updaterHandler);
         } catch (ParserConfigurationException e) {
             IllegalStateException ise = new IllegalStateException(

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java Sun Mar
 2 02:08:29 2008
@@ -36,16 +36,8 @@
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.IvyPatternHelper;
 import org.apache.ivy.core.LogOptions;
-import org.apache.ivy.core.cache.ArtifactOrigin;
-import org.apache.ivy.core.cache.CacheDownloadOptions;
-import org.apache.ivy.core.cache.CacheMetadataOptions;
-import org.apache.ivy.core.cache.DownloadListener;
 import org.apache.ivy.core.cache.ModuleDescriptorWriter;
 import org.apache.ivy.core.cache.RepositoryCacheManager;
-import org.apache.ivy.core.event.EventManager;
-import org.apache.ivy.core.event.download.EndArtifactDownloadEvent;
-import org.apache.ivy.core.event.download.NeedArtifactEvent;
-import org.apache.ivy.core.event.download.StartArtifactDownloadEvent;
 import org.apache.ivy.core.module.descriptor.Artifact;
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java Sun
Mar  2 02:08:29 2008
@@ -93,8 +93,8 @@
                 Resource res = repository.getResource(resourceName);
                 boolean reachable = res.exists();
                 if (reachable) {
-                    String revision = pattern.indexOf(IvyPatternHelper.REVISION_KEY) == -1
?
-                            "working@" + name : mrid.getRevision();
+                    String revision = pattern.indexOf(IvyPatternHelper.REVISION_KEY) == -1

+                        ? "working@" + name : mrid.getRevision();
                     return new ResolvedResource(res, revision);
                 } else if (versionMatcher.isDynamic(mrid)) {
                     return findDynamicResourceUsingPattern(name, repository, strategy,

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarJarDependencyAnalyser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarJarDependencyAnalyser.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarJarDependencyAnalyser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarJarDependencyAnalyser.java
Sun Mar  2 02:08:29 2008
@@ -31,16 +31,16 @@
 import org.apache.ivy.util.Message;
 
 public class JarJarDependencyAnalyser implements DependencyAnalyser {
-    private File _jarjarjarLocation;
+    private File jarjarjarLocation;
 
     public JarJarDependencyAnalyser(File jarjarjarLocation) {
-        _jarjarjarLocation = jarjarjarLocation;
+        this.jarjarjarLocation = jarjarjarLocation;
     }
 
     public ModuleDescriptor[] analyze(JarModule[] modules) {
 
         StringBuffer jarjarCmd = new StringBuffer("java -jar \"").append(
-            _jarjarjarLocation.getAbsolutePath()).append("\" --find --level=jar ");
+            jarjarjarLocation.getAbsolutePath()).append("\" --find --level=jar ");
         Map jarModulesMap = new HashMap();
         Map mds = new HashMap();
 

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModule.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModule.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModule.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModule.java Sun Mar  2 02:08:29
2008
@@ -22,25 +22,25 @@
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 
 public class JarModule {
-    private ModuleRevisionId _mrid;
+    private ModuleRevisionId mrid;
 
-    private File _jar;
+    private File jar;
 
     public JarModule(ModuleRevisionId mrid, File jar) {
-        _mrid = mrid;
-        _jar = jar;
+        this.mrid = mrid;
+        this.jar = jar;
     }
 
     public File getJar() {
-        return _jar;
+        return jar;
     }
 
     public ModuleRevisionId getMrid() {
-        return _mrid;
+        return mrid;
     }
 
     public String toString() {
-        return _jar + " " + _mrid;
+        return jar + " " + mrid;
     }
 
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModuleFinder.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModuleFinder.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModuleFinder.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/JarModuleFinder.java Sun Mar
 2 02:08:29 2008
@@ -28,22 +28,22 @@
 import org.apache.ivy.plugins.resolver.util.URLLister;
 
 public class JarModuleFinder {
-    private String _pattern;
+    private String pattern;
 
-    private String _filePattern;
+    private String filePattern;
 
     public JarModuleFinder(String pattern) {
-        _pattern = "file:///" + pattern;
-        _filePattern = pattern;
+        this.pattern = "file:///" + pattern;
+        this.filePattern = pattern;
     }
 
     public JarModule[] findJarModules() {
         List ret = new ArrayList();
         URLLister lister = new FileURLLister();
         try {
-            String[] orgs = ResolverHelper.listTokenValues(lister, _pattern, "organisation");
+            String[] orgs = ResolverHelper.listTokenValues(lister, pattern, "organisation");
             for (int i = 0; i < orgs.length; i++) {
-                String orgPattern = IvyPatternHelper.substituteToken(_pattern,
+                String orgPattern = IvyPatternHelper.substituteToken(pattern,
                     IvyPatternHelper.ORGANISATION_KEY, orgs[i]);
                 String[] modules = ResolverHelper.listTokenValues(lister, orgPattern, "module");
                 for (int j = 0; j < modules.length; j++) {
@@ -51,7 +51,7 @@
                         IvyPatternHelper.MODULE_KEY, modules[j]);
                     String[] revs = ResolverHelper.listTokenValues(lister, modPattern, "revision");
                     for (int k = 0; k < revs.length; k++) {
-                        File jar = new File(IvyPatternHelper.substitute(_filePattern, orgs[i],
+                        File jar = new File(IvyPatternHelper.substitute(filePattern, orgs[i],
                             modules[j], revs[k], modules[j], "jar", "jar"));
                         if (jar.exists()) {
                             ret.add(new JarModule(ModuleRevisionId.newInstance(orgs[i], modules[j],

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/RepositoryAnalyser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/RepositoryAnalyser.java?rev=632731&r1=632730&r2=632731&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/RepositoryAnalyser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/tools/analyser/RepositoryAnalyser.java Sun
Mar  2 02:08:29 2008
@@ -46,8 +46,8 @@
 
     public static void main(String[] args) {
         if (args.length != 2) {
-            System.out
-                    .println("usage: ivyanalyser path/to/jarjar.jar absolute-ivy-repository-pattern");
+            System.out.println(
+                "usage: ivyanalyser path/to/jarjar.jar absolute-ivy-repository-pattern");
             return;
         }
         String jarjarLocation = args[0];



Mime
View raw message