mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Simplified putDefaultValue()
This commit is contained in:
@@ -403,12 +403,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
|
||||
|
||||
@Override
|
||||
void putDefaultValue(VanillaContext context) {
|
||||
context.initPutDependencies();
|
||||
context.initInstanceValueModel0();
|
||||
context.initNewInstanceValue0(defaultValue(context));
|
||||
context.put0();
|
||||
context.closeValueModel();
|
||||
context.closeValue();
|
||||
context.doPut(defaultValue(context));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -509,7 +504,6 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
|
||||
try {
|
||||
if (!c.containsKey()) {
|
||||
c.doPut(defaultValue(c));
|
||||
c.closeValue();
|
||||
}
|
||||
V value = c.getUsing(usingValue);
|
||||
if (value != usingValue) {
|
||||
|
||||
@@ -45,7 +45,8 @@ public class StatelessChronicleMapConverter<K, V> extends AbstractChronicleMapCo
|
||||
|
||||
try {
|
||||
|
||||
final Method entrySize = o.getClass().getDeclaredMethod("entrySet", MapEntryCallback.class);
|
||||
final Method entrySize = o.getClass()
|
||||
.getDeclaredMethod("entrySet", MapEntryCallback.class);
|
||||
entrySize.setAccessible(true);
|
||||
entrySize.invoke(o,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user