Skip to content

[ISSUE #10419] Fix NPE when class filter route data is missing#10420

Open
yin-bo-Final wants to merge 1 commit into
apache:developfrom
yin-bo-Final:fix-pullapiwrapper-class-filter-npe
Open

[ISSUE #10419] Fix NPE when class filter route data is missing#10420
yin-bo-Final wants to merge 1 commit into
apache:developfrom
yin-bo-Final:fix-pullapiwrapper-class-filter-npe

Conversation

@yin-bo-Final
Copy link
Copy Markdown

Which Issue(s) This PR Fixes

Brief Description

This PR avoids a potential NullPointerException in PullAPIWrapper#computePullFromWhichFilterServer when class filter is enabled but the local topic route table does not contain route data for the target topic.

Instead of dereferencing a missing TopicRouteData, the code falls through to the existing MQClientException path.

How Did You Test This Change?

  • Added a targeted unit test for missing topic route data.
  • Ran:
mvn -pl client -Dtest=org.apache.rocketmq.client.impl.consumer.PullAPIWrapperTest -Djacoco.skip=true test

The test passed with Tests run: 8, Failures: 0, Errors: 0, Skipped: 0.

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.

[Bug] PullAPIWrapper throws NPE when class filter topic route data is missing

1 participant