From b4c783f4b544c81bb645691187896c76b1c565aa Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 2 Nov 2023 11:52:18 +0100 Subject: [PATCH] fix: remove redundant lombok.Setter and lombok.experimental.Accessors annotations Signed-off-by: Marc Nuri --- CHANGELOG.md | 3 +++ .../generator/nodes/JObjectExtraAnnotations.java | 6 ------ ...os.testCrontabExtraAnnotationsCrd.approved.txt | 15 --------------- .../it/src/it/cert-manager/expected/Auth.expected | 5 ----- .../it/cert-manager/{pom.xml.disabled => pom.xml} | 0 5 files changed, 3 insertions(+), 26 deletions(-) rename java-generator/it/src/it/cert-manager/{pom.xml.disabled => pom.xml} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba5411663d..a0227ea1cbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ### 6.10-SNAPSHOT #### Bugs +* Fix #5560: bump com.marcnuri.plugins:gradle-api-maven-plugin to v0.0.5, allows compilation behind a proxy +* Fix #5564: remove redundant lombok.Setter and lombok.experimental.Accessors annotations +* Fix #5565: bump sundrio to 0.101.3 to fix Visitor problems #### Improvements diff --git a/java-generator/core/src/main/java/io/fabric8/java/generator/nodes/JObjectExtraAnnotations.java b/java-generator/core/src/main/java/io/fabric8/java/generator/nodes/JObjectExtraAnnotations.java index c45226e5258..b9d33ab2478 100644 --- a/java-generator/core/src/main/java/io/fabric8/java/generator/nodes/JObjectExtraAnnotations.java +++ b/java-generator/core/src/main/java/io/fabric8/java/generator/nodes/JObjectExtraAnnotations.java @@ -31,12 +31,6 @@ default void addExtraAnnotations(ClassOrInterfaceDeclaration clz) { new Name("lombok.EqualsAndHashCode"), new NameExpr("callSuper = true"))); } - clz.addAnnotation("lombok.Setter"); - - clz.addAnnotation( - new SingleMemberAnnotationExpr( - new Name("lombok.experimental.Accessors"), - new NameExpr("prefix = {\n" + " \"_\",\n" + " \"\"\n" + "}"))); clz.addAnnotation( new SingleMemberAnnotationExpr( diff --git a/java-generator/core/src/test/resources/io/fabric8/java/generator/approvals/ApprovalTest.generate_withValidCrd_shouldGeneratePojos.testCrontabExtraAnnotationsCrd.approved.txt b/java-generator/core/src/test/resources/io/fabric8/java/generator/approvals/ApprovalTest.generate_withValidCrd_shouldGeneratePojos.testCrontabExtraAnnotationsCrd.approved.txt index 653fad82bfd..1423549ac39 100644 --- a/java-generator/core/src/test/resources/io/fabric8/java/generator/approvals/ApprovalTest.generate_withValidCrd_shouldGeneratePojos.testCrontabExtraAnnotationsCrd.approved.txt +++ b/java-generator/core/src/test/resources/io/fabric8/java/generator/approvals/ApprovalTest.generate_withValidCrd_shouldGeneratePojos.testCrontabExtraAnnotationsCrd.approved.txt @@ -7,11 +7,6 @@ CrontabJavaExtraAnnotationsCr[0] = package org.test.v1; @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") @lombok.ToString() @lombok.EqualsAndHashCode(callSuper = true) -@lombok.Setter() -@lombok.experimental.Accessors(prefix = { - "_", - "" -}) @io.sundr.builder.annotations.Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), @@ -33,11 +28,6 @@ CrontabJavaExtraAnnotationsCr[1] = package org.test.v1; @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") @lombok.ToString() @lombok.EqualsAndHashCode() -@lombok.Setter() -@lombok.experimental.Accessors(prefix = { - "_", - "" -}) @io.sundr.builder.annotations.Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), @@ -109,11 +99,6 @@ CrontabJavaExtraAnnotationsCr[2] = package org.test.v1; @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") @lombok.ToString() @lombok.EqualsAndHashCode() -@lombok.Setter() -@lombok.experimental.Accessors(prefix = { - "_", - "" -}) @io.sundr.builder.annotations.Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), diff --git a/java-generator/it/src/it/cert-manager/expected/Auth.expected b/java-generator/it/src/it/cert-manager/expected/Auth.expected index 07841593a26..240d293b197 100644 --- a/java-generator/it/src/it/cert-manager/expected/Auth.expected +++ b/java-generator/it/src/it/cert-manager/expected/Auth.expected @@ -5,11 +5,6 @@ package io.cert_manager.v1.issuerspec.vault; @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @lombok.ToString() @lombok.EqualsAndHashCode() -@lombok.Setter() -@lombok.experimental.Accessors(prefix = { - "_", - "" -}) @io.sundr.builder.annotations.Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), @io.sundr.builder.annotations.BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), diff --git a/java-generator/it/src/it/cert-manager/pom.xml.disabled b/java-generator/it/src/it/cert-manager/pom.xml similarity index 100% rename from java-generator/it/src/it/cert-manager/pom.xml.disabled rename to java-generator/it/src/it/cert-manager/pom.xml