Merge pull request #42075 from PiyalAhmed

* pr/42075:
  Polish

Closes gh-42075
This commit is contained in:
Phillip Webb
2024-09-01 19:04:28 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -175,7 +175,7 @@ public abstract class GenerateAntoraPlaybook extends DefaultTask {
private void addDir(Map<String, Object> data) {
Path playbookDir = toRealPath(getOutputFile().get().getAsFile().toPath()).getParent();
Path outputDir = toRealPath(getProject().getBuildDir().toPath().resolve("site"));
data.put("output", Map.of("dir", "." + File.separator + playbookDir.relativize(outputDir).toString()));
data.put("output", Map.of("dir", "." + File.separator + playbookDir.relativize(outputDir)));
}
@SuppressWarnings("unchecked")

View File

@@ -99,7 +99,7 @@ class ManagedDependencies {
static String asId(String groupId, String artifactId, String version, String classifier) {
String id = groupId + ":" + artifactId + ":" + version;
if (classifier != null && classifier.length() > 0) {
if (classifier != null && !classifier.isEmpty()) {
id = id + ":" + classifier;
}
return id;