Skip to content

Commit

Permalink
fixing formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
iain-henderson committed Aug 29, 2023
1 parent dc1e3b7 commit 6fa78d7
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 42 deletions.
16 changes: 8 additions & 8 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/feign/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ protected static String resolveProtocolVersion(Request.ProtocolVersion protocolV
/**
* Controls the level of logging.
*/
public enum Level {
public enum Level
{
/**
* No logging.
*/
Expand Down
26 changes: 13 additions & 13 deletions core/src/main/java/feign/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,39 @@
*/
public final class Request implements Serializable {

public enum HttpMethod {
public enum HttpMethod
{
GET, HEAD, POST(true), PUT(true), DELETE, CONNECT, OPTIONS, TRACE, PATCH(true);

private final boolean withBody;
private final boolean withBody;

HttpMethod() {
HttpMethod() {
this(false);
}

HttpMethod(boolean withBody) {
HttpMethod(boolean withBody) {
this.withBody = withBody;
}

public boolean isWithBody() {
return this.withBody;
}
}
public boolean isWithBody() {
return this.withBody;
}}

public enum ProtocolVersion {
public enum ProtocolVersion{

HTTP_1_0("HTTP/1.0"), HTTP_1_1("HTTP/1.1"), HTTP_2("HTTP/2.0"), MOCK;
HTTP_1_0("HTTP/1.0"), HTTP_1_1("HTTP/1.1"), HTTP_2("HTTP/2.0"), MOCK;

final String protocolVersion;

ProtocolVersion() {
ProtocolVersion() {
protocolVersion = name();
}

ProtocolVersion(String protocolVersion) {
ProtocolVersion(String protocolVersion) {
this.protocolVersion = protocolVersion;
}

@Override
@Override
public String toString() {
return protocolVersion;
}
Expand Down
19 changes: 9 additions & 10 deletions core/src/main/java/feign/template/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,22 +326,21 @@ public String next() {
}
}

public enum EncodingOptions {
public enum EncodingOptions
{
REQUIRED(true), NOT_REQUIRED(false);

private final boolean shouldEncode;
private final boolean shouldEncode;

EncodingOptions(boolean shouldEncode) {
EncodingOptions(boolean shouldEncode) {
this.shouldEncode = shouldEncode;
}

public boolean isEncodingRequired() {
return this.shouldEncode;
}
}
public boolean isEncodingRequired() {
return this.shouldEncode;
}}

public enum ExpansionOptions {
ALLOW_UNRESOLVED, REQUIRED
}
public enum ExpansionOptions{ALLOW_UNRESOLVED,REQUIRED
}

}
4 changes: 2 additions & 2 deletions core/src/test/java/feign/DefaultContractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import static org.assertj.core.data.MapEntry.entry;

/**
* Tests interfaces defined per {@link Contract.Default} are interpreted into expected {@link feign
* .RequestTemplate template} instances.
* Tests interfaces defined per {@link Contract.Default} are interpreted into expected
* {@link feign .RequestTemplate template} instances.
*/
public class DefaultContractTest {

Expand Down
6 changes: 3 additions & 3 deletions core/src/test/java/feign/FeignTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ public void responseInterceptor500Error() throws Exception {
server.enqueue(new MockResponse().setResponseCode(503).setBody(body));

TestInterface api = new TestInterfaceBuilder().responseInterceptor(new ErrorInterceptor())
.target("http://localhost:" + server.getPort());
.target("http://localhost:" + server.getPort());
assertEquals("ResponseInterceptor did not extract the response body", body, api.post());
}

Expand All @@ -1077,10 +1077,10 @@ public void responseInterceptorChain() throws Exception {
server.enqueue(new MockResponse().setResponseCode(503).setBody(body));

TestInterface api = new TestInterfaceBuilder().responseInterceptor(new RedirectionInterceptor())
.responseInterceptor(new ErrorInterceptor()).target("http://localhost:" + server.getPort());
.responseInterceptor(new ErrorInterceptor()).target("http://localhost:" + server.getPort());

assertEquals("RedirectionInterceptor did not extract the location header", location,
api.post());
api.post());
assertEquals("ResponseInterceptor did not extract the response body", body, api.post());
}

Expand Down
10 changes: 5 additions & 5 deletions core/src/test/java/feign/MultipleLoggerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testAppendSeveralFilesToOneJavaLogger() throws Exception {
.appendToFile(tmp.newFile("1.log").getAbsolutePath())
.appendToFile(tmp.newFile("2.log").getAbsolutePath());
java.util.logging.Logger inner = getInnerLogger(logger);
assert (inner.getHandlers().length == 2);
assert(inner.getHandlers().length == 2);
}

@Test
Expand All @@ -47,9 +47,9 @@ public void testJavaLoggerInstantiationWithLoggerName() throws Exception {
Logger.JavaLogger l2 = new Logger.JavaLogger("Second client")
.appendToFile(tmp.newFile("2.log").getAbsolutePath());
java.util.logging.Logger logger1 = getInnerLogger(l1);
assert (logger1.getHandlers().length == 1);
assert(logger1.getHandlers().length == 1);
java.util.logging.Logger logger2 = getInnerLogger(l2);
assert (logger2.getHandlers().length == 1);
assert(logger2.getHandlers().length == 1);
}

@Test
Expand All @@ -59,9 +59,9 @@ public void testJavaLoggerInstantationWithClazz() throws Exception {
Logger.JavaLogger l2 = new Logger.JavaLogger(Integer.class)
.appendToFile(tmp.newFile("2.log").getAbsolutePath());
java.util.logging.Logger logger1 = getInnerLogger(l1);
assert (logger1.getHandlers().length == 1);
assert(logger1.getHandlers().length == 1);
java.util.logging.Logger logger2 = getInnerLogger(l2);
assert (logger2.getHandlers().length == 1);
assert(logger2.getHandlers().length == 1);
}

}

0 comments on commit 6fa78d7

Please sign in to comment.