Merge pull request #13583 from dreis2211:move-conditionals-inside-branch

* pr/13583:
  Polish conditional expressions
pull/13616/merge
Stephane Nicoll 6 years ago
commit f0a31daa57

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -52,7 +52,7 @@ public class H2ConsoleAutoConfiguration {
@Bean
public ServletRegistrationBean<WebServlet> h2Console() {
String path = this.properties.getPath();
String urlMapping = (path.endsWith("/") ? path + "*" : path + "/*");
String urlMapping = path + (path.endsWith("/") ? "*" : "/*");
ServletRegistrationBean<WebServlet> registration = new ServletRegistrationBean<>(
new WebServlet(), urlMapping);
H2ConsoleProperties.Settings settings = this.properties.getSettings();

@ -77,7 +77,7 @@ public class WebServicesAutoConfiguration {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
String path = this.properties.getPath();
String urlMapping = (path.endsWith("/") ? path + "*" : path + "/*");
String urlMapping = path + (path.endsWith("/") ? "*" : "/*");
ServletRegistrationBean<MessageDispatcherServlet> registration = new ServletRegistrationBean<>(
servlet, urlMapping);
WebServicesProperties.Servlet servletProperties = this.properties.getServlet();

Loading…
Cancel
Save