Skip to content

Commit 1d389bf

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 537cdd7 commit 1d389bf

File tree

1 file changed

+4
-8
lines changed
  • build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/hdfs

1 file changed

+4
-8
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/hdfs/HdfsClassPatcher.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.objectweb.asm.ClassReader;
2424
import org.objectweb.asm.ClassVisitor;
2525
import org.objectweb.asm.ClassWriter;
26+
2627
import java.io.File;
2728
import java.io.FileOutputStream;
2829
import java.io.IOException;
@@ -40,7 +41,6 @@
4041

4142
import static java.util.Map.entry;
4243

43-
4444
@CacheableTransform
4545
public abstract class HdfsClassPatcher implements TransformAction<HdfsClassPatcher.Parameters> {
4646

@@ -57,10 +57,7 @@ record JarPatchers(String artifactName, Map<String, Function<ClassWriter, ClassV
5757
),
5858
new JarPatchers(
5959
"hadoop-auth",
60-
Map.of(
61-
"org/apache/hadoop/security/authentication/client/KerberosAuthenticator.class",
62-
SubjectGetSubjectPatcher::new
63-
)
60+
Map.of("org/apache/hadoop/security/authentication/client/KerberosAuthenticator.class", SubjectGetSubjectPatcher::new)
6461
)
6562
);
6663

@@ -81,9 +78,8 @@ public void transform(@NotNull TransformOutputs outputs) {
8178
File inputFile = getInputArtifact().get().getAsFile();
8279

8380
List<String> matchingArtifacts = getParameters().getMatchingArtifacts();
84-
if (matchingArtifacts.isEmpty() == false &&
85-
matchingArtifacts.stream().noneMatch(supported -> inputFile.getName().contains(supported))
86-
) {
81+
if (matchingArtifacts.isEmpty() == false
82+
&& matchingArtifacts.stream().noneMatch(supported -> inputFile.getName().contains(supported))) {
8783
outputs.file(getInputArtifact());
8884
} else {
8985
Stream<JarPatchers> patchersToApply = allPatchers.stream().filter(jp -> matchingArtifacts.contains(jp.artifactName()));

0 commit comments

Comments
 (0)