Fixed checkstyole

This commit is contained in:
Marcin Grzejszczak
2017-08-30 13:03:38 +02:00
parent 15021d3bd1
commit 5cbf1836f0
3 changed files with 6 additions and 12 deletions

View File

@@ -34,8 +34,7 @@ import org.springframework.cloud.contract.stubrunner.BatchStubRunner;
import org.springframework.cloud.contract.stubrunner.StubRunner;
import org.springframework.cloud.contract.stubrunner.StubRunnerOptions;
import org.springframework.cloud.contract.stubrunner.StubRunnerOptionsBuilder;
import static com.google.common.base.Strings.isNullOrEmpty;
import org.springframework.util.StringUtils;
/**
*
@@ -122,7 +121,7 @@ public class RunMojo extends AbstractMojo {
BatchStubRunner batchStubRunner = null;
StubRunnerOptionsBuilder optionsBuilder = new StubRunnerOptionsBuilder()
.withStubsClassifier(this.stubsClassifier);
if (isNullOrEmpty(this.stubs)) {
if (StringUtils.isEmpty(this.stubs)) {
StubRunnerOptions options = optionsBuilder
.withMinMaxPort(this.httpPort, this.httpPort)
.build();

View File

@@ -18,12 +18,10 @@ package org.springframework.cloud.contract.wiremock;
import java.io.IOException;
import java.nio.channels.ByteChannel;
import java.nio.charset.Charset;
import javax.servlet.http.HttpServletResponse;
import com.github.tomakehurst.wiremock.core.FaultInjector;
import com.google.common.base.Charsets;
import org.eclipse.jetty.io.ChannelEndPoint;
import org.eclipse.jetty.server.HttpChannel;
import org.eclipse.jetty.server.Response;
@@ -39,7 +37,7 @@ import static com.github.tomakehurst.wiremock.jetty9.JettyUtils.unwrapResponse;
public class JettyFaultInjector implements FaultInjector {
private static final byte[] GARBAGE = "lskdu018973t09sylgasjkfg1][]'./.sdlv"
.getBytes(Charsets.UTF_8);
.getBytes(Charset.forName("UTF-8"));
private final Response response;
private final ByteChannel socket;

View File

@@ -19,16 +19,13 @@ package org.springframework.cloud.contract.wiremock;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import javax.servlet.http.HttpServletResponse;
import com.github.tomakehurst.wiremock.common.Exceptions;
import com.github.tomakehurst.wiremock.core.FaultInjector;
import com.google.common.base.Charsets;
import org.apache.coyote.Response;
import org.apache.tomcat.util.net.SocketWrapperBase;
import org.springframework.util.ReflectionUtils;
import static com.github.tomakehurst.wiremock.common.Exceptions.throwUnchecked;
@@ -40,7 +37,7 @@ import static com.github.tomakehurst.wiremock.common.Exceptions.throwUnchecked;
public class TomcatFaultInjector implements FaultInjector {
private static final byte[] GARBAGE = "lskdu018973t09sylgasjkfg1][]'./.sdlv"
.getBytes(Charsets.UTF_8);
.getBytes(Charset.forName("UTF-8"));
private final Response response;
private SocketWrapperBase<?> socket;