Browse Source

fix: field of enum must be final (#1577)

pull/1580/head
jizhuozhi 3 years ago committed by GitHub
parent
commit
8bbc2600dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/src/main/java/feign/Request.java
  2. 2
      core/src/main/java/feign/template/Template.java

2
core/src/main/java/feign/Request.java

@ -36,7 +36,7 @@ public final class Request implements Serializable { @@ -36,7 +36,7 @@ public final class Request implements Serializable {
public enum ProtocolVersion {
HTTP_1_0("HTTP/1.0"), HTTP_1_1("HTTP/1.1"), HTTP_2("HTTP/2.0"), MOCK;
String protocolVersion;
final String protocolVersion;
ProtocolVersion() {
protocolVersion = name();

2
core/src/main/java/feign/template/Template.java

@ -329,7 +329,7 @@ public class Template { @@ -329,7 +329,7 @@ public class Template {
public enum EncodingOptions {
REQUIRED(true), NOT_REQUIRED(false);
private boolean shouldEncode;
private final boolean shouldEncode;
EncodingOptions(boolean shouldEncode) {
this.shouldEncode = shouldEncode;

Loading…
Cancel
Save