return identifier;
}
+ void onHistoryCreated(final LocalHistoryIdentifier historyId) {
+ // TODO Auto-generated method stub
+
+ }
+
void onHistoryClosed(final LocalHistoryIdentifier historyId) {
ensureHistory(historyId).onHistoryClosed();
}
}
private FrontendHistoryMetadataBuilder ensureHistory(final LocalHistoryIdentifier historyId) {
- final FrontendHistoryMetadataBuilder existing = currentHistories.get(historyId);
- if (existing != null) {
- return existing;
- }
-
- final FrontendHistoryMetadataBuilder ret = new FrontendHistoryMetadataBuilder(historyId);
- currentHistories.put(historyId, ret);
- return ret;
+ return currentHistories.computeIfAbsent(historyId, FrontendHistoryMetadataBuilder::new);
}
}