Skip to content

Commit

Permalink
Merge pull request #292 from jfdenise/master
Browse files Browse the repository at this point in the history
Fix for GAL-326, GAV based FP breaks update
  • Loading branch information
jfdenise authored Dec 10, 2020
2 parents 67d65c0 + 7ed7f14 commit 67f7901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 Red Hat, Inc. and/or its affiliates
* Copyright 2016-2020 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -629,7 +629,7 @@ public static String buildOptions(ResolvedPlugins plugins) {
public static String formatChannel(FeaturePackLocation loc) {
String channel = loc.getFrequency() == null ? loc.getChannel().getName() : loc.getChannel().getName()
+ "/" + loc.getFrequency();
return (loc.getUniverse() == null ? "" : loc.getUniverse() + "@") + channel;
return (loc.getUniverse() == null ? "" : loc.getUniverse() + "@") + (channel == null ? "" : channel);
}

private static String buildOptionsTable(Set<ProvisioningOption> options) {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jboss/galleon/universe/Channel.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 Red Hat, Inc. and/or its affiliates
* Copyright 2016-2020 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -50,7 +50,7 @@ default FeaturePackUpdatePlan getUpdatePlan(FeaturePackUpdatePlan.Request update
} catch(LatestVersionNotAvailableException e) {
// that also means no update
}
if (latestBuild != null && !(latestBuild.equals(fpl.getBuild()))) {
if (latestBuild != null && !latestBuild.isEmpty() && !(latestBuild.equals(fpl.getBuild()))) {
updateRequest.setNewLocation(fpl.replaceBuild(latestBuild));
}
return updateRequest.buildPlan();
Expand Down

0 comments on commit 67f7901

Please sign in to comment.