Skip to content

Conversation

@mercyblitz
Copy link
Contributor

No description provided.

Replaces SortParametersSerializer.INSTANCE with SortParametersSerializer.SORT_PARAMETERS_SERIALIZER in SerializersTest to match the correct constant usage.
Updated static imports for clarity and consistency, replaced direct references with static constants, and simplified method calls in SortParametersSerializerTest. These changes improve readability and maintainability of the test code.
Replaces direct usage of Weights.of with a static import for of, improving code readability in the test class.
Added a @see tag for AbstractSerializer in the AbstractSerializerTest JavaDoc to improve documentation and code navigation.
Added a unit test to verify that DoubleSerializer returns null when deserializing an empty byte array. This improves coverage for edge cases in the serializer implementation.
Replaced direct class references with static imports for serializer constants to improve readability. Added null and blank checks in getSerializer and deserialize methods for better error handling. Updated error logging for deserialization failures and made initializeParameterizedSerializer method package-private.
Expanded SerializersTest to cover serialization and deserialization methods, null handling, type mismatches, and initialization of parameterized serializers. Improved coverage for primitive, array, collection, and Spring Data Redis types, ensuring robust behavior and correctness of the Serializers utility.
Deleted the defaultSerialize(RedisCommandEvent event) method and its import as it was unused. Also changed the register method's visibility from public to package-private for better encapsulation.
Added unit tests for Serializers.defaultSerialize and Serializers.register to improve coverage and verify correct behavior for string serialization and serializer registration.
Added a null check to the serializeRawParameter method to return null when the input parameter is null. Updated unit tests to cover this case and other edge scenarios for serializeRawParameter.
Added a private constructor to the Serializers class to prevent instantiation, enforcing its intended use as a utility class.
Introduced RedisZSetCommandsRangeSerializer for handling RedisZSetCommands.Range serialization and deserialization. Refactored RangeSerializer to use org.springframework.data.domain.Range and improved its serialization logic. Updated Serializers to register the new serializer and added related tests for both serializers.
Replaced ByteArrayInputStream with FastByteArrayInputStream for deserialization, improved usage of static imports, and made VersionedRedisSerializer methods abstract for clarity. Added a test for the default serializer in RedisCommandEventSerializerTest to ensure correct serialization and deserialization behavior.
Deleted DelegatingWrapper, Wrapper, and WrapperProcessor from the beans package and updated imports to use their equivalents from the microsphere.lang package. This change centralizes wrapper-related interfaces for better code organization and reuse.
Replaced usage of ReflectionUtils.invokeMethod with direct static import of invokeMethod from org.springframework.util.ReflectionUtils for improved clarity. Also updated import statements to remove unused imports.
Replaces try-catch blocks in RedisCommandEventSerializer with the ThrowableAction.execute utility for cleaner error handling during serialization and deserialization. This improves code readability and consistency in exception management.
Changed WrapperProcessors to implement MergedBeanDefinitionPostProcessor for more efficient bean definition handling. Initialization logic for wrapperHandlersMap is now performed during bean definition post-processing instead of after properties set, simplifying the setup and improving integration with Spring's bean lifecycle.
Removed BeanClassLoaderAware implementation and related logic. Simplified application listener registration by directly registering the listener bean without classloader checks.
Enhanced RedisConfigurationBeanDefinitionRegistrar and PropagatingRedisConfigurationPropertyChangedEventApplicationListener to implement BeanClassLoaderAware, enabling conditional registration based on classloader presence. Added unit tests for registrar behavior and listener registration logic.
Moved range creation logic to a static toRange method in RedisZSetCommandsRangeSerializer for better testability. Added unit tests for toRange to verify correct handling of inclusive and exclusive bounds.
Annotated configuration property constants with @ConfigurationProperty to improve metadata and documentation. Updated default value handling and refactored list initialization for clarity.
Annotated Kafka consumer configuration properties with @ConfigurationProperty for better metadata and defaults. Added unit test skeletons for RedisReplicatorConfiguration and KafkaRedisReplicatorConfiguration to improve test coverage.
Added @ConfigurationProperty annotations to Kafka-related property constants in KafkaRedisReplicatorConfiguration for improved configuration metadata and clarity. Also refactored property placeholder definitions for consistency.
Changed DEFAULT_ENABLED to use DEFAULT_ENABLED_PROPERTY_VALUE instead of ENABLED_PROPERTY_NAME for correct default value parsing.
Reordered and grouped static property declarations in RedisReplicatorConfiguration for improved readability. Moved initialization of DEFAULT_CONSUMER_ENABLED and DEFAULT_DOMAINS closer to their related property value constants.
Replaced direct usage of ClassUtils and isEnabled with static imports for improved readability. Cleaned up unused imports and updated method calls to use the new static imports.
Introduced unit tests to verify constant values and default behavior of RedisReplicatorConfiguration. Added a DefaultConfig inner class to provide required beans for testing in a Spring container.
Revised the TODO comment in RedisReplicatorConfiguration to clarify support for additional configuration changes.
Introduces test-redis-replicator.properties for configuring domain and Redis template mappings in test resources.
Replaced a conditional debug log statement with an unconditional trace log in RedisConfiguration. This ensures detailed logging at the trace level for feature status regardless of debug mode.
@mercyblitz mercyblitz closed this Dec 22, 2025
@mercyblitz mercyblitz reopened this Dec 22, 2025
Improved readability of the equals method by adding braces and aligning logical operators. No functional changes were made.
Replaces deprecated or less clear assertions like assertFalse(a.equals(b)) and assertTrue(a.equals(b)) with assertNotEquals and assertEquals for improved readability and clarity in MethodMetadataTest.
Reordered the sequence of property modifications in MethodMetadataTest to set 'commands' before 'parameterTypes', 'methodName', and 'interfaceName'. This improves clarity and ensures each property change is tested for equality independently.
Added additional assertions in MethodInfoTest to cover cases with different metadata and parameter lists, improving test coverage for the MethodInfo equals method.
Refactored SpringRedisMetadataRepository by removing unused methods, improving null handling, and relocating method existence checks. Enhanced test coverage in SpringRedisMetadataRepositoryTest to validate new behaviors and edge cases, including null and invalid input handling.
Added detailed Javadoc comments for RedisCommands interface class name constants and introduced a public static reference to the execute method of RedisCommands using MethodUtils.findMethod. This improves code clarity and provides easier access to the execute method for reflection-based operations.
Added an assertNotNull check for REDIS_COMMANDS_EXECUTE_METHOD in RedisCommandsUtilsTest to ensure the constant is properly initialized.
Cache redisCommands and redisWriteCommands as static fields to avoid repeated resource loading. Add isRedisCommand and isRedisWriteCommand methods for efficient command type checks. Annotate relevant fields and methods with @nonnull and @immutable for clarity.
Added unit tests to verify the behavior of isRedisCommand and isRedisWriteCommand methods, ensuring they correctly identify valid and invalid Redis commands.
Updated the log statement in RedisInterceptorModuleInitializer to use TRACE level instead of DEBUG for more granular logging.
Introduced buildParameterMetadataList methods in RedisCommandUtils to generate parameter metadata from Method objects. Added corresponding unit tests in RedisCommandUtilsTest to verify correct metadata extraction.
Replaces the local buildParameterMetadataList method in MethodInfoTest with the static utility from RedisCommandUtils, reducing code duplication and improving maintainability.
Updated the log level from DEBUG to TRACE when RedisContext is not initialized, reducing log verbosity for this message.
Updated logging for serializer registration and lookup from debug to trace level to reduce log verbosity during normal operation.
Refactored RedisCommandsUtils and its test to SpringRedisCommandUtils for improved clarity and consistency. Updated all relevant imports and usages across the codebase. Also made minor improvements to AbstractRedisCommandEventTest and SpringRedisMetadataRepository to enhance test coverage and serializer preloading.
Moved the event handling logic from an inline lambda in the test method to a dedicated onRedisCommandEvent method. This improves code readability and reusability, and initializes key/value serializers and data map as class fields.
Replaces direct equality check with a new isRedisCommandsExecuteMethod utility method for improved readability and encapsulation. Removes unused imports and the parameter name discoverer field.
Introduced a unit test to verify the behavior of the isRedisCommandsExecuteMethod function, ensuring it correctly identifies the execute method and distinguishes it from other methods.
Deleted an outdated comment regarding RedisCommands interface methods in KafkaProducerRedisCommandEventListener to improve code clarity.
Refactored the test to use a shared data map and improved event assertions by extracting logic into onRedisCommandReplicatedEvent. Added more comprehensive checks for interface name, method name, command, and parameter types. Introduced assertSet helper for value operations and improved test isolation by using unique key suffixes.
Replaces direct reference to Serializers.deserialize with a static import of the deserialize method for improved code readability.
Introduces RedisComandEventPartitioner, an interface for calculating Kafka partitions for RedisCommandEvent instances. This provides a strategy for custom partitioning logic in Kafka producers.
Introduced optional RedisComandEventPartitioner bean in KafkaProducerRedisCommandEventListener to allow custom partitioning logic for Redis command events. Updated integration test to provide a default partitioner bean.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mercyblitz mercyblitz deleted the branch dev-1.x December 23, 2025 12:16
@mercyblitz mercyblitz closed this Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants