You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2012/06/28 19:52:10 UTC
svn commit: r1355088 [4/8] - in /lucene/dev/branches/branch_4x: ./
dev-tools/ lucene/
lucene/analysis/common/src/java/org/apache/lucene/analysis/cjk/
lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/
lucene/analysis/commo...
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermRangeTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermRangeTermsEnum.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermRangeTermsEnum.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermRangeTermsEnum.java Thu Jun 28 17:51:38 2012
@@ -58,11 +58,9 @@ public class TermRangeTermsEnum extends
* If true, the <code>lowerTerm</code> is included in the range.
* @param includeUpper
* If true, the <code>upperTerm</code> is included in the range.
- *
- * @throws IOException
*/
public TermRangeTermsEnum(TermsEnum tenum, BytesRef lowerTerm, BytesRef upperTerm,
- boolean includeLower, boolean includeUpper) throws IOException {
+ boolean includeLower, boolean includeUpper) {
super(tenum);
// do a little bit of normalization...
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermScorer.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TermScorer.java Thu Jun 28 17:51:38 2012
@@ -39,7 +39,7 @@ final class TermScorer extends Scorer {
* The </code>Similarity.ExactSimScorer</code> implementation
* to be used for score computations.
*/
- TermScorer(Weight weight, DocsEnum td, Similarity.ExactSimScorer docScorer) throws IOException {
+ TermScorer(Weight weight, DocsEnum td, Similarity.ExactSimScorer docScorer) {
super(weight);
this.docScorer = docScorer;
this.docsEnum = td;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java Thu Jun 28 17:51:38 2012
@@ -51,7 +51,7 @@ public abstract class TopFieldCollector
final FieldValueHitQueue<Entry> queue;
public OneComparatorNonScoringCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
this.queue = queue;
comparator = queue.getComparators()[0];
@@ -114,7 +114,7 @@ public abstract class TopFieldCollector
OneComparatorNonScoringCollector {
public OutOfOrderOneComparatorNonScoringCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -161,7 +161,7 @@ public abstract class TopFieldCollector
Scorer scorer;
public OneComparatorScoringNoMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -221,8 +221,7 @@ public abstract class TopFieldCollector
OneComparatorScoringNoMaxScoreCollector {
public OutOfOrderOneComparatorScoringNoMaxScoreCollector(
- FieldValueHitQueue<Entry> queue, int numHits, boolean fillFields)
- throws IOException {
+ FieldValueHitQueue<Entry> queue, int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -275,7 +274,7 @@ public abstract class TopFieldCollector
Scorer scorer;
public OneComparatorScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
// Must set maxScore to NEG_INF, or otherwise Math.max always returns NaN.
maxScore = Float.NEGATIVE_INFINITY;
@@ -335,7 +334,7 @@ public abstract class TopFieldCollector
OneComparatorScoringMaxScoreCollector {
public OutOfOrderOneComparatorScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -386,7 +385,7 @@ public abstract class TopFieldCollector
final int[] reverseMul;
final FieldValueHitQueue<Entry> queue;
public MultiComparatorNonScoringCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
this.queue = queue;
comparators = queue.getComparators();
@@ -472,7 +471,7 @@ public abstract class TopFieldCollector
MultiComparatorNonScoringCollector {
public OutOfOrderMultiComparatorNonScoringCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -541,7 +540,7 @@ public abstract class TopFieldCollector
Scorer scorer;
public MultiComparatorScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
// Must set maxScore to NEG_INF, or otherwise Math.max always returns NaN.
maxScore = Float.NEGATIVE_INFINITY;
@@ -620,7 +619,7 @@ public abstract class TopFieldCollector
extends MultiComparatorScoringMaxScoreCollector {
public OutOfOrderMultiComparatorScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -693,7 +692,7 @@ public abstract class TopFieldCollector
Scorer scorer;
public MultiComparatorScoringNoMaxScoreCollector(FieldValueHitQueue<Entry> queue,
- int numHits, boolean fillFields) throws IOException {
+ int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -771,8 +770,7 @@ public abstract class TopFieldCollector
extends MultiComparatorScoringNoMaxScoreCollector {
public OutOfOrderMultiComparatorScoringNoMaxScoreCollector(
- FieldValueHitQueue<Entry> queue, int numHits, boolean fillFields)
- throws IOException {
+ FieldValueHitQueue<Entry> queue, int numHits, boolean fillFields) {
super(queue, numHits, fillFields);
}
@@ -860,8 +858,7 @@ public abstract class TopFieldCollector
public PagingFieldCollector(
FieldValueHitQueue<Entry> queue, FieldDoc after, int numHits, boolean fillFields,
- boolean trackDocScores, boolean trackMaxScore)
- throws IOException {
+ boolean trackDocScores, boolean trackMaxScore) {
super(queue, numHits, fillFields);
this.queue = queue;
this.trackDocScores = trackDocScores;
@@ -981,7 +978,7 @@ public abstract class TopFieldCollector
}
@Override
- public void setScorer(Scorer scorer) throws IOException {
+ public void setScorer(Scorer scorer) {
this.scorer = scorer;
for (int i = 0; i < comparators.length; i++) {
comparators[i].setScorer(scorer);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopTermsRewrite.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopTermsRewrite.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopTermsRewrite.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/TopTermsRewrite.java Thu Jun 28 17:51:38 2012
@@ -75,7 +75,7 @@ public abstract class TopTermsRewrite<Q
private ScoreTerm st;
@Override
- public void setNextEnum(TermsEnum termsEnum) throws IOException {
+ public void setNextEnum(TermsEnum termsEnum) {
this.termsEnum = termsEnum;
this.termComp = termsEnum.getComparator();
@@ -89,7 +89,7 @@ public abstract class TopTermsRewrite<Q
// for assert:
private BytesRef lastTerm;
- private boolean compareToLastTerm(BytesRef t) throws IOException {
+ private boolean compareToLastTerm(BytesRef t) {
if (lastTerm == null && t != null) {
lastTerm = BytesRef.deepCopyOf(t);
} else if (t == null) {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java Thu Jun 28 17:51:38 2012
@@ -285,7 +285,7 @@ public class NearSpansUnordered extends
}
}
- private void addToList(SpansCell cell) throws IOException {
+ private void addToList(SpansCell cell) {
if (last != null) { // add next to end of list
last.next = cell;
} else
@@ -301,7 +301,7 @@ public class NearSpansUnordered extends
last.next = null;
}
- private void queueToList() throws IOException {
+ private void queueToList() {
last = first = null;
while (queue.top() != null) {
addToList(queue.pop());
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/TermSpans.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/TermSpans.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/TermSpans.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/search/spans/TermSpans.java Thu Jun 28 17:51:38 2012
@@ -37,7 +37,7 @@ public class TermSpans extends Spans {
protected int count;
protected int position;
- public TermSpans(DocsAndPositionsEnum postings, Term term) throws IOException {
+ public TermSpans(DocsAndPositionsEnum postings, Term term) {
this.postings = postings;
this.term = term;
doc = -1;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileDirectory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileDirectory.java Thu Jun 28 17:51:38 2012
@@ -337,7 +337,7 @@ public final class CompoundFileDirectory
}
@Override
- public void sync(Collection<String> names) throws IOException {
+ public void sync(Collection<String> names) {
throw new UnsupportedOperationException();
}
@@ -360,7 +360,7 @@ public final class CompoundFileDirectory
}
return new IndexInputSlicer() {
@Override
- public void close() throws IOException {
+ public void close() {
}
@Override
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java Thu Jun 28 17:51:38 2012
@@ -31,7 +31,6 @@ import java.util.concurrent.atomic.Atomi
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.index.IndexFileNames;
-import org.apache.lucene.index.MergePolicy.MergeAbortedException;
import org.apache.lucene.util.IOUtils;
/**
@@ -84,7 +83,7 @@ final class CompoundFileWriter implement
* @throws NullPointerException
* if <code>dir</code> or <code>name</code> is null
*/
- CompoundFileWriter(Directory dir, String name) throws IOException {
+ CompoundFileWriter(Directory dir, String name) {
if (dir == null)
throw new NullPointerException("directory cannot be null");
if (name == null)
@@ -180,7 +179,7 @@ final class CompoundFileWriter implement
* output stream.
*/
private final long copyFileEntry(IndexOutput dataOut, FileEntry fileEntry)
- throws IOException, MergeAbortedException {
+ throws IOException {
final IndexInput is = fileEntry.dir.openInput(fileEntry.file, IOContext.READONCE);
boolean success = false;
try {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Directory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Directory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Directory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Directory.java Thu Jun 28 17:51:38 2012
@@ -230,7 +230,7 @@ public abstract class Directory implemen
base.close();
}
@Override
- public IndexInput openFullSlice() throws IOException {
+ public IndexInput openFullSlice() {
return (IndexInput) base.clone();
}
};
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Lock.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Lock.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Lock.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/Lock.java Thu Jun 28 17:51:38 2012
@@ -67,7 +67,7 @@ public abstract class Lock {
* out of bounds
* @throws IOException if obtain() throws IOException
*/
- public boolean obtain(long lockWaitTimeout) throws LockObtainFailedException, IOException {
+ public boolean obtain(long lockWaitTimeout) throws IOException {
failureReason = null;
boolean locked = obtain();
if (lockWaitTimeout < 0 && lockWaitTimeout != LOCK_OBTAIN_WAIT_FOREVER)
@@ -128,7 +128,7 @@ public abstract class Lock {
* be obtained
* @throws IOException if {@link Lock#obtain} throws IOException
*/
- public Object run() throws LockObtainFailedException, IOException {
+ public Object run() throws IOException {
boolean locked = false;
try {
locked = lock.obtain(lockWaitTimeout);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java Thu Jun 28 17:51:38 2012
@@ -94,13 +94,13 @@ public class NIOFSDirectory extends FSDi
}
@Override
- public IndexInput openSlice(String sliceDescription, long offset, long length) throws IOException {
+ public IndexInput openSlice(String sliceDescription, long offset, long length) {
return new NIOFSIndexInput(sliceDescription, path, descriptor, descriptor.getChannel(), offset,
length, BufferedIndexInput.bufferSize(context), getReadChunkSize());
}
@Override
- public IndexInput openFullSlice() throws IOException {
+ public IndexInput openFullSlice() {
return openSlice("full-slice", 0, descriptor.length);
}
};
@@ -117,7 +117,7 @@ public class NIOFSDirectory extends FSDi
channel = file.getChannel();
}
- public NIOFSIndexInput(String sliceDescription, File path, Descriptor file, FileChannel fc, long off, long length, int bufferSize, int chunkSize) throws IOException {
+ public NIOFSIndexInput(String sliceDescription, File path, Descriptor file, FileChannel fc, long off, long length, int bufferSize, int chunkSize) {
super("NIOFSIndexInput(" + sliceDescription + " in path=\"" + path + "\" slice=" + off + ":" + (off+length) + ")", file, off, length, bufferSize, chunkSize);
channel = fc;
isClone = true;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java Thu Jun 28 17:51:38 2012
@@ -63,7 +63,7 @@ public class NativeFSLockFactory extends
* directory itself. Be sure to create one instance for each directory
* your create!
*/
- public NativeFSLockFactory() throws IOException {
+ public NativeFSLockFactory() {
this((File) null);
}
@@ -73,7 +73,7 @@ public class NativeFSLockFactory extends
*
* @param lockDirName where lock files are created.
*/
- public NativeFSLockFactory(String lockDirName) throws IOException {
+ public NativeFSLockFactory(String lockDirName) {
this(new File(lockDirName));
}
@@ -83,7 +83,7 @@ public class NativeFSLockFactory extends
*
* @param lockDir where lock files are created.
*/
- public NativeFSLockFactory(File lockDir) throws IOException {
+ public NativeFSLockFactory(File lockDir) {
setLockDir(lockDir);
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java Thu Jun 28 17:51:38 2012
@@ -147,7 +147,7 @@ public class RAMOutputStream extends Ind
}
}
- private final void switchCurrentBuffer() throws IOException {
+ private final void switchCurrentBuffer() {
if (currentBufferIndex == file.numBuffers()) {
currentBuffer = file.addBuffer(BUFFER_SIZE);
} else {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java Thu Jun 28 17:51:38 2012
@@ -73,13 +73,13 @@ public class SimpleFSDirectory extends F
}
@Override
- public IndexInput openSlice(String sliceDescription, long offset, long length) throws IOException {
+ public IndexInput openSlice(String sliceDescription, long offset, long length) {
return new SimpleFSIndexInput("SimpleFSIndexInput(" + sliceDescription + " in path=\"" + file.getPath() + "\" slice=" + offset + ":" + (offset+length) + ")", descriptor, offset,
length, BufferedIndexInput.bufferSize(context), getReadChunkSize());
}
@Override
- public IndexInput openFullSlice() throws IOException {
+ public IndexInput openFullSlice() {
return openSlice("full-slice", 0, descriptor.length);
}
};
@@ -124,7 +124,7 @@ public class SimpleFSDirectory extends F
this.end = file.length;
}
- public SimpleFSIndexInput(String resourceDesc, Descriptor file, long off, long length, int bufferSize, int chunkSize) throws IOException {
+ public SimpleFSIndexInput(String resourceDesc, Descriptor file, long off, long length, int bufferSize, int chunkSize) {
super(resourceDesc, bufferSize);
this.file = file;
this.chunkSize = chunkSize;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java Thu Jun 28 17:51:38 2012
@@ -60,7 +60,7 @@ public class SimpleFSLockFactory extends
* directory itself. Be sure to create one instance for each directory
* your create!
*/
- public SimpleFSLockFactory() throws IOException {
+ public SimpleFSLockFactory() {
this((File) null);
}
@@ -68,7 +68,7 @@ public class SimpleFSLockFactory extends
* Instantiate using the provided directory (as a File instance).
* @param lockDir where lock files should be created.
*/
- public SimpleFSLockFactory(File lockDir) throws IOException {
+ public SimpleFSLockFactory(File lockDir) {
setLockDir(lockDir);
}
@@ -76,7 +76,7 @@ public class SimpleFSLockFactory extends
* Instantiate using the provided directory name (String).
* @param lockDirName where lock files should be created.
*/
- public SimpleFSLockFactory(String lockDirName) throws IOException {
+ public SimpleFSLockFactory(String lockDirName) {
setLockDir(new File(lockDirName));
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java Thu Jun 28 17:51:38 2012
@@ -69,8 +69,7 @@ public class VerifyingLockFactory extend
}
@Override
- public synchronized boolean obtain(long lockWaitTimeout)
- throws LockObtainFailedException, IOException {
+ public synchronized boolean obtain(long lockWaitTimeout) throws IOException {
boolean obtained = lock.obtain(lockWaitTimeout);
if (obtained)
verify((byte) 1);
@@ -78,8 +77,7 @@ public class VerifyingLockFactory extend
}
@Override
- public synchronized boolean obtain()
- throws LockObtainFailedException, IOException {
+ public synchronized boolean obtain() throws IOException {
return lock.obtain();
}
@@ -105,7 +103,7 @@ public class VerifyingLockFactory extend
* @param port the port {@link LockVerifyServer} is
listening on
*/
- public VerifyingLockFactory(byte id, LockFactory lf, String host, int port) throws IOException {
+ public VerifyingLockFactory(byte id, LockFactory lf, String host, int port) {
this.id = id;
this.lf = lf;
this.host = host;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/BytesRefIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/BytesRefIterator.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/BytesRefIterator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/BytesRefIterator.java Thu Jun 28 17:51:38 2012
@@ -50,7 +50,7 @@ public interface BytesRefIterator {
public static final BytesRefIterator EMPTY = new BytesRefIterator() {
@Override
- public BytesRef next() throws IOException {
+ public BytesRef next() {
return null;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/PagedBytes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/PagedBytes.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/PagedBytes.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/PagedBytes.java Thu Jun 28 17:51:38 2012
@@ -288,7 +288,7 @@ public final class PagedBytes {
}
/** Copy BytesRef in */
- public void copy(BytesRef bytes) throws IOException {
+ public void copy(BytesRef bytes) {
int byteCount = bytes.length;
int bytesUpto = bytes.offset;
while (byteCount > 0) {
@@ -318,7 +318,7 @@ public final class PagedBytes {
/** Copy BytesRef in, setting BytesRef out to the result.
* Do not use this if you will use freeze(true).
* This only supports bytes.length <= blockSize */
- public void copy(BytesRef bytes, BytesRef out) throws IOException {
+ public void copy(BytesRef bytes, BytesRef out) {
int left = blockSize - upto;
if (bytes.length > left || currentBlock==null) {
if (currentBlock != null) {
@@ -374,7 +374,7 @@ public final class PagedBytes {
/** Copy bytes in, writing the length as a 1 or 2 byte
* vInt prefix. */
- public long copyUsingLengthPrefix(BytesRef bytes) throws IOException {
+ public long copyUsingLengthPrefix(BytesRef bytes) {
if (bytes.length >= 32768) {
throw new IllegalArgumentException("max length is 32767 (got " + bytes.length + ")");
}
@@ -488,7 +488,7 @@ public final class PagedBytes {
}
@Override
- public void writeBytes(byte[] b, int offset, int length) throws IOException {
+ public void writeBytes(byte[] b, int offset, int length) {
assert b.length >= offset + length;
if (length == 0) {
return;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/DirectPackedReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/DirectPackedReader.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/DirectPackedReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/DirectPackedReader.java Thu Jun 28 17:51:38 2012
@@ -32,8 +32,7 @@ final class DirectPackedReader extends P
// masks[n-1] masks for bottom n bits
private final long[] masks;
- public DirectPackedReader(int bitsPerValue, int valueCount, IndexInput in)
- throws IOException {
+ public DirectPackedReader(int bitsPerValue, int valueCount, IndexInput in) {
super(valueCount, bitsPerValue);
this.in = in;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlockReaderIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlockReaderIterator.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlockReaderIterator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlockReaderIterator.java Thu Jun 28 17:51:38 2012
@@ -29,8 +29,7 @@ final class Packed64SingleBlockReaderIte
private final long mask;
private int position;
- Packed64SingleBlockReaderIterator(int valueCount, int bitsPerValue, IndexInput in)
- throws IOException {
+ Packed64SingleBlockReaderIterator(int valueCount, int bitsPerValue, IndexInput in) {
super(valueCount, bitsPerValue, in);
pending = 0;
shift = 64;
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java Thu Jun 28 17:51:38 2012
@@ -29,8 +29,7 @@ final class PackedReaderIterator extends
// masks[n-1] masks for bottom n bits
private final long[] masks;
- public PackedReaderIterator(int valueCount, int bitsPerValue, IndexInput in)
- throws IOException {
+ public PackedReaderIterator(int valueCount, int bitsPerValue, IndexInput in) {
super(valueCount, bitsPerValue, in);
masks = new long[bitsPerValue];
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java Thu Jun 28 17:51:38 2012
@@ -22,7 +22,6 @@ import org.apache.lucene.util.LuceneTest
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.store.RAMDirectory;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.LogMergePolicy;
@@ -47,7 +46,7 @@ public class TestMergeSchedulerExternal
private class MyMergeScheduler extends ConcurrentMergeScheduler {
private class MyMergeThread extends ConcurrentMergeScheduler.MergeThread {
- public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException {
+ public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) {
super(writer, merge);
mergeThreadCreated = true;
}
@@ -114,7 +113,7 @@ public class TestMergeSchedulerExternal
private static class ReportingMergeScheduler extends MergeScheduler {
@Override
- public void merge(IndexWriter writer) throws CorruptIndexException, IOException {
+ public void merge(IndexWriter writer) throws IOException {
OneMerge merge = null;
while ((merge = writer.getNextMerge()) != null) {
if (VERBOSE) {
@@ -125,7 +124,7 @@ public class TestMergeSchedulerExternal
}
@Override
- public void close() throws CorruptIndexException, IOException {}
+ public void close() throws IOException {}
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java Thu Jun 28 17:51:38 2012
@@ -45,7 +45,7 @@ public class TestCachingTokenFilter exte
private OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (index == tokens.length) {
return false;
} else {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java Thu Jun 28 17:51:38 2012
@@ -30,7 +30,6 @@ import org.apache.lucene.document.Docume
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;
import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
@@ -189,7 +188,7 @@ public class TestPerFieldPostingsFormat
}
public void assertQuery(Term t, Directory dir, int num)
- throws CorruptIndexException, IOException {
+ throws IOException {
if (VERBOSE) {
System.out.println("\nTEST: assertQuery " + t);
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/BinaryTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/BinaryTokenStream.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/BinaryTokenStream.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/BinaryTokenStream.java Thu Jun 28 17:51:38 2012
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
* limitations under the License.
*/
-import java.io.IOException;
-
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
import org.apache.lucene.util.AttributeImpl;
@@ -36,7 +34,7 @@ public final class BinaryTokenStream ext
}
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (available) {
available = false;
return true;
@@ -45,7 +43,7 @@ public final class BinaryTokenStream ext
}
@Override
- public void reset() throws IOException {
+ public void reset() {
available = true;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/Test2BPostings.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/Test2BPostings.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/Test2BPostings.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/Test2BPostings.java Thu Jun 28 17:51:38 2012
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
* limitations under the License.
*/
-import java.io.IOException;
-
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
@@ -94,7 +92,7 @@ public class Test2BPostings extends Luce
}
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (index <= 'z') {
buffer[0] = (char) index++;
return true;
@@ -103,7 +101,7 @@ public class Test2BPostings extends Luce
}
@Override
- public void reset() throws IOException {
+ public void reset() {
index = 'a';
}
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java Thu Jun 28 17:51:38 2012
@@ -77,7 +77,7 @@ public class TestCodecs extends LuceneTe
private final static int TERM_DOC_FREQ_RAND = 20;
@BeforeClass
- public static void beforeClass() throws Exception {
+ public static void beforeClass() {
NUM_TEST_ITER = atLeast(20);
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java Thu Jun 28 17:51:38 2012
@@ -44,7 +44,7 @@ import org.apache.lucene.util._TestUtil;
public class TestDeletionPolicy extends LuceneTestCase {
- private void verifyCommitOrder(List<? extends IndexCommit> commits) throws IOException {
+ private void verifyCommitOrder(List<? extends IndexCommit> commits) {
final IndexCommit firstCommit = commits.get(0);
long last = SegmentInfos.generationFromSegmentsFileName(firstCommit.getSegmentsFileName());
assertEquals(last, firstCommit.getGeneration());
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java Thu Jun 28 17:51:38 2012
@@ -39,7 +39,6 @@ import org.apache.lucene.index.IndexWrit
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.FieldCache;
import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.store.NoSuchDirectoryException;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
@@ -1003,7 +1002,7 @@ public void testFilesOpenClose() throws
dir.close();
}
- public void testTryIncRef() throws CorruptIndexException, LockObtainFailedException, IOException {
+ public void testTryIncRef() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
writer.addDocument(new Document());
@@ -1017,7 +1016,7 @@ public void testFilesOpenClose() throws
dir.close();
}
- public void testStressTryIncRef() throws CorruptIndexException, LockObtainFailedException, IOException, InterruptedException {
+ public void testStressTryIncRef() throws IOException, InterruptedException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
writer.addDocument(new Document());
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesIndexing.java Thu Jun 28 17:51:38 2012
@@ -18,8 +18,17 @@ package org.apache.lucene.index;
*/
import java.io.Closeable;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Set;
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.codecs.Codec;
@@ -40,9 +49,14 @@ import org.apache.lucene.document.TextFi
import org.apache.lucene.index.DocValues.SortedSource;
import org.apache.lucene.index.DocValues.Source;
import org.apache.lucene.index.DocValues.Type;
-import org.apache.lucene.search.*;
+import org.apache.lucene.search.BooleanClause;
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.lucene.search.DocIdSetIterator;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.ScoreDoc;
+import org.apache.lucene.search.TermQuery;
+import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefHash;
import org.apache.lucene.util.FixedBitSet;
@@ -65,7 +79,7 @@ public class TestDocValuesIndexing exten
/*
* Simple test case to show how to use the API
*/
- public void testDocValuesSimple() throws CorruptIndexException, IOException {
+ public void testDocValuesSimple() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, writerConfig(false));
for (int i = 0; i < 5; i++) {
@@ -360,7 +374,7 @@ public class TestDocValuesIndexing exten
}
public void runTestIndexBytes(IndexWriterConfig cfg, boolean withDeletions)
- throws CorruptIndexException, LockObtainFailedException, IOException {
+ throws IOException {
final Directory d = newDirectory();
IndexWriter w = new IndexWriter(d, cfg);
final List<Type> byteVariantList = new ArrayList<Type>(BYTES);
@@ -446,7 +460,7 @@ public class TestDocValuesIndexing exten
d.close();
}
- public void testGetArrayNumerics() throws CorruptIndexException, IOException {
+ public void testGetArrayNumerics() throws IOException {
Directory d = newDirectory();
IndexWriterConfig cfg = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
IndexWriter w = new IndexWriter(d, cfg);
@@ -528,7 +542,7 @@ public class TestDocValuesIndexing exten
d.close();
}
- public void testGetArrayBytes() throws CorruptIndexException, IOException {
+ public void testGetArrayBytes() throws IOException {
Directory d = newDirectory();
IndexWriterConfig cfg = newIndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random()));
@@ -599,7 +613,7 @@ public class TestDocValuesIndexing exten
private FixedBitSet indexValues(IndexWriter w, int numValues, Type valueType,
List<Type> valueVarList, boolean withDeletions, int bytesSize)
- throws CorruptIndexException, IOException {
+ throws IOException {
final boolean isNumeric = NUMERICS.contains(valueType);
FixedBitSet deleted = new FixedBitSet(numValues);
Document doc = new Document();
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesTypeCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesTypeCompatibility.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesTypeCompatibility.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocValuesTypeCompatibility.java Thu Jun 28 17:51:38 2012
@@ -33,7 +33,6 @@ import org.apache.lucene.document.Sorted
import org.apache.lucene.document.StraightBytesDocValuesField;
import org.apache.lucene.index.DocValues.Type;
import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
@@ -44,8 +43,7 @@ import org.apache.lucene.util.LuceneTest
@SuppressCodecs("Lucene3x")
public class TestDocValuesTypeCompatibility extends LuceneTestCase {
- public void testAddCompatibleIntTypes() throws CorruptIndexException,
- LockObtainFailedException, IOException {
+ public void testAddCompatibleIntTypes() throws IOException {
int numIter = atLeast(10);
for (int i = 0; i < numIter; i++) {
Directory dir = newDirectory();
@@ -99,8 +97,7 @@ public class TestDocValuesTypeCompatibil
}
}
- public void testAddCompatibleDoubleTypes() throws CorruptIndexException,
- LockObtainFailedException, IOException {
+ public void testAddCompatibleDoubleTypes() throws IOException {
int numIter = atLeast(10);
for (int i = 0; i < numIter; i++) {
Directory dir = newDirectory();
@@ -153,8 +150,7 @@ public class TestDocValuesTypeCompatibil
}
}
- public void testAddCompatibleDoubleTypes2() throws CorruptIndexException,
- LockObtainFailedException, IOException {
+ public void testAddCompatibleDoubleTypes2() throws IOException {
int numIter = atLeast(10);
for (int i = 0; i < numIter; i++) {
Directory dir = newDirectory();
@@ -185,8 +181,7 @@ public class TestDocValuesTypeCompatibil
}
- public void testAddCompatibleByteTypes() throws CorruptIndexException,
- LockObtainFailedException, IOException {
+ public void testAddCompatibleByteTypes() throws IOException {
int numIter = atLeast(10);
for (int i = 0; i < numIter; i++) {
Directory dir = newDirectory();
@@ -264,7 +259,7 @@ public class TestDocValuesTypeCompatibil
}
private void addDoc(IndexWriter writer, IndexableField... fields)
- throws CorruptIndexException, IOException {
+ throws IOException {
Document doc = new Document();
for (IndexableField indexableField : fields) {
doc.add(indexableField);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocumentWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocumentWriter.java Thu Jun 28 17:51:38 2012
@@ -226,7 +226,7 @@ public class TestDocumentWriter extends
private CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (index == tokens.length) {
return false;
} else {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFieldsReader.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFieldsReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFieldsReader.java Thu Jun 28 17:51:38 2012
@@ -115,7 +115,7 @@ public class TestFieldsReader extends Lu
Directory fsDir;
- public FaultyFSDirectory(File dir) throws IOException {
+ public FaultyFSDirectory(File dir) {
fsDir = newFSDirectory(dir);
lockFactory = fsDir.getLockFactory();
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFilterAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFilterAtomicReader.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFilterAtomicReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFilterAtomicReader.java Thu Jun 28 17:51:38 2012
@@ -175,7 +175,7 @@ public class TestFilterAtomicReader exte
target.close();
}
- private void checkOverrideMethods(Class<?> clazz) throws Exception {
+ private void checkOverrideMethods(Class<?> clazz) {
boolean fail = false;
for (Method m : clazz.getMethods()) {
int mods = m.getModifiers();
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFlushByRamOrCountsPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFlushByRamOrCountsPolicy.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFlushByRamOrCountsPolicy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestFlushByRamOrCountsPolicy.java Thu Jun 28 17:51:38 2012
@@ -26,7 +26,6 @@ import org.apache.lucene.analysis.MockAn
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DocumentsWriterPerThreadPool.ThreadState;
import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.util.LineFileDocs;
import org.apache.lucene.util.LuceneTestCase;
@@ -48,22 +47,19 @@ public class TestFlushByRamOrCountsPolic
lineDocFile = null;
}
- public void testFlushByRam() throws CorruptIndexException,
- LockObtainFailedException, IOException, InterruptedException {
+ public void testFlushByRam() throws IOException, InterruptedException {
final double ramBuffer = (TEST_NIGHTLY ? 1 : 10) + atLeast(2)
+ random().nextDouble();
runFlushByRam(1 + random().nextInt(TEST_NIGHTLY ? 5 : 1), ramBuffer, false);
}
- public void testFlushByRamLargeBuffer() throws CorruptIndexException,
- LockObtainFailedException, IOException, InterruptedException {
+ public void testFlushByRamLargeBuffer() throws IOException, InterruptedException {
// with a 256 mb ram buffer we should never stall
runFlushByRam(1 + random().nextInt(TEST_NIGHTLY ? 5 : 1), 256.d, true);
}
protected void runFlushByRam(int numThreads, double maxRamMB,
- boolean ensureNotStalled) throws IOException, CorruptIndexException,
- LockObtainFailedException, InterruptedException {
+ boolean ensureNotStalled) throws IOException, InterruptedException {
final int numDocumentsToIndex = 10 + atLeast(30);
AtomicInteger numDocs = new AtomicInteger(numDocumentsToIndex);
Directory dir = newDirectory();
@@ -116,8 +112,7 @@ public class TestFlushByRamOrCountsPolic
dir.close();
}
- public void testFlushDocCount() throws CorruptIndexException,
- LockObtainFailedException, IOException, InterruptedException {
+ public void testFlushDocCount() throws IOException, InterruptedException {
int[] numThreads = new int[] { 2 + atLeast(1), 1 };
for (int i = 0; i < numThreads.length; i++) {
@@ -230,8 +225,7 @@ public class TestFlushByRamOrCountsPolic
dir.close();
}
- public void testStallControl() throws InterruptedException,
- CorruptIndexException, LockObtainFailedException, IOException {
+ public void testStallControl() throws InterruptedException, IOException {
int[] numThreads = new int[] { 4 + random().nextInt(8), 1 };
final int numDocumentsToIndex = 50 + random().nextInt(50);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestForceMergeForever.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestForceMergeForever.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestForceMergeForever.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestForceMergeForever.java Thu Jun 28 17:51:38 2012
@@ -40,7 +40,7 @@ public class TestForceMergeForever exten
}
@Override
- public void merge(MergePolicy.OneMerge merge) throws CorruptIndexException, IOException {
+ public void merge(MergePolicy.OneMerge merge) throws IOException {
if (merge.maxNumSegments != -1 && (first || merge.segments.size() == 1)) {
first = false;
if (VERBOSE) {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexCommit.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexCommit.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexCommit.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexCommit.java Thu Jun 28 17:51:38 2012
@@ -17,7 +17,6 @@ package org.apache.lucene.index;
* limitations under the License.
*/
-import java.io.IOException;
import java.util.Collection;
import java.util.Map;
@@ -35,10 +34,10 @@ public class TestIndexCommit extends Luc
IndexCommit ic1 = new IndexCommit() {
@Override public String getSegmentsFileName() { return "a"; }
@Override public Directory getDirectory() { return dir; }
- @Override public Collection<String> getFileNames() throws IOException { return null; }
+ @Override public Collection<String> getFileNames() { return null; }
@Override public void delete() {}
@Override public long getGeneration() { return 0; }
- @Override public Map<String, String> getUserData() throws IOException { return null; }
+ @Override public Map<String, String> getUserData() { return null; }
@Override public boolean isDeleted() { return false; }
@Override public int getSegmentCount() { return 2; }
};
@@ -46,10 +45,10 @@ public class TestIndexCommit extends Luc
IndexCommit ic2 = new IndexCommit() {
@Override public String getSegmentsFileName() { return "b"; }
@Override public Directory getDirectory() { return dir; }
- @Override public Collection<String> getFileNames() throws IOException { return null; }
+ @Override public Collection<String> getFileNames() { return null; }
@Override public void delete() {}
@Override public long getGeneration() { return 0; }
- @Override public Map<String, String> getUserData() throws IOException { return null; }
+ @Override public Map<String, String> getUserData() { return null; }
@Override public boolean isDeleted() { return false; }
@Override public int getSegmentCount() { return 2; }
};
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Thu Jun 28 17:51:38 2012
@@ -820,7 +820,7 @@ public class TestIndexWriter extends Luc
}
@Override
- protected void doBeforeFlush() throws IOException {
+ protected void doBeforeFlush() {
beforeWasCalled = true;
}
}
@@ -1527,7 +1527,7 @@ public class TestIndexWriter extends Luc
}
@Override
- public final boolean incrementToken() throws IOException {
+ public final boolean incrementToken() {
clearAttributes();
if (upto < tokens.length) {
termAtt.setEmpty();
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java Thu Jun 28 17:51:38 2012
@@ -983,7 +983,7 @@ public class TestIndexWriterExceptions e
}
@Override
- public void close() throws IOException {}
+ public void close() {}
}));
try {
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java Thu Jun 28 17:51:38 2012
@@ -227,7 +227,7 @@ public class TestIndexWriterMergePolicy
writer.addDocument(doc);
}
- private void checkInvariants(IndexWriter writer) throws IOException {
+ private void checkInvariants(IndexWriter writer) {
writer.waitForMerges();
int maxBufferedDocs = writer.getConfig().getMaxBufferedDocs();
int mergeFactor = ((LogMergePolicy) writer.getConfig().getMergePolicy()).getMergeFactor();
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java Thu Jun 28 17:51:38 2012
@@ -312,7 +312,7 @@ public class TestIndexWriterMerging exte
private class MyMergeScheduler extends MergeScheduler {
@Override
synchronized public void merge(IndexWriter writer)
- throws CorruptIndexException, IOException {
+ throws IOException {
while(true) {
MergePolicy.OneMerge merge = writer.getNextMerge();
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java Thu Jun 28 17:51:38 2012
@@ -25,7 +25,6 @@ import org.apache.lucene.document.Docume
import org.apache.lucene.document.Field;
import org.apache.lucene.document.TextField;
import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.LuceneTestCase;
@@ -36,8 +35,8 @@ public class TestIndexWriterNRTIsCurrent
volatile boolean stop = false;
}
- public void testIsCurrentWithThreads() throws CorruptIndexException,
- LockObtainFailedException, IOException, InterruptedException {
+ public void testIsCurrentWithThreads() throws
+ IOException, InterruptedException {
Directory dir = newDirectory();
IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random()));
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestNorms.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestNorms.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestNorms.java Thu Jun 28 17:51:38 2012
@@ -175,8 +175,7 @@ public class TestNorms extends LuceneTes
otherDir.close();
}
- public void buildIndex(Directory dir, boolean writeNorms) throws IOException,
- CorruptIndexException {
+ public void buildIndex(Directory dir, boolean writeNorms) throws IOException {
Random random = random();
IndexWriterConfig config = newIndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random()));
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java Thu Jun 28 17:51:38 2012
@@ -50,7 +50,7 @@ public class TestPayloadProcessorProvide
}
@Override
- public ReaderPayloadProcessor getReaderProcessor(AtomicReader reader) throws IOException {
+ public ReaderPayloadProcessor getReaderProcessor(AtomicReader reader) {
if (reader instanceof SegmentReader) {
return processors.get(((SegmentReader) reader).directory());
} else {
@@ -63,7 +63,7 @@ public class TestPayloadProcessorProvide
private static final class PerTermPayloadProcessor extends ReaderPayloadProcessor {
@Override
- public PayloadProcessor getProcessor(String field, BytesRef text) throws IOException {
+ public PayloadProcessor getProcessor(String field, BytesRef text) {
// don't process payloads of terms other than "p:p1"
if (!field.equals("p") || !text.bytesEquals(new BytesRef("p1"))) {
return null;
@@ -79,7 +79,7 @@ public class TestPayloadProcessorProvide
private static final class DeletePayloadProcessor extends PayloadProcessor {
@Override
- public void processPayload(BytesRef payload) throws IOException {
+ public void processPayload(BytesRef payload) {
payload.length = 0;
}
@@ -98,7 +98,7 @@ public class TestPayloadProcessorProvide
}
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (called) {
return false;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java Thu Jun 28 17:51:38 2012
@@ -258,7 +258,7 @@ public class TestPerSegmentDeletes exten
@Override
public MergeSpecification findMerges(SegmentInfos segmentInfos)
- throws CorruptIndexException, IOException {
+ throws IOException {
MergeSpecification ms = new MergeSpecification();
if (doMerge) {
OneMerge om = new OneMerge(segmentInfos.asList().subList(start, start + length));
@@ -272,13 +272,13 @@ public class TestPerSegmentDeletes exten
@Override
public MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
int maxSegmentCount, Map<SegmentInfoPerCommit,Boolean> segmentsToMerge)
- throws CorruptIndexException, IOException {
+ throws IOException {
return null;
}
@Override
public MergeSpecification findForcedDeletesMerges(
- SegmentInfos segmentInfos) throws CorruptIndexException, IOException {
+ SegmentInfos segmentInfos) throws IOException {
return null;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSameTokenSamePosition.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSameTokenSamePosition.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSameTokenSamePosition.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSameTokenSamePosition.java Thu Jun 28 17:51:38 2012
@@ -72,7 +72,7 @@ final class BugReproTokenStream extends
private final int incs[] = new int[]{1, 0, 1, 0};
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (nextTokenIndex < tokenCount) {
termAtt.setEmpty().append(terms[nextTokenIndex]);
offsetAtt.setOffset(starts[nextTokenIndex], ends[nextTokenIndex]);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java Thu Jun 28 17:51:38 2012
@@ -43,7 +43,7 @@ public class TestSizeBoundedForceMerge e
writer.commit();
}
- private static IndexWriterConfig newWriterConfig() throws IOException {
+ private static IndexWriterConfig newWriterConfig() {
IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, null);
conf.setMaxBufferedDocs(IndexWriterConfig.DISABLE_AUTO_FLUSH);
conf.setRAMBufferSizeMB(IndexWriterConfig.DEFAULT_RAM_BUFFER_SIZE_MB);
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTypePromotion.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTypePromotion.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTypePromotion.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestTypePromotion.java Thu Jun 28 17:51:38 2012
@@ -70,8 +70,7 @@ public class TestTypePromotion extends L
Int, Float, Byte
}
- private void runTest(EnumSet<Type> types, TestType type)
- throws CorruptIndexException, IOException {
+ private void runTest(EnumSet<Type> types, TestType type) throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir,
newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
@@ -121,7 +120,7 @@ public class TestTypePromotion extends L
private void assertValues(TestType type, Directory dir, long[] values, Type[] sourceType)
- throws CorruptIndexException, IOException {
+ throws IOException {
DirectoryReader reader = DirectoryReader.open(dir);
assertEquals(1, reader.getSequentialSubReaders().size());
IndexReaderContext topReaderContext = reader.getTopReaderContext();
@@ -183,7 +182,7 @@ public class TestTypePromotion extends L
public void index(IndexWriter writer,
Type valueType, long[] values, Type[] sourceTypes, int offset, int num)
- throws CorruptIndexException, IOException {
+ throws IOException {
final Field valField;
if (VERBOSE) {
@@ -324,8 +323,7 @@ public class TestTypePromotion extends L
runTest(INTEGERS, TestType.Int);
}
- public void testPromotFloatingPoint() throws CorruptIndexException,
- IOException {
+ public void testPromotFloatingPoint() throws IOException {
runTest(FLOATS, TestType.Float);
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/BaseTestRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/BaseTestRangeFilter.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/BaseTestRangeFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/BaseTestRangeFilter.java Thu Jun 28 17:51:38 2012
@@ -54,9 +54,7 @@ public class BaseTestRangeFilter extends
this.minR = minR;
this.maxR = maxR;
this.allowNegativeRandomInts = allowNegativeRandomInts;
- try {
- index = newDirectory(random);
- } catch (IOException e) { throw new RuntimeException(e); }
+ index = newDirectory(random);
}
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java Thu Jun 28 17:51:38 2012
@@ -94,12 +94,12 @@ public final class FieldCacheRewriteMeth
TermsEnum termsEnum = query.getTermsEnum(new Terms() {
@Override
- public Comparator<BytesRef> getComparator() throws IOException {
+ public Comparator<BytesRef> getComparator() {
return BytesRef.getUTF8SortedAsUnicodeComparator();
}
@Override
- public TermsEnum iterator(TermsEnum reuse) throws IOException {
+ public TermsEnum iterator(TermsEnum reuse) {
return fcsi.getTermsEnum();
}
@@ -109,17 +109,17 @@ public final class FieldCacheRewriteMeth
}
@Override
- public long getSumDocFreq() throws IOException {
+ public long getSumDocFreq() {
return -1;
}
@Override
- public int getDocCount() throws IOException {
+ public int getDocCount() {
return -1;
}
@Override
- public long size() throws IOException {
+ public long size() {
return -1;
}
});
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java Thu Jun 28 17:51:38 2012
@@ -17,8 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.IOException;
-
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.index.Norm;
import org.apache.lucene.search.similarities.Similarity;
@@ -41,18 +39,17 @@ final class JustCompileSearch {
static final class JustCompileCollector extends Collector {
@Override
- public void collect(int doc) throws IOException {
+ public void collect(int doc) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public void setNextReader(AtomicReaderContext context)
- throws IOException {
+ public void setNextReader(AtomicReaderContext context) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public void setScorer(Scorer scorer) throws IOException {
+ public void setScorer(Scorer scorer) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -66,7 +63,7 @@ final class JustCompileSearch {
static final class JustCompileDocIdSet extends DocIdSet {
@Override
- public DocIdSetIterator iterator() throws IOException {
+ public DocIdSetIterator iterator() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -80,12 +77,12 @@ final class JustCompileSearch {
}
@Override
- public int nextDoc() throws IOException {
+ public int nextDoc() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public int advance(int target) throws IOException {
+ public int advance(int target) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
}
@@ -114,12 +111,12 @@ final class JustCompileSearch {
}
@Override
- public int compareBottom(int doc) throws IOException {
+ public int compareBottom(int doc) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public void copy(int slot, int doc) throws IOException {
+ public void copy(int slot, int doc) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -129,8 +126,7 @@ final class JustCompileSearch {
}
@Override
- public FieldComparator<Object> setNextReader(AtomicReaderContext context)
- throws IOException {
+ public FieldComparator<Object> setNextReader(AtomicReaderContext context) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -149,7 +145,7 @@ final class JustCompileSearch {
@Override
public FieldComparator<?> newComparator(String fieldname, int numHits,
- int sortPos, boolean reversed) throws IOException {
+ int sortPos, boolean reversed) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -160,7 +156,7 @@ final class JustCompileSearch {
// still added here in case someone will add abstract methods in the future.
@Override
- public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
+ public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) {
return null;
}
}
@@ -194,12 +190,12 @@ final class JustCompileSearch {
static final class JustCompilePhraseScorer extends PhraseScorer {
JustCompilePhraseScorer(Weight weight, PhraseQuery.PostingsAndFreq[] postings,
- Similarity.SloppySimScorer docScorer) throws IOException {
+ Similarity.SloppySimScorer docScorer) {
super(weight, postings, docScorer);
}
@Override
- protected float phraseFreq() throws IOException {
+ protected float phraseFreq() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -221,13 +217,12 @@ final class JustCompileSearch {
}
@Override
- public boolean score(Collector collector, int max, int firstDocID)
- throws IOException {
+ public boolean score(Collector collector, int max, int firstDocID) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public float score() throws IOException {
+ public float score() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -237,12 +232,12 @@ final class JustCompileSearch {
}
@Override
- public int nextDoc() throws IOException {
+ public int nextDoc() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public int advance(int target) throws IOException {
+ public int advance(int target) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
}
@@ -255,12 +250,12 @@ final class JustCompileSearch {
}
@Override
- public ExactSimScorer exactSimScorer(SimWeight stats, AtomicReaderContext context) throws IOException {
+ public ExactSimScorer exactSimScorer(SimWeight stats, AtomicReaderContext context) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public SloppySimScorer sloppySimScorer(SimWeight stats, AtomicReaderContext context) throws IOException {
+ public SloppySimScorer sloppySimScorer(SimWeight stats, AtomicReaderContext context) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -277,18 +272,17 @@ final class JustCompileSearch {
}
@Override
- public void collect(int doc) throws IOException {
+ public void collect(int doc) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public void setNextReader(AtomicReaderContext context)
- throws IOException {
+ public void setNextReader(AtomicReaderContext context) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
- public void setScorer(Scorer scorer) throws IOException {
+ public void setScorer(Scorer scorer) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -317,7 +311,7 @@ final class JustCompileSearch {
static final class JustCompileWeight extends Weight {
@Override
- public Explanation explain(AtomicReaderContext context, int doc) throws IOException {
+ public Explanation explain(AtomicReaderContext context, int doc) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@@ -332,14 +326,13 @@ final class JustCompileSearch {
}
@Override
- public float getValueForNormalization() throws IOException {
+ public float getValueForNormalization() {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
@Override
public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder,
- boolean topScorer, Bits acceptDocs)
- throws IOException {
+ boolean topScorer, Bits acceptDocs) {
throw new UnsupportedOperationException(UNSUPPORTED_MSG);
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java Thu Jun 28 17:51:38 2012
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -81,14 +80,14 @@ public class TestBooleanScorer extends L
BooleanWeight weight = (BooleanWeight) new BooleanQuery().createWeight(searcher);
Scorer[] scorers = new Scorer[] {new Scorer(weight) {
private int doc = -1;
- @Override public float score() throws IOException { return 0; }
+ @Override public float score() { return 0; }
@Override public int docID() { return doc; }
- @Override public int nextDoc() throws IOException {
+ @Override public int nextDoc() {
return doc = doc == -1 ? 3000 : NO_MORE_DOCS;
}
- @Override public int advance(int target) throws IOException {
+ @Override public int advance(int target) {
return doc = target <= 3000 ? 3000 : NO_MORE_DOCS;
}
@@ -104,7 +103,7 @@ public class TestBooleanScorer extends L
}
@Override
- public void collect(int doc) throws IOException {
+ public void collect(int doc) {
hits.add(docBase+doc);
}
@@ -158,7 +157,7 @@ public class TestBooleanScorer extends L
}
@Override
- public void collect(int doc) throws IOException {
+ public void collect(int doc) {
count[0]++;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java Thu Jun 28 17:51:38 2012
@@ -85,13 +85,13 @@ public class TestCachingCollector extend
int prevDocID = -1;
@Override
- public void setScorer(Scorer scorer) throws IOException {}
+ public void setScorer(Scorer scorer) {}
@Override
- public void setNextReader(AtomicReaderContext context) throws IOException {}
+ public void setNextReader(AtomicReaderContext context) {}
@Override
- public void collect(int doc) throws IOException {
+ public void collect(int doc) {
assertEquals(prevDocID + 1, doc);
prevDocID = doc;
}
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocBoost.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocBoost.java?rev=1355088&r1=1355087&r2=1355088&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocBoost.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestDocBoost.java Thu Jun 28 17:51:38 2012
@@ -63,7 +63,7 @@ public class TestDocBoost extends Lucene
private int base = 0;
private Scorer scorer;
@Override
- public void setScorer(Scorer scorer) throws IOException {
+ public void setScorer(Scorer scorer) {
this.scorer = scorer;
}
@Override