You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by ma...@apache.org on 2007/06/28 09:27:27 UTC

svn commit: r551515 - in /incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest: AbstractLatestStrategy.java ComparatorLatestStrategy.java LatestLexicographicStrategy.java

Author: maartenc
Date: Thu Jun 28 02:27:27 2007
New Revision: 551515

URL: http://svn.apache.org/viewvc?view=rev&rev=551515
Log:
code style

Modified:
    incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/AbstractLatestStrategy.java
    incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/ComparatorLatestStrategy.java
    incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestLexicographicStrategy.java

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/AbstractLatestStrategy.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/AbstractLatestStrategy.java?view=diff&rev=551515&r1=551514&r2=551515
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/AbstractLatestStrategy.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/AbstractLatestStrategy.java Thu Jun 28 02:27:27 2007
@@ -25,28 +25,28 @@
 import org.apache.ivy.plugins.IvyAware;
 
 public abstract class AbstractLatestStrategy implements LatestStrategy, IvyAware {
-    private String _name;
+    private String name;
 
-    private Ivy _ivy;
+    private Ivy ivy;
 
     public Ivy getIvy() {
-        return _ivy;
+        return ivy;
     }
 
     public void setIvy(Ivy ivy) {
-        _ivy = ivy;
+        this.ivy = ivy;
     }
 
     public String getName() {
-        return _name;
+        return name;
     }
 
     public void setName(String name) {
-        _name = name;
+        this.name = name;
     }
 
     public String toString() {
-        return _name;
+        return name;
     }
 
     public ArtifactInfo findLatest(ArtifactInfo[] infos, Date date) {

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/ComparatorLatestStrategy.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/ComparatorLatestStrategy.java?view=diff&rev=551515&r1=551514&r2=551515
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/ComparatorLatestStrategy.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/ComparatorLatestStrategy.java Thu Jun 28 02:27:27 2007
@@ -25,27 +25,27 @@
 
 public class ComparatorLatestStrategy extends AbstractLatestStrategy {
 
-    private Comparator _comparator;
+    private Comparator comparator;
 
     public ComparatorLatestStrategy() {
     }
 
     public ComparatorLatestStrategy(Comparator comparator) {
-        _comparator = comparator;
+        this.comparator = comparator;
     }
 
     public List sort(ArtifactInfo[] infos) {
         List ret = new ArrayList(Arrays.asList(infos));
-        Collections.sort(ret, _comparator);
+        Collections.sort(ret, comparator);
         return ret;
     }
 
     public Comparator getComparator() {
-        return _comparator;
+        return comparator;
     }
 
     public void setComparator(Comparator comparator) {
-        _comparator = comparator;
+        this.comparator = comparator;
     }
 
 }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestLexicographicStrategy.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestLexicographicStrategy.java?view=diff&rev=551515&r1=551514&r2=551515
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestLexicographicStrategy.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/latest/LatestLexicographicStrategy.java Thu Jun 28 02:27:27 2007
@@ -26,7 +26,7 @@
      * assumed to be the greater. If a partial latest is found, then it is assumed to be greater
      * than any matching fixed revision.
      */
-    private static Comparator COMPARATOR = new Comparator() {
+    private static final Comparator COMPARATOR = new Comparator() {
         public int compare(Object o1, Object o2) {
             String rev1 = ((ArtifactInfo) o1).getRevision();
             String rev2 = ((ArtifactInfo) o2).getRevision();