Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3538: removewarnings

Robert Muir8160232d04d8
diff --git a/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java b/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
index e588994499d..fd95d053ccd 100755
--- a/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
+++ b/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
@@ -17,7 +17,7 @@
package org.apache.lucene.util.mutable;
/** @lucene.internal */
-public abstract class MutableValue implements Comparable {
+public abstract class MutableValue implements Comparable<MutableValue> {
public boolean exists = true;
public abstract void copy(MutableValue source);
@@ -30,9 +30,9 @@ public abstract class MutableValue implements Comparable {
return exists;
}
- public int compareTo(Object other) {
- Class c1 = this.getClass();
- Class c2 = other.getClass();
+ public int compareTo(MutableValue other) {
+ Class<? extends MutableValue> c1 = this.getClass();
+ Class<? extends MutableValue> c2 = other.getClass();
if (c1 != c2) {
int c = c1.hashCode() - c2.hashCode();
if (c == 0) {
@@ -45,9 +45,7 @@ public abstract class MutableValue implements Comparable {
@Override
public boolean equals(Object other) {
- Class c1 = this.getClass();
- Class c2 = other.getClass();
- return (c1 == c2) && this.equalsSameType(other);
+ return (getClass() == other.getClass()) && this.equalsSameType(other);
}
@Override