Java Version set to 1.8

anonymous types replaced by lambda's
Method references used instead of Lambda's
Explicit type replaced by <>
travis.yml updated to java 1.8
This commit is contained in:
Andreas Mager
2017-06-19 17:07:05 +02:00
committed by Andreas Mager
parent 555893d287
commit fb9765304c
11 changed files with 32 additions and 111 deletions
@@ -83,13 +83,9 @@ public class MapDBPersistentStore implements IStore {
m_db = DBMaker.newFileDB(tmpFile).make();
}
LOG.info("Scheduling MapDB commit task");
m_scheduler.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
m_scheduler.scheduleWithFixedDelay(() -> {
LOG.debug("Committing to MapDB");
m_db.commit();
}
}, this.m_autosaveInterval, this.m_autosaveInterval, TimeUnit.SECONDS);
// TODO check m_db is valid and
@@ -191,7 +191,7 @@ class MapDBSessionsStore implements ISessionsStore, ISubscriptionsStore {
Set<Integer> inFlightForClient = this.m_inFlightIds.get(clientID);
if (inFlightForClient == null) {
int nextPacketId = 1;
inFlightForClient = Collections.newSetFromMap(new ConcurrentHashMap<Integer, Boolean>());
inFlightForClient = Collections.newSetFromMap(new ConcurrentHashMap<>());
inFlightForClient.add(nextPacketId);
this.m_inFlightIds.put(clientID, inFlightForClient);
return nextPacketId;