Skip to content

Commit

Permalink
Remove trailing space after integer-based enums (#255)
Browse files Browse the repository at this point in the history
This was accidentally introduced as part of #253.
  • Loading branch information
jparise authored Jan 3, 2020
1 parent 9e5c65f commit e4e5e72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Examples/Java/Sources/Everything.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public int getValue() {
}

public enum EverythingIntEnum {
@SerializedName("-1") INT_CASE_1(-1),
@SerializedName("-1") INT_CASE_1(-1),
@SerializedName("65536") INT_CASE_2(65536);
private final int value;
EverythingIntEnum(int value) {
Expand All @@ -52,7 +52,7 @@ public int getValue() {
}

public enum EverythingNsintegerEnum {
@SerializedName("-1") NSINTEGER_CASE_1(-1),
@SerializedName("-1") NSINTEGER_CASE_1(-1),
@SerializedName("4294967295") NSINTEGER_CASE_2(4294967295);
private final int value;
EverythingNsintegerEnum(int value) {
Expand All @@ -75,7 +75,7 @@ public int getValue() {
}

public enum EverythingShortEnum {
@SerializedName("-1") SHORT_CASE_1(-1),
@SerializedName("-1") SHORT_CASE_1(-1),
@SerializedName("256") SHORT_CASE_2(256);
private final int value;
EverythingShortEnum(int value) {
Expand Down
4 changes: 2 additions & 2 deletions Examples/Java/Sources/Pin.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
public class Pin {

public enum PinInStock {
@SerializedName("-1") UNKNOWN(-1),
@SerializedName("0") OUT_OF_STOCK(0),
@SerializedName("-1") UNKNOWN(-1),
@SerializedName("0") OUT_OF_STOCK(0),
@SerializedName("1") IN_STOCK(1);
private final int value;
PinInStock(int value) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/JavaIR.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public struct JavaIR {
case let .integer(values):
let names = values
.map { ($0.description, $0.defaultValue) }
.map { "@\(JavaAnnotation.serializedName(name: "\($0.1)").rendered) \($0.0.uppercased())(\($0.1))" }.joined(separator: ", \n")
.map { "@\(JavaAnnotation.serializedName(name: "\($0.1)").rendered) \($0.0.uppercased())(\($0.1))" }.joined(separator: ",\n")
let enumInitializer = JavaIR.method([], "\(name)(int value)") { [
"this.value = value;",
] }
Expand Down

0 comments on commit e4e5e72

Please sign in to comment.