diff lucene/src/luan/modules/lucene/LuceneSnapshot.java @ 233:ef39bc4d3f70

basic lucene works git-svn-id: https://luan-java.googlecode.com/svn/trunk@234 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 02 Oct 2014 02:58:55 +0000
parents 4438cb2e04d0
children
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/LuceneSnapshot.java	Wed Oct 01 06:55:14 2014 +0000
+++ b/lucene/src/luan/modules/lucene/LuceneSnapshot.java	Thu Oct 02 02:58:55 2014 +0000
@@ -9,30 +9,18 @@
 	private final LuceneIndex index;
 	private final IndexCommit ic;
 
-	LuceneSnapshot(LuceneIndex index) {
+	LuceneSnapshot(LuceneIndex index) throws IOException {
 		this.index = index;
-		try {
-			this.ic = index.snapshotDeletionPolicy.snapshot();
-		} catch(IOException e) {
-			throw new RuntimeException(e);
-		}
+		this.ic = index.snapshotDeletionPolicy.snapshot();
 	}
 
 	// call in finally block
-	public void close() {
-		try {
-			index.snapshotDeletionPolicy.release(ic);
-		} catch(IOException e) {
-			throw new RuntimeException(e);
-		}
+	public void close() throws IOException {
+		index.snapshotDeletionPolicy.release(ic);
 	}
 
-	public Collection<String> getFileNames() {
-		try {
-			return ic.getFileNames();
-		} catch(IOException e) {
-			throw new RuntimeException(e);
-		}
+	public Collection<String> getFileNames() throws IOException {
+		return ic.getFileNames();
 	}
 
 }