mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-21 15:55:40 +00:00
[JENKINS-45235] There go those pesky tests catching bugs again
This commit is contained in:
1 parent
4bf99bae6e
commit
ec7d802ba1
2 files changed
+9
-4
No files matched your search
@@ -618,11 +618,16 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
|
||||
* Gets the plugin with the given name from the first {@link UpdateSite} to contain it.
|
||||
* @return Discovered {@link Plugin}. {@code null} if it cannot be found
|
||||
*/
|
||||
public @CheckForNull Plugin getPlugin(String artifactId, VersionNumber minVersion) {
|
||||
public @CheckForNull Plugin getPlugin(String artifactId, @CheckForNull VersionNumber minVersion) {
|
||||
if (minVersion == null) {
|
||||
return getPlugin(artifactId);
|
||||
}
|
||||
for (UpdateSite s : sites) {
|
||||
Plugin p = s.getPlugin(artifactId);
|
||||
if (minVersion.isNewerThan(new VersionNumber(p.version))) continue;
|
||||
if (p!=null) return p;
|
||||
if (p!=null) {
|
||||
if (minVersion.isNewerThan(new VersionNumber(p.version))) continue;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1066,7 +1066,7 @@ public class UpdateSite {
|
||||
List<Plugin> deps = new ArrayList<Plugin>();
|
||||
|
||||
for(Map.Entry<String,String> e : dependencies.entrySet()) {
|
||||
VersionNumber requiredVersion = new VersionNumber(e.getValue());
|
||||
VersionNumber requiredVersion = e.getValue() != null ? new VersionNumber(e.getValue()) : null;
|
||||
Plugin depPlugin = Jenkins.getInstance().getUpdateCenter().getPlugin(e.getKey(), requiredVersion);
|
||||
if (depPlugin == null) {
|
||||
LOGGER.log(Level.WARNING, "Could not find dependency {0} of {1}", new Object[] {e.getKey(), name});
|
||||
|
||||
Reference in new issue
Block a user