Skip to content

Commit 909de31

Browse files
committed
replacing lambda with return value
1 parent 2741eda commit 909de31

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

quickfixj-core/src/main/java/quickfix/JdbcStore.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.Collection;
2828
import java.util.Date;
2929
import java.util.TimeZone;
30-
import java.util.function.IntSupplier;
3130

3231
import javax.sql.DataSource;
3332

@@ -300,21 +299,21 @@ public boolean set(int sequence, String message) throws IOException {
300299

301300
public void setNextSenderMsgSeqNum(int next) throws IOException {
302301
cache.setNextSenderMsgSeqNum(next);
303-
storeSequenceNumber(SQL_UPDATE_OUTGOING_SEQNUM, cache::getNextSenderMsgSeqNum);
302+
storeSequenceNumber(SQL_UPDATE_OUTGOING_SEQNUM, cache.getNextSenderMsgSeqNum());
304303
}
305304

306305
public void setNextTargetMsgSeqNum(int next) throws IOException {
307306
cache.setNextTargetMsgSeqNum(next);
308-
storeSequenceNumber(SQL_UPDATE_INCOMING_SEQNUM, cache::getNextTargetMsgSeqNum);
307+
storeSequenceNumber(SQL_UPDATE_INCOMING_SEQNUM, cache.getNextTargetMsgSeqNum());
309308
}
310309

311-
private void storeSequenceNumber(String sequenceUpdateSql, IntSupplier sequence) throws IOException {
310+
private void storeSequenceNumber(String sequenceUpdateSql, int sequence) throws IOException {
312311
Connection connection = null;
313312
PreparedStatement update = null;
314313
try {
315314
connection = dataSource.getConnection();
316315
update = connection.prepareStatement(sequenceUpdateSql);
317-
update.setInt(1, sequence.getAsInt());
316+
update.setInt(1, sequence);
318317
setSessionIdParameters(update, 2);
319318
update.execute();
320319
} catch (SQLException e) {

0 commit comments

Comments
 (0)