spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

Make removeMessageListener listener parameter non-nullable

Open Kiminni opened this issue 2 months ago • 0 comments

Overview

Changed the listener parameter of removeMessageListener methods in RedisMessageListenerContainer to be non-nullable. (issue #3016)

Changes

  • Removed @Nullable annotation from listener parameter in removeMessageListener(MessageListener, Collection<Topic>) method
  • Removed @Nullable annotation from listener parameter in removeMessageListener(MessageListener, Topic) method
  • Removed @Nullable annotation from listener parameter in internal removeListener method
  • Added Assert.notNull(listener, "MessageListener must not be null") validation in removeListener method
  • Simplified listener null check logic (removed unnecessary if (listener != null && ...) condition)

  • [x] You have read the Spring Data contribution guidelines.
  • [x] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • [x] You submit test cases (unit or integration tests) that back your changes.
  • [x] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Kiminni avatar Oct 16 '25 11:10 Kiminni