mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Code tidy after code inspections
This commit is contained in:
@@ -198,9 +198,7 @@ interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V> {
|
||||
}
|
||||
return v != null && c.value().equals(c.context().wrapValueAsData(v));
|
||||
});
|
||||
} catch (ClassCastException unused) {
|
||||
return false;
|
||||
} catch (NullPointerException unused) {
|
||||
} catch (ClassCastException | NullPointerException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,7 @@ class ChronicleMapEntrySet<K, V> extends AbstractSet<Map.Entry<K, V>> {
|
||||
try {
|
||||
V v = map.get(e.getKey());
|
||||
return v != null && v.equals(e.getValue());
|
||||
} catch (ClassCastException ex) {
|
||||
return false;
|
||||
} catch (NullPointerException ex) {
|
||||
} catch (ClassCastException | NullPointerException ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -58,9 +56,7 @@ class ChronicleMapEntrySet<K, V> extends AbstractSet<Map.Entry<K, V>> {
|
||||
Object key = e.getKey();
|
||||
Object value = e.getValue();
|
||||
return map.remove(key, value);
|
||||
} catch (ClassCastException ex) {
|
||||
return false;
|
||||
} catch (NullPointerException ex) {
|
||||
} catch (ClassCastException | NullPointerException ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
|
||||
// lambda is used instead of constructor reference because currently stage-compiler
|
||||
// has issues with parsing method/constructor refs.
|
||||
// TODO replace with constructor ref when stage-compiler is improved
|
||||
(c, m) -> new CompiledReplicatedMapQueryContext<K, V, R>(c, m), this);
|
||||
CompiledReplicatedMapQueryContext::new, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -575,7 +575,7 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
|
||||
// lambda is used instead of constructor reference because currently stage-compiler
|
||||
// has issues with parsing method/constructor refs.
|
||||
// TODO replace with constructor ref when stage-compiler is improved
|
||||
(c, m) -> new CompiledReplicatedMapIterationContext<K, V, R>(c, m), this);
|
||||
CompiledReplicatedMapIterationContext::new, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.openhft.chronicle.values.*;
|
||||
|
||||
interface ReplicatedGlobalMutableState extends VanillaGlobalMutableState {
|
||||
|
||||
public static void main(String[] args) {
|
||||
static void main(String[] args) {
|
||||
System.setProperty("chronicle.values.dumpCode", "true");
|
||||
Values.nativeClassFor(ReplicatedGlobalMutableState.class);
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ public class VanillaChronicleMap<K, V, R>
|
||||
// lambda is used instead of constructor reference because currently stage-compiler
|
||||
// has issues with parsing method/constructor refs.
|
||||
// TODO replace with constructor ref when stage-compiler is improved
|
||||
(c, m) -> new CompiledMapQueryContext<K, V, R>(c, m), this);
|
||||
CompiledMapQueryContext::new, this);
|
||||
}
|
||||
|
||||
final ChainingInterface i() {
|
||||
@@ -385,7 +385,7 @@ public class VanillaChronicleMap<K, V, R>
|
||||
// lambda is used instead of constructor reference because currently stage-compiler
|
||||
// has issues with parsing method/constructor refs.
|
||||
// TODO replace with constructor ref when stage-compiler is improved
|
||||
(c, m) -> new CompiledMapIterationContext<K, V, R>(c, m), this);
|
||||
CompiledMapIterationContext::new, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user