Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UrlPathHelper: checkReadOnly() called in read method shouldRemoveSemicolonContent() #27256

Closed
lijinliangyihao opened this issue Aug 10, 2021 · 2 comments · Fixed by #27303
Closed
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches status: superseded An issue that has been superseded by another type: bug A general bug

Comments

@lijinliangyihao
Copy link

lijinliangyihao commented Aug 10, 2021

Affects: 5.3.8


Method checkReadOnly is called in read method UrlPathHelper#shouldRemoveSemicolonContent, line 149. If we want to know whether we should removeSemicolonContent when this.readOnly is true, an error will be thrown.

public boolean shouldRemoveSemicolonContent() {
    checkReadOnly();
    return this.removeSemicolonContent;
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 10, 2021
evpaassen added a commit to evpaassen/spring-framework that referenced this issue Aug 20, 2021
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes spring-projects#27256
@evpaassen
Copy link
Contributor

Today I encountered this bug too. I created PR #27303 to fix it.

@sbrannen
Copy link
Member

Superseded by #27303.

@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 20, 2021
evpaassen added a commit to evpaassen/spring-framework that referenced this issue Aug 20, 2021
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes spring-projects#27256
evpaassen added a commit to evpaassen/spring-framework that referenced this issue Aug 20, 2021
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes spring-projects#27256
sbrannen pushed a commit that referenced this issue Aug 22, 2021
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes #27256
sbrannen pushed a commit to sbrannen/spring-framework that referenced this issue Aug 22, 2021
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes spring-projects#27256
@spring-projects-issues spring-projects-issues added the status: backported An issue that has been backported to maintenance branches label Aug 22, 2021
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
The checkReadOnly() method should only be called from
methods that modify properties to prevent modification
of read-only instances.

Fixes spring-projects#27256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches status: superseded An issue that has been superseded by another type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants