Restore getUseRelativeRedirects in deprecated form

Restore the `getUseRelativeRedirects` method with a `Boolean` object
result and introduce `isUseRelativeRedirects` for the primitive boolean
variant.

See gh-20796
pull/21480/head
Phillip Webb 5 years ago
parent 5157a75119
commit daed512076

@ -537,7 +537,12 @@ public class ServerProperties {
this.redirectContextRoot = redirectContextRoot; this.redirectContextRoot = redirectContextRoot;
} }
public boolean getUseRelativeRedirects() { @Deprecated
public Boolean getUseRelativeRedirects() {
return this.useRelativeRedirects;
}
public boolean isUseRelativeRedirects() {
return this.useRelativeRedirects; return this.useRelativeRedirects;
} }

@ -54,7 +54,7 @@ public class TomcatServletWebServerFactoryCustomizer
if (tomcatProperties.getRedirectContextRoot() != null) { if (tomcatProperties.getRedirectContextRoot() != null) {
customizeRedirectContextRoot(factory, tomcatProperties.getRedirectContextRoot()); customizeRedirectContextRoot(factory, tomcatProperties.getRedirectContextRoot());
} }
customizeUseRelativeRedirects(factory, tomcatProperties.getUseRelativeRedirects()); customizeUseRelativeRedirects(factory, tomcatProperties.isUseRelativeRedirects());
factory.setDisableMBeanRegistry(!tomcatProperties.getMbeanregistry().isEnabled()); factory.setDisableMBeanRegistry(!tomcatProperties.getMbeanregistry().isEnabled());
} }

Loading…
Cancel
Save