Skip to content

Commit aa161ce

Browse files
committed
Set maximumRecords earlier as it is invariant
1 parent 907fdfc commit aa161ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metafacture-io/src/main/java/org/metafacture/io/SruOpener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void process(final String baseUrl) {
171171
final StringBuilder srUrl = new StringBuilder(baseUrl);
172172
if (query != null) {
173173
srUrl.append("?query=").append(query).append("&operation=").append(operation).append("&recordSchema=")
174-
.append(recordSchema).append("&version=").append(version);
174+
.append(recordSchema).append("&version=").append(version).append("&maximumRecords=" + maximumRecords);
175175
}
176176
else {
177177
throw new IllegalArgumentException("Missing mandatory parameter 'query'");
@@ -218,7 +218,7 @@ private int getIntegerValueFromElement(final Document xmlDoc, final String tagNa
218218

219219
private InputStream retrieveUrl(final StringBuilder srUrl) throws IOException {
220220
final URL urlToOpen =
221-
new URL(srUrl.toString() + "&maximumRecords=" + maximumRecords + "&startRecord=" + startRecord);
221+
new URL(srUrl.toString() + "&startRecord=" + startRecord);
222222
final HttpURLConnection connection = (HttpURLConnection) urlToOpen.openConnection();
223223

224224
connection.setConnectTimeout(CONNECTION_TIMEOUT);

0 commit comments

Comments
 (0)