Skip to content

Commit

Permalink
Eliminate Guava
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jan 22, 2024
1 parent 7786066 commit fbdebb3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 4 additions & 1 deletion changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="1.16.6" date="not released">
<release version="1.17.0" date="not released">
<action type="update" dev="sseifert" issue="57">
Special handling for detecting ".cfg.json" file extensions.
</action>
<action type="remove" dev="sseifert" issue="59">
Remove Guava dependency.
</action>
</release>

<release version="1.16.4" date="2023-10-18">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
Expand All @@ -53,8 +54,6 @@
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.archiver.jar.ManifestException;

import com.google.common.collect.ImmutableList;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.wcm.devops.conga.generator.export.ModelExport;
import io.wcm.devops.conga.resource.Resource;
Expand Down Expand Up @@ -200,7 +199,7 @@ protected ModelExport getModelExport() {

String[] nodeExportPlugins = StringUtils.split(this.modelExportNode, ",");
if (nodeExportPlugins != null) {
modelExport.setNode(ImmutableList.copyOf(nodeExportPlugins));
modelExport.setNode(Arrays.asList(nodeExportPlugins));
}

return modelExport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.zip.ZipArchiver;

import com.google.common.collect.ImmutableSet;

import io.wcm.devops.conga.generator.util.FileUtil;

/**
Expand Down Expand Up @@ -83,7 +81,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
private void buildGeneratedConfigurationAttachments() throws MojoExecutionException, MojoFailureException {
Set<String> selectedEnvironments;
if (environments != null && environments.length > 0) {
selectedEnvironments = ImmutableSet.copyOf(environments);
selectedEnvironments = Set.copyOf(Arrays.asList(environments));
}
else {
selectedEnvironments = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
import org.sonatype.plexus.build.incremental.BuildContext;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

import com.google.common.collect.ImmutableList;

import io.wcm.devops.conga.generator.GeneratorException;
import io.wcm.devops.conga.generator.GeneratorOptions;
import io.wcm.devops.conga.generator.UrlFileManager;
Expand Down Expand Up @@ -153,7 +151,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
.logger(new MavenSlf4jLogFacade(getLog()));

// validate that all templates can be compiled
HandlebarsManager handlebarsManager = new HandlebarsManager(ImmutableList.of(templateDir), pluginContextOptions);
HandlebarsManager handlebarsManager = new HandlebarsManager(List.of(templateDir), pluginContextOptions);
validateFiles(templateDir, templateDir, new TemplateValidator(templateDir, handlebarsManager));

// validate that roles reference existing templates
Expand Down

0 comments on commit fbdebb3

Please sign in to comment.