From 0fc1f63976f5c3022a7d1cb07fc01d33cddbd869 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Mon, 11 Feb 2013 11:43:11 +0100 Subject: [PATCH] Reformat only --- src/main/java/org/yaz4j/ResultSet.java | 36 ++++++++++++++------------------ 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/yaz4j/ResultSet.java b/src/main/java/org/yaz4j/ResultSet.java index a60f9a5..e2df507 100644 --- a/src/main/java/org/yaz4j/ResultSet.java +++ b/src/main/java/org/yaz4j/ResultSet.java @@ -6,8 +6,8 @@ import java.util.List; import java.util.NoSuchElementException; import org.yaz4j.exception.ZoomException; import org.yaz4j.jni.SWIGTYPE_p_ZOOM_record_p; -import org.yaz4j.jni.SWIGTYPE_p_p_ZOOM_record_p; import org.yaz4j.jni.SWIGTYPE_p_ZOOM_resultset_p; +import org.yaz4j.jni.SWIGTYPE_p_p_ZOOM_record_p; import org.yaz4j.jni.yaz4jlib; /** @@ -83,25 +83,21 @@ public class ResultSet implements Iterable { } public List getRecords(long start, int count) throws ZoomException { - List out = new ArrayList(count); - - SWIGTYPE_p_p_ZOOM_record_p recs = yaz4jlib.new_zoomRecordArray(count); - yaz4jlib.ZOOM_resultset_records(resultSet, recs, start, count); - - for (int i = 0; i < count; i++) { - SWIGTYPE_p_ZOOM_record_p record = yaz4jlib.zoomRecordArray_getitem(recs, i); - if (record == null) { - continue; - } - - int errorCode = yaz4jlib.ZOOM_record_error(record, null, null, null); - if (errorCode != 0) { - throw new ZoomException("Record excpetion, code " + errorCode); - } - - out.add(new Record(record, this)); - } - + List out = new ArrayList(count); + SWIGTYPE_p_p_ZOOM_record_p recs = yaz4jlib.new_zoomRecordArray(count); + yaz4jlib.ZOOM_resultset_records(resultSet, recs, start, count); + for (int i = 0; i < count; i++) { + SWIGTYPE_p_ZOOM_record_p record = + yaz4jlib.zoomRecordArray_getitem(recs, i); + if (record == null) { + continue; + } + int errorCode = yaz4jlib.ZOOM_record_error(record, null, null, null); + if (errorCode != 0) { + throw new ZoomException("Record excpetion, code " + errorCode); + } + out.add(new Record(record, this)); + } return out; } -- 1.7.10.4