Skip to content

Commit

Permalink
Remove usage of internal jcommander helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Jan 14, 2020
1 parent 08d2e4b commit 00b5618
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

package io.prestosql.tempto.internal.configuration;

import com.beust.jcommander.internal.Sets;
import io.prestosql.tempto.configuration.Configuration;
import io.prestosql.tempto.configuration.KeyUtils;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -101,7 +101,7 @@ private Optional<Object> getObject(String key)
@Override
public Set<String> listKeys()
{
Set<String> acc = Sets.newHashSet();
Set<String> acc = new HashSet<>();
listKeys(map, null, acc);
return acc;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package io.prestosql.tempto.internal.initialization;

import com.beust.jcommander.internal.Sets;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
import com.google.inject.Binder;
Expand Down Expand Up @@ -48,14 +47,15 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;

import static com.beust.jcommander.internal.Lists.newArrayList;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.Lists.reverse;
Expand Down Expand Up @@ -272,7 +272,7 @@ private void doFulfillment(TestContextStack<TestContext> testContextStack,
List<Class<? extends RequirementFulfiller>> fulfillerClasses,
Set<Requirement> requirements)
{
List<Class<? extends RequirementFulfiller>> successfulFulfillerClasses = newArrayList();
List<Class<? extends RequirementFulfiller>> successfulFulfillerClasses = new ArrayList<>();

try {
for (Class<? extends RequirementFulfiller> fulfillerClass : fulfillerClasses) {
Expand Down Expand Up @@ -349,7 +349,7 @@ private Set<Requirement> resolveAllTestsRequirements(ITestContext context)
{
// we cannot assume that context contains RequirementsAwareTestNGMethod instances here
// as interceptor is for some reason called after onStart() which uses this method.
Set<Requirement> allTestsRequirements = Sets.newHashSet();
Set<Requirement> allTestsRequirements = new HashSet<>();
for (ITestNGMethod iTestNGMethod : context.getAllTestMethods()) {
Set<Set<Requirement>> requirementsSets = new TestSpecificRequirementsResolver(configuration).resolve(iTestNGMethod);
for (Set<Requirement> requirementsSet : requirementsSets) {
Expand Down

0 comments on commit 00b5618

Please sign in to comment.