-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Affected Version: Spring Web 5.3.1
.
Deprecation note on ContentNegotiationManagerFactoryBean:setFavorPathExtension(boolean) is misleading.
Lines 164 to 177 in 6a0377b
/** | |
* Whether the path extension in the URL path should be used to determine | |
* the requested media type. | |
* <p>By default this is set to {@code false} in which case path extensions | |
* have no impact on content negotiation. | |
* @deprecated as of 5.2.4. See class-level note on the deprecation of path | |
* extension config options. As there is no replacement for this method, | |
* in 5.2.x it is necessary to set it to {@code false}. In 5.3 the default | |
* changes to {@code false} and use of this property becomes unnecessary. | |
*/ | |
@Deprecated | |
public void setFavorPathExtension(boolean favorPathExtension) { | |
this.favorPathExtension = favorPathExtension; | |
} |
It states that As there is no replacement for this method, in 5.2.x it is necessary to set it to {@code false}. In 5.3 the default changes to {@code false} and use of this property becomes unnecessary.
But the default value of favorPathExtension
still is true
.
Line 111 in 6a0377b
private boolean favorPathExtension = true; |
If the property is not used, path extension will be favored indicating that a call to setFavorPathExtension(false)
is still necessary, contrary to the deprecation note.
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug