This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jxr.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dae521  [JXR-158] StringEntry shouldn't be Comparable
4dae521 is described below

commit 4dae5219cf334cbcda1f727808715b759539c720
Author: rfscholte <[email protected]>
AuthorDate: Sun Apr 18 20:58:31 2021 +0200

    [JXR-158] StringEntry shouldn't be Comparable
---
 .../java/org/apache/maven/jxr/util/StringEntry.java | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java 
b/maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java
index 85b9977..41de66d 100644
--- a/maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java
+++ b/maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java
@@ -23,13 +23,11 @@ package org.apache.maven.jxr.util;
  * A StringEntry represents a value found by the tokenizer. The index is where
  * this StringEntry was found in the source string
  */
-public class StringEntry
-    implements Comparable<StringEntry>
+public final class StringEntry
 {
+    private final String value;
 
-    private String value = null;
-
-    private int index = 0;
+    private final int index;
 
     /**
      * Constructor for the StringEntry object
@@ -60,18 +58,5 @@ public class StringEntry
     {
         return this.value;
     }
-
-    /**
-     * Compare two objects for equality.
-     */
-    @Override
-    public int compareTo( StringEntry se )
-    {
-        //right now only sort by the index.
-
-        return Integer.compare( se.getIndex(), this.getIndex() );
-
-    }
-
 }
 

Reply via email to