Skip to content

Commit

Permalink
camel-jbang - Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Mar 17, 2023
1 parent b342115 commit a643a7f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Integer doCall() throws Exception {
}

CamelCatalog catalog = new DefaultCamelCatalog();
List<ReleaseModel> releases = runtime.equals("quarkus") ? catalog.camelQuarkusReleases() : catalog.camelReleases();
List<ReleaseModel> releases = "quarkus".equals(runtime) ? catalog.camelQuarkusReleases() : catalog.camelReleases();

List<Row> rows = new ArrayList<>();
for (String[] v : versions) {
Expand All @@ -111,7 +111,7 @@ public Integer doCall() throws Exception {
row.runtimeVersion = v[1];

// enrich with details from catalog (if we can find any)
String catalogVersion = runtime.equals("quarkus") ? v[1] : v[0];
String catalogVersion = "quarkus".equals(runtime) ? v[1] : v[0];
ReleaseModel rm = releases.stream().filter(r -> catalogVersion.equals(r.getVersion())).findFirst().orElse(null);
if (rm != null) {
row.releaseDate = rm.getDate();
Expand Down

0 comments on commit a643a7f

Please sign in to comment.