Skip to content

Commit

Permalink
Remove unused fields from @JsonPropertyOrder annotation (#10890)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj authored Nov 30, 2024
1 parent 36fc647 commit 03e3045
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
@Buildable(editableEnabled = false, builderPackage = Constants.FABRIC8_KUBERNETES_API)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "name", "path", "subPath", "secret", "configMap", "emptyDir", "persistentVolumeClaim" })
@JsonPropertyOrder({ "name", "secret", "configMap", "emptyDir", "persistentVolumeClaim" })
@OneOf({
@OneOf.Alternative({
@OneOf.Alternative.Property(value = "secret", required = false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "deployment", "pod", "container", "serviceAccount", "additionalProperties" })
@JsonPropertyOrder({ "deployment", "pod", "container", "serviceAccount" })
@EqualsAndHashCode
@ToString
public class JmxTransTemplate implements UnknownPropertyPreserving {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "version", "replicas", "image", "bootstrapServers",
"tls", "authentication", "config", "resources", "livenessProbe",
"readinessProbe", "jvmOptions", "jmxOptions", "affinity", "tolerations",
"logging", "clientRackInitImage", "rack", "metricsConfig", "tracing",
"template", "externalConfiguration", "build" })
@JsonPropertyOrder({ "version", "replicas", "image", "bootstrapServers", "tls", "authentication", "config", "resources",
"livenessProbe", "readinessProbe", "jvmOptions", "jmxOptions", "logging", "clientRackInitImage", "rack",
"metricsConfig", "tracing", "template", "externalConfiguration", "build" })
@EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
@ToString(callSuper = true)
public class KafkaConnectSpec extends AbstractKafkaConnectSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"type", "clientId", "tokenEndpointUri",
"tlsTrustedCertificates", "disableTlsHostnameVerification",
@JsonPropertyOrder({"type", "clientId", "tokenEndpointUri", "tlsTrustedCertificates", "disableTlsHostnameVerification",
"delegateToKafkaAcls", "grantsRefreshPeriodSeconds", "grantsRefreshPoolSize", "grantsMaxIdleTimeSeconds",
"grantsMaxIdleSeconds", "grantsGcPeriodSeconds", "grantsAlwaysLatest", "KafkaAuthorizationKeycloak", "superUsers",
"connectTimeoutSeconds", "readTimeoutSeconds", "httpRetries", "enableMetrics", "includeAcceptHeader"})
"grantsGcPeriodSeconds", "grantsAlwaysLatest", "superUsers", "connectTimeoutSeconds", "readTimeoutSeconds",
"httpRetries", "enableMetrics", "includeAcceptHeader"})
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class KafkaAuthorizationKeycloak extends KafkaAuthorization {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "kafka", "zookeeper", "topicOperator",
"entityOperator", "clusterCa", "clientsCa",
"maintenance", "cruiseControl", "jmxTrans", "kafkaExporter", "maintenanceTimeWindows"})
@JsonPropertyOrder({ "kafka", "zookeeper", "entityOperator", "clusterCa", "clientsCa", "cruiseControl", "jmxTrans",
"kafkaExporter", "maintenanceTimeWindows"})
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class KafkaSpec extends Spec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
* Configures Kafka listeners
*/
@DescriptionFile
@JsonPropertyOrder({"brokerCertChainAndKey", "class", "preferredAddressType", "externalTrafficPolicy",
"loadBalancerSourceRanges", "bootstrap", "brokers", "ipFamilyPolicy", "ipFamilies", "createBootstrapService",
"finalizers", "useServiceDnsDomain", "maxConnections", "maxConnectionCreationRate", "preferredNodePortAddressType",
"publishNotReadyAddresses", "hostTemplate", "advertisedHostTemplate", "allocateLoadBalancerNodePorts"})
@JsonPropertyOrder({"brokerCertChainAndKey", "class", "externalTrafficPolicy", "loadBalancerSourceRanges", "bootstrap",
"brokers", "ipFamilyPolicy", "ipFamilies", "createBootstrapService", "finalizers", "useServiceDnsDomain",
"maxConnections", "maxConnectionCreationRate", "preferredNodePortAddressType", "publishNotReadyAddresses",
"hostTemplate", "advertisedHostTemplate", "allocateLoadBalancerNodePorts"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Buildable(
editableEnabled = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
* Configures listener bootstrap configuration
*/
@DescriptionFile
@JsonPropertyOrder({"alternativeNames", "host", "dnsAnnotations", "nodePort", "loadBalancerIP",
"annotations", "labels", "externalIPs"})
@JsonPropertyOrder({"alternativeNames", "host", "nodePort", "loadBalancerIP", "annotations", "labels", "externalIPs"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Buildable(
editableEnabled = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* Configures listener per-broker configuration
*/
@DescriptionFile
@JsonPropertyOrder({"broker", "advertisedHost", "advertisedPort", "host", "dnsAnnotations", "nodePort",
"loadBalancerIP", "annotations", "labels", "externalIPs"})
@JsonPropertyOrder({"broker", "advertisedHost", "advertisedPort", "host", "nodePort", "loadBalancerIP", "annotations", "labels", "externalIPs"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Buildable(
editableEnabled = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "address", "host", "port" })
@JsonPropertyOrder({ "host", "port" })
@EqualsAndHashCode
@ToString
public class ListenerAddress implements UnknownPropertyPreserving {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"numStreams", "offsetCommitInterval", "bootstrapServers", "groupId", "logging",
"authentication", "tls", "config", "livenessProbe", "readinessProbe"})
@JsonPropertyOrder({"numStreams", "offsetCommitInterval", "bootstrapServers", "groupId", "authentication", "tls", "config"})
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class KafkaMirrorMakerConsumerSpec extends KafkaMirrorMakerClientSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "bootstrapServers", "abortOnSendFailure", "logging", "authentication", "config", "tls"})
@JsonPropertyOrder({ "bootstrapServers", "abortOnSendFailure", "authentication", "config", "tls"})
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class KafkaMirrorMakerProducerSpec extends KafkaMirrorMakerClientSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"version", "replicas", "image", "connectCluster",
"clusters", "mirrors", "resources", "livenessProbe", "readinessProbe",
"jvmOptions", "jmxOptions", "affinity", "tolerations", "logging",
"clientRackInitImage", "rack", "metricsConfig", "tracing",
@JsonPropertyOrder({"version", "replicas", "image", "connectCluster", "clusters", "mirrors", "resources", "livenessProbe",
"readinessProbe", "jvmOptions", "jmxOptions", "logging", "clientRackInitImage", "rack", "metricsConfig", "tracing",
"template", "externalConfiguration" })
@EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
@ToString(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
builderPackage = Constants.FABRIC8_KUBERNETES_API
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "targetReplicas", "state", "userTaskId", "message", "sessionId" })
@JsonPropertyOrder({ "targetReplicas", "state", "message", "sessionId" })
@EqualsAndHashCode
@ToString(callSuper = true)
public class ReplicasChangeStatus implements UnknownPropertyPreserving {
Expand Down

0 comments on commit 03e3045

Please sign in to comment.