Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3624: throw exception for MultiSortedSource instead of returning null

Robert Muir0bd1fcf488e8
diff --git a/lucene/src/java/org/apache/lucene/index/values/IndexDocValues.java b/lucene/src/java/org/apache/lucene/index/values/IndexDocValues.java
index 81896472482..927a8dfb813 100644
--- a/lucene/src/java/org/apache/lucene/index/values/IndexDocValues.java
+++ b/lucene/src/java/org/apache/lucene/index/values/IndexDocValues.java
@@ -210,18 +210,18 @@ public abstract class IndexDocValues implements Closeable {
/**
* Returns the internal array representation iff this {@link Source} uses an
- * array as its inner representation, otherwise <code>null</code>.
+ * array as its inner representation, otherwise <code>UOE</code>.
*/
public Object getArray() {
- return null;
+ throw new UnsupportedOperationException("getArray is not supported");
}
/**
* If this {@link Source} is sorted this method will return an instance of
- * {@link SortedSource} otherwise <code>null</code>
+ * {@link SortedSource} otherwise <code>UOE</code>
*/
public SortedSource asSortedSource() {
- return null;
+ throw new UnsupportedOperationException("asSortedSource is not supported");
}
}