From 0c57e1eaa08bbeb61c3800e506ec3865e672681e Mon Sep 17 00:00:00 2001 From: agrgr Date: Sun, 26 May 2024 18:48:52 +0300 Subject: [PATCH] code format --- .../convert/MappingAerospikeWriteConverter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/springframework/data/aerospike/convert/MappingAerospikeWriteConverter.java b/src/main/java/org/springframework/data/aerospike/convert/MappingAerospikeWriteConverter.java index 3e995ea26..a74a4341d 100644 --- a/src/main/java/org/springframework/data/aerospike/convert/MappingAerospikeWriteConverter.java +++ b/src/main/java/org/springframework/data/aerospike/convert/MappingAerospikeWriteConverter.java @@ -160,10 +160,10 @@ private void convertToAerospikeWriteData(Object source, AerospikeWriteData data) private Map convertProperties(TypeInformation type, AerospikePersistentEntity entity, ConvertingPropertyAccessor accessor, boolean isCustomType) { Map target; - if (!settings.isWriteTreeMaps()) { - target = new HashMap<>(); - } else { + if (settings.isWriteTreeMaps()) { target = new TreeMap<>(); + } else { + target = new HashMap<>(); } typeMapper.writeType(type, target); entity.doWithProperties((PropertyHandler) property -> { @@ -242,10 +242,10 @@ protected Map convertMap(final Map source, final Assert.notNull(type, "Given type must not be null!"); Supplier> mapSupplier; - if (!settings.isWriteTreeMaps()) { - mapSupplier = HashMap::new; - } else { + if (settings.isWriteTreeMaps()) { mapSupplier = TreeMap::new; + } else { + mapSupplier = HashMap::new; } Map map = mapSupplier.get(); for (Map.Entry e : source.entrySet()) {