Fix checkstyle violations
This commit is contained in:
parent
3702da4573
commit
68ffbafbae
|
|
@ -67,7 +67,7 @@ public final class WebClientExchangeTags {
|
||||||
|
|
||||||
private static String extractPath(String url) {
|
private static String extractPath(String url) {
|
||||||
String path = url.replaceFirst("^https?://[^/]+/", "");
|
String path = url.replaceFirst("^https?://[^/]+/", "");
|
||||||
return path.startsWith("/") ? path : "/" + path;
|
return (path.startsWith("/") ? path : "/" + path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,7 +87,7 @@ public final class WebClientExchangeTags {
|
||||||
* @return the status tag
|
* @return the status tag
|
||||||
*/
|
*/
|
||||||
public static Tag status(Throwable throwable) {
|
public static Tag status(Throwable throwable) {
|
||||||
return throwable instanceof IOException ? IO_ERROR : CLIENT_ERROR;
|
return (throwable instanceof IOException ? IO_ERROR : CLIENT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ public class HealthWebEndpointResponseMapperTests {
|
||||||
SecurityContext securityContext = mock(SecurityContext.class);
|
SecurityContext securityContext = mock(SecurityContext.class);
|
||||||
given(securityContext.getPrincipal()).willReturn(mock(Principal.class));
|
given(securityContext.getPrincipal()).willReturn(mock(Principal.class));
|
||||||
given(securityContext.isUserInRole(anyString()))
|
given(securityContext.isUserInRole(anyString()))
|
||||||
.will((Answer<Boolean>) invocation -> {
|
.will((Answer<Boolean>) (invocation) -> {
|
||||||
String expectedRole = invocation.getArgument(0);
|
String expectedRole = invocation.getArgument(0);
|
||||||
return associatedRoles.contains(expectedRole);
|
return associatedRoles.contains(expectedRole);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public class LdapAutoConfigurationTests {
|
||||||
@Test
|
@Test
|
||||||
public void templateExists() {
|
public void templateExists() {
|
||||||
this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:389")
|
this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:389")
|
||||||
.run(context -> assertThat(context).hasSingleBean(LdapTemplate.class));
|
.run((context) -> assertThat(context).hasSingleBean(LdapTemplate.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -345,8 +345,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
||||||
this.classifier, target);
|
this.classifier, target);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
String artifactId = this.classifier != null
|
String artifactId = (this.classifier != null
|
||||||
? "artifact with classifier " + this.classifier : "main artifact";
|
? "artifact with classifier " + this.classifier : "main artifact");
|
||||||
getLog().info(String.format("Replacing %s %s", artifactId, source.getFile()));
|
getLog().info(String.format("Replacing %s %s", artifactId, source.getFile()));
|
||||||
source.setFile(target);
|
source.setFile(target);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue