You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/10/26 15:33:02 UTC
svn commit: r1189205 -
/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
Author: rmuir
Date: Wed Oct 26 13:33:02 2011
New Revision: 1189205
URL: http://svn.apache.org/viewvc?rev=1189205&view=rev
Log:
LUCENE-3538: removewarnings
Modified:
lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java?rev=1189205&r1=1189204&r2=1189205&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/mutable/MutableValue.java Wed Oct 26 13:33:02 2011
@@ -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 imple
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 imple
@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