Tabs to Spaces, Extract constant
@@ -88,6 +88,7 @@ import org.slf4j.LoggerFactory;
public class KarafTestSupport {
+ private static final EnumSet<org.apache.karaf.features.FeaturesService.Option> NO_AUTO_REFRESH = EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles);
public static final String MIN_RMI_SERVER_PORT = "44444";
public static final String MAX_RMI_SERVER_PORT = "66666";
public static final String MIN_HTTP_PORT = "9080";
@@ -552,7 +553,7 @@ public class KarafTestSupport {
}
protected void installAndAssertFeature(String feature) throws Exception {
- featureService.installFeature(feature, EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
+ featureService.installFeature(feature, NO_AUTO_REFRESH);
assertFeatureInstalled(feature);
}
@@ -565,7 +566,7 @@ public class KarafTestSupport {
Set<String> features = new HashSet<>(Arrays.asList(feature));
try {
System.out.println("Installing " + features);
- featureService.installFeatures(features, EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
+ featureService.installFeatures(features, NO_AUTO_REFRESH);
for (String curFeature : feature) {
assertFeatureInstalled(curFeature);
}
@@ -573,7 +574,7 @@ public class KarafTestSupport {
} finally {
System.out.println("Uninstalling " + features);
try {
- featureService.uninstallFeatures(features, EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
+ featureService.uninstallFeatures(features, NO_AUTO_REFRESH);
} catch (Exception e) {
if (success) {
throw e;
@@ -599,7 +600,7 @@ public class KarafTestSupport {
}
try {
System.out.println("Uninstalling " + uninstall);
- featureService.uninstallFeatures(uninstall, EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
+ featureService.uninstallFeatures(uninstall, NO_AUTO_REFRESH);
} catch (Exception e) {
LOG.error(e.getMessage(), e);
}
