From 62f7f31ae46fb7d68a53f99b95e1ca9c670b53cb Mon Sep 17 00:00:00 2001 From: Adriano Machado <60320+ammachado@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:13:25 -0400 Subject: [PATCH] Fix compilation errors --- .../openrewrite/xml/XsltTransformation.java | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/rewrite-xml/src/main/java/org/openrewrite/xml/XsltTransformation.java b/rewrite-xml/src/main/java/org/openrewrite/xml/XsltTransformation.java index b7dbda99d19..2ad5c56ed50 100644 --- a/rewrite-xml/src/main/java/org/openrewrite/xml/XsltTransformation.java +++ b/rewrite-xml/src/main/java/org/openrewrite/xml/XsltTransformation.java @@ -15,11 +15,8 @@ */ package org.openrewrite.xml; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; import lombok.EqualsAndHashCode; import lombok.Value; -import lombok.extern.slf4j.Slf4j; import org.intellij.lang.annotations.Language; import org.openrewrite.ExecutionContext; import org.openrewrite.FindSourceFiles; @@ -36,7 +33,6 @@ import java.nio.charset.Charset; import java.util.Arrays; -@Slf4j @Value @EqualsAndHashCode(callSuper = true) public class XsltTransformation extends Recipe { @@ -44,12 +40,14 @@ public class XsltTransformation extends Recipe { @Nullable @Language("xml") @Option(displayName = "XSLT Configuration transformation", - description = "The transformation to be applied.") + description = "The transformation to be applied.", + required = false) String xslt; @Nullable @Option(displayName = "XSLT Configuration transformation classpath resource", - description = "Recipe transformation provided as a classpath resource.") + description = "Recipe transformation provided as a classpath resource.", + required = false) String xsltResource; @Option(displayName = "File pattern", @@ -69,17 +67,6 @@ public String getDescription() { return "Apply the specified XSLT transformation on."; } - @JsonCreator - public XsltTransformation( - @Nullable @JsonProperty("xslt") @Language("xml") String xslt, - @Nullable @JsonProperty("xsltResource") String xsltResource, - @JsonProperty("filePattern") String filePattern - ) { - this.xslt = xslt; - this.xsltResource = xsltResource; - this.filePattern = filePattern; - } - @Override public TreeVisitor getVisitor() { TreeVisitor visitor = new XsltTransformationVisitor(loadResource(xslt, xsltResource));