Skip to content

Commit

Permalink
Fix sonarcloud issues to trigger Java unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Feb 24, 2025
1 parent 7b5a37a commit c611bf6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions java/code/src/com/suse/manager/utils/SaltUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1117,10 +1117,8 @@ private void handleImageBuildData(ServerAction serverAction, JsonElement jsonRes
List<List<Object>> files = new ArrayList<>();
String imageDir = info.getName() + "-" + info.getVersion() + "-" + info.getRevisionNumber() + "/";
if (!buildInfo.getBundles().isEmpty()) {
buildInfo.getBundles().forEach(bundle -> {
files.add(List.of(bundle.getFilepath(),
imageDir + bundle.getFilename(), "bundle", bundle.getChecksum()));
});
buildInfo.getBundles().forEach(bundle -> files.add(List.of(bundle.getFilepath(),
imageDir + bundle.getFilename(), "bundle", bundle.getChecksum())));
}
else {
files.add(List.of(buildInfo.getImage().getFilepath(),
Expand Down Expand Up @@ -1721,12 +1719,11 @@ public static String packageToKey(InstalledPackage p) {
// name and EVR are never null due to DB constraints
// see schema/spacewalk/common/tables/rhnServerPackage.sql

String sb = p.getName().getName() +
return p.getName().getName() +
"-" +
p.getEvr().toUniversalEvrString() +
"." +
Optional.ofNullable(p.getArch()).map(PackageArch::toUniversalArchString).orElse("unknown");
return sb;
}

/**
Expand Down

0 comments on commit c611bf6

Please sign in to comment.