Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compilation errors
Browse files Browse the repository at this point in the history
ammachado committed Jun 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d0cc544 commit 62f7f31
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -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,20 +33,21 @@
import java.nio.charset.Charset;
import java.util.Arrays;

@Slf4j
@Value
@EqualsAndHashCode(callSuper = true)
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<?, ExecutionContext> getVisitor() {
TreeVisitor<?, ExecutionContext> visitor = new XsltTransformationVisitor(loadResource(xslt, xsltResource));

0 comments on commit 62f7f31

Please sign in to comment.