Skip to content

Remove Cloneable interface #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class CloudFormationCustomResourceEvent implements Serializable, Cloneable {
public class CloudFormationCustomResourceEvent implements Serializable {

@JsonProperty("RequestType")
private String requestType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class CloudFrontEvent implements Serializable, Cloneable {
public class CloudFrontEvent implements Serializable {

private static final long serialVersionUID = -7169297388214516660L;

Expand All @@ -47,23 +47,14 @@ public class CloudFrontEvent implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Header implements Serializable, Cloneable {
public static class Header implements Serializable {

private static final long serialVersionUID = 7041042740552686996L;

private String key;

private String value;

@Override
public Header clone() {
try {
return (Header) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

/**
Expand All @@ -74,21 +65,12 @@ public Header clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Config implements Serializable, Cloneable {
public static class Config implements Serializable {

private static final long serialVersionUID = -286083903805870299L;

private String distributionId;

@Override
public Config clone() {
try {
return (Config) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

/**
Expand All @@ -99,7 +81,7 @@ public Config clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Request implements Serializable, Cloneable {
public static class Request implements Serializable {

private static final long serialVersionUID = 3245036101075464149L;

Expand All @@ -113,14 +95,6 @@ public static class Request implements Serializable, Cloneable {

private Map<String, List<Header>> headers;

@Override
public Request clone() {
try {
return (Request) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}

/**
Expand All @@ -131,7 +105,7 @@ public Request clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Response implements Serializable, Cloneable {
public static class Response implements Serializable {

private static final long serialVersionUID = -3711565862079053710L;

Expand All @@ -143,15 +117,6 @@ public static class Response implements Serializable, Cloneable {

private Map<String, List<Header>> headers;

@Override
public Response clone() {
try {
return (Response) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

/**
Expand All @@ -162,7 +127,7 @@ public Response clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class CF implements Serializable, Cloneable {
public static class CF implements Serializable {

private static final long serialVersionUID = -5940167419180448832L;

Expand All @@ -172,15 +137,6 @@ public static class CF implements Serializable, Cloneable {

private Response response;

@Override
public CF clone() {
try {
return (CF) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

/**
Expand All @@ -191,29 +147,11 @@ public CF clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Record implements Serializable, Cloneable {
public static class Record implements Serializable {

private static final long serialVersionUID = -6114551370798889850L;

private CF cf;

@Override
public Record clone() {
try {
return (Record) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

@Override
public CloudFrontEvent clone() {
try {
return (CloudFrontEvent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class CloudWatchLogsEvent implements Serializable, Cloneable {
public class CloudWatchLogsEvent implements Serializable {

private static final long serialVersionUID = -1617470828168156271L;

Expand All @@ -43,29 +43,11 @@ public class CloudWatchLogsEvent implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class AWSLogs implements Serializable, Cloneable {
public static class AWSLogs implements Serializable {

private static final long serialVersionUID = -7793438350437169987L;

private String data;

@Override
public AWSLogs clone() {
try {
return (AWSLogs) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

@Override
public CloudWatchLogsEvent clone() {
try {
return (CloudWatchLogsEvent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class CodeCommitEvent implements Serializable, Cloneable {
public class CodeCommitEvent implements Serializable {

private static final long serialVersionUID = 2404735479795009282L;

Expand All @@ -49,7 +49,7 @@ public class CodeCommitEvent implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Reference implements Serializable, Cloneable {
public static class Reference implements Serializable {

private static final long serialVersionUID = 9166524005926768827L;

Expand All @@ -58,15 +58,6 @@ public static class Reference implements Serializable, Cloneable {
private String ref;

private Boolean created;

@Override
public Reference clone() {
try {
return (Reference) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}

/**
Expand All @@ -77,20 +68,11 @@ public Reference clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class CodeCommit implements Serializable, Cloneable {
public static class CodeCommit implements Serializable {

private static final long serialVersionUID = 2594306162311794147L;

private List<Reference> references;

@Override
public CodeCommit clone() {
try {
return (CodeCommit) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}

/**
Expand All @@ -101,7 +83,7 @@ public CodeCommit clone() {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Record implements Serializable, Cloneable {
public static class Record implements Serializable {

private static final long serialVersionUID = 1116409777237432728L;

Expand Down Expand Up @@ -137,23 +119,5 @@ public static class Record implements Serializable, Cloneable {

private Integer eventTotalParts;

@Override
public Record clone() {
try {
return (Record) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}

@Override
public CodeCommitEvent clone() {
try {
return (CodeCommitEvent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class ConfigEvent implements Serializable, Cloneable {
public class ConfigEvent implements Serializable {

private static final long serialVersionUID = -3484211708255634243L;

Expand Down Expand Up @@ -92,13 +92,4 @@ public class ConfigEvent implements Serializable, Cloneable {
*/
private boolean eventLeftScope;

@Override
public ConfigEvent clone() {
try {
return (ConfigEvent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone()", e);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public class ConnectEvent implements Serializable, Cloneable {
public class ConnectEvent implements Serializable {

@JsonProperty("Details")
private Details details;
Expand All @@ -47,7 +47,7 @@ public class ConnectEvent implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Details implements Serializable, Cloneable {
public static class Details implements Serializable {

@JsonProperty("ContactData")
private ContactData contactData;
Expand All @@ -60,7 +60,7 @@ public static class Details implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class ContactData implements Serializable, Cloneable {
public static class ContactData implements Serializable {

@JsonProperty("Attributes")
private Map<String, String> attributes;
Expand Down Expand Up @@ -97,7 +97,7 @@ public static class ContactData implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class CustomerEndpoint implements Serializable, Cloneable {
public static class CustomerEndpoint implements Serializable {

@JsonProperty("Address")
private String address;
Expand All @@ -110,7 +110,7 @@ public static class CustomerEndpoint implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class SystemEndpoint implements Serializable, Cloneable {
public static class SystemEndpoint implements Serializable {

@JsonProperty("Address")
private String address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static IamPolicyResponseV1.Statement denyStatement(String resource) {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class PolicyDocument implements Serializable, Cloneable {
public static class PolicyDocument implements Serializable {

@JsonProperty("Version")
private String version;
Expand All @@ -102,7 +102,7 @@ public static class PolicyDocument implements Serializable, Cloneable {
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Statement implements Serializable, Cloneable {
public static class Statement implements Serializable {

@JsonProperty("Action")
private List<String> action;
Expand Down
Loading