From 4316d5cbf0ff3ae0caa0e82fd0c84a118262dfe5 Mon Sep 17 00:00:00 2001 From: Valentin Delaye Date: Mon, 9 Dec 2024 16:09:19 +0100 Subject: [PATCH] Cleanup otherFiles on metadata (#424) --- .../core/extractor/MetadataCollector.java | 11 ----------- .../core/extractor/PluginMetadata.java | 13 ------------- 2 files changed, 24 deletions(-) diff --git a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/MetadataCollector.java b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/MetadataCollector.java index eb35a1d3..5ffa62aa 100644 --- a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/MetadataCollector.java +++ b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/MetadataCollector.java @@ -59,7 +59,6 @@ public String getDescription() { */ public static class MetadataAccumulator { private final List commonFiles = new ArrayList<>(); - private final List otherFiles = new ArrayList<>(); private final Set flags = new HashSet<>(); private final Set jdkVersions = new HashSet<>(); @@ -67,10 +66,6 @@ public List getCommonFiles() { return commonFiles; } - public List getOtherFiles() { - return otherFiles; - } - public Set getJdkVersions() { return jdkVersions; } @@ -79,10 +74,6 @@ public void addCommonFile(ArchetypeCommonFile file) { commonFiles.add(file); } - public void addOtherFile(String file) { - otherFiles.add(file); - } - public void addJdk(JDK jdk) { jdkVersions.add(jdk); } @@ -116,7 +107,6 @@ public Tree visit(Tree tree, ExecutionContext ctx) { acc.addCommonFile(commonFile); LOG.debug("File {} is a common file", sourceFile.getSourcePath()); } else { - acc.addOtherFile(sourceFile.getSourcePath().toString()); LOG.debug("File {} is not a common file", sourceFile.getSourcePath()); } groovyIsoVisitor.visit(tree, ctx); @@ -263,7 +253,6 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { resolvedPom.getManagedVersion("org.jenkins-ci.main", "jenkins-core", null, null)); pluginMetadata.setFlags(acc.getFlags()); pluginMetadata.setCommonFiles(acc.getCommonFiles()); - pluginMetadata.setOtherFiles(acc.getOtherFiles()); pluginMetadata.setJdks(acc.getJdkVersions()); // Write the metadata to a file for later use by the plugin modernizer. diff --git a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/PluginMetadata.java b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/PluginMetadata.java index 8b642130..78c201f9 100644 --- a/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/PluginMetadata.java +++ b/plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/extractor/PluginMetadata.java @@ -38,11 +38,6 @@ public class PluginMetadata extends CacheEntry implements Serial */ private List commonFiles; - /** - * List of other files present in the plugin - */ - private List otherFiles; - /** * JDK versions supported by the plugin */ @@ -143,14 +138,6 @@ public void setCommonFiles(List commonFiles) { this.commonFiles = commonFiles; } - public List getOtherFiles() { - return otherFiles; - } - - public void setOtherFiles(List otherFiles) { - this.otherFiles = otherFiles; - } - public Set getJdks() { return jdkVersions; }