Skip to content
Permalink
Browse files
chore: fix deprecation warnings
  • Loading branch information
lburgazzoli committed Nov 2, 2021
1 parent 9f7f52d commit c726ce5ef11e6ff509a33799075098bc9c032d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
@@ -28,6 +28,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

import org.apache.maven.artifact.Artifact;
@@ -40,7 +41,6 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.utils.StringUtils;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;

@@ -93,8 +93,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}

private boolean isCompileOrRuntime(Artifact artifact) {
return StringUtils.equals(artifact.getScope(), DefaultArtifact.SCOPE_COMPILE)
|| StringUtils.equals(artifact.getScope(), DefaultArtifact.SCOPE_RUNTIME);
return Objects.equals(artifact.getScope(), DefaultArtifact.SCOPE_COMPILE)
|| Objects.equals(artifact.getScope(), DefaultArtifact.SCOPE_RUNTIME);
}

private Map<String, String> artifactToMap(Artifact artifact) {
@@ -20,7 +20,7 @@
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

import org.apache.maven.shared.utils.io.IOUtil;
import org.apache.commons.io.IOUtils;

public final class GenerateSupport {
private GenerateSupport() {
@@ -32,7 +32,7 @@ public static String getResourceAsString(String resource) throws IOException {
throw new IllegalStateException("Unable to find catalog-license.txt");
}

return IOUtil.toString(is, StandardCharsets.UTF_8.name());
return IOUtils.toString(is, StandardCharsets.UTF_8.name());
}
}
}

0 comments on commit c726ce5

Please sign in to comment.