Polish naming for Charset setters in FreeMarker support
See gh-33102
This commit is contained in:
@@ -116,7 +116,7 @@ public class FreeMarkerView extends AbstractTemplateView {
|
||||
* process. See the note in the {@linkplain FreeMarkerView class-level
|
||||
* documentation} for details.
|
||||
* @see freemarker.template.Configuration#setDefaultEncoding
|
||||
* @see #setEncoding(Charset)
|
||||
* @see #setCharset(Charset)
|
||||
* @see #getEncoding()
|
||||
* @see #setContentType(String)
|
||||
*/
|
||||
@@ -125,14 +125,14 @@ public class FreeMarkerView extends AbstractTemplateView {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the encoding used to decode byte sequences to character sequences when
|
||||
* reading the FreeMarker template file for this view.
|
||||
* Set the {@link Charset} used to decode byte sequences to character sequences
|
||||
* when reading the FreeMarker template file for this view.
|
||||
* <p>See {@link #setEncoding(String)} for details.
|
||||
* @since 6.2
|
||||
* @see java.nio.charset.StandardCharsets
|
||||
*/
|
||||
public void setEncoding(@Nullable Charset encoding) {
|
||||
setEncoding(encoding != null ? encoding.name() : null);
|
||||
public void setCharset(@Nullable Charset charset) {
|
||||
this.encoding = (charset != null ? charset.name() : null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -164,7 +164,7 @@ class ViewResolutionIntegrationTests {
|
||||
public FreeMarkerConfigurer freeMarkerConfigurer() {
|
||||
FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
|
||||
configurer.setTemplateLoaderPath("/WEB-INF/");
|
||||
configurer.setDefaultEncoding(UTF_8);
|
||||
configurer.setDefaultCharset(UTF_8);
|
||||
return configurer;
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class ViewResolutionIntegrationTests {
|
||||
public FreeMarkerConfigurer freeMarkerConfigurer() {
|
||||
FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
|
||||
configurer.setTemplateLoaderPath("/WEB-INF/");
|
||||
configurer.setDefaultEncoding(UTF_8);
|
||||
configurer.setDefaultCharset(UTF_8);
|
||||
return configurer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user