diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java index b376d15db23f64..b0fde3168b6000 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java @@ -61,9 +61,6 @@ * Binary class descriptor. */ public class BinaryClassDescriptor { - /** For test use only. */ - static boolean foreSortedFieldsOrder; - /** */ @GridToStringExclude private final BinaryContext ctx; @@ -335,7 +332,7 @@ else if (useOptMarshaller) else { Map fields0; - if (BinaryUtils.FIELDS_SORTED_ORDER || foreSortedFieldsOrder) { + if (BinaryUtils.FIELDS_SORTED_ORDER) { fields0 = new TreeMap<>(); stableFieldsMeta = metaDataEnabled ? new TreeMap<>() : null; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java index e8e898648e574a..7821865794b5ba 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java @@ -160,7 +160,7 @@ public class BinaryUtils { !IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_BINARY_DONT_WRAP_TREE_STRUCTURES); /** Whether to sort field in binary objects (doesn't affect Binarylizable). */ - public static final boolean FIELDS_SORTED_ORDER = + public static boolean FIELDS_SORTED_ORDER = IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_BINARY_SORT_OBJECT_FIELDS); /** Field type names. */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/ObjectDetachHelper.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/ObjectDetachHelper.java index 0c00693026f2de..640a7f609df34e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/ObjectDetachHelper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/ObjectDetachHelper.java @@ -83,8 +83,6 @@ private boolean findInNextObject() { reader.position(objDataStartPos); - boolean isFound = false; - while (reader.position() < objDataEndPos) { if (findInNextObject()) return true; @@ -92,7 +90,7 @@ private boolean findInNextObject() { reader.position(objEndPos); - return isFound; + return false; } case GridBinaryMarshaller.HANDLE: { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/CrossObjectReferenceSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/CrossObjectReferenceSerializationTest.java index 68ac61761a4f81..82fa8181efe0cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/CrossObjectReferenceSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/CrossObjectReferenceSerializationTest.java @@ -114,12 +114,12 @@ public static Iterable parameters() { srvCache = srv.cache(DEFAULT_CACHE_NAME); cliCache = cli.cache(DEFAULT_CACHE_NAME); - BinaryClassDescriptor.foreSortedFieldsOrder = true; + BinaryUtils.FIELDS_SORTED_ORDER = true; } /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { - BinaryClassDescriptor.foreSortedFieldsOrder = false; + BinaryUtils.FIELDS_SORTED_ORDER = false; super.afterTestsStopped();