Skip to content

Polish #42075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed

Polish #42075

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private void addAntoraContentStartPaths(Set<String> startPaths) {
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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static ManagedDependencies ofBom(File bom) {

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private ConfigurationPropertiesBeanDescriptor describeBean(ObjectMapper mapper,
@SuppressWarnings({ "unchecked" })
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean, String prefix) {
try {
return new HashMap<>(mapper.convertValue(bean, Map.class));
return new HashMap<String, Object>(mapper.convertValue(bean, Map.class));
}
catch (Exception ex) {
return new HashMap<>(Collections.singletonMap("error", "Cannot serialize '" + prefix + "'"));
Expand Down