mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-05 03:40:56 +01:00
fix installation of plugins without condition
This commit is contained in:
@@ -58,6 +58,8 @@ import java.util.Set;
|
||||
public final class InstalledPluginDescriptor extends ScmModule implements PluginDescriptor
|
||||
{
|
||||
|
||||
private static final PluginCondition EMPTY_CONDITION = new PluginCondition();
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
@@ -168,7 +170,7 @@ public final class InstalledPluginDescriptor extends ScmModule implements Plugin
|
||||
@Override
|
||||
public PluginCondition getCondition()
|
||||
{
|
||||
return condition;
|
||||
return MoreObjects.firstNonNull(condition, EMPTY_CONDITION);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,6 +50,11 @@ import java.util.Arrays;
|
||||
public class PluginConditionTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void testEmptyShouldBeSupported() {
|
||||
assertTrue(new PluginCondition().isSupported());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user