spring-cloud / spring-cloud/spring-cloud-gateway

Comments and code seem to reveal the intents are not aligned with the implementation

Open
#3,286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

While I was debugging I encountered this piece of code:
https://github.com/spring-cloud/spring-cloud-gateway/blob/7e0667162f17168909580bf411af8fd1f57d1a48/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java#L173-L180

Looking at the comment it seems pretty straightforward but in the code there is an initial ! which risen some doubts to me.

There is something I'm not understanding or it seems wrong also to you?

Unfortunately I'm not able to find any UnitTest to cover that scenario.

Thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java, lines 173-180, and compare the comment with the condition's behavior. Trace the surrounding routing logic, then check whether an existing unit-test location covers this scenario. Done means resolving whether the comment or implementation is incorrect and adding coverage if a defect is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.