Skip to content

Commit

Permalink
step: jdk8 compatibility poc
Browse files Browse the repository at this point in the history
  • Loading branch information
astubbs committed Nov 3, 2021
1 parent 778f5f7 commit 10dcd2a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.util.stream.Collectors;

import static java.util.Arrays.stream;
import static java.util.Set.of;
import static java.util.stream.Collectors.toSet;

/**
Expand Down Expand Up @@ -125,7 +124,7 @@ private void addTests(final Set<ThreeSystem> allTypes) {
@Override
public void generateFromPackagesOf(Class<?>... classes) {
Optional<Class<?>> first = stream(classes).findFirst();
if (first.isEmpty()) throw new IllegalArgumentException("Must provide at least one Class");
if (!first.isPresent()) throw new IllegalArgumentException("Must provide at least one Class");
SourceClassSets ss = new SourceClassSets(first.get().getPackage().getName());
ss.generateAllFoundInPackagesOf(classes);
generate(ss);
Expand Down Expand Up @@ -159,7 +158,7 @@ public Map<Class<?>, ThreeSystem> generate(SourceClassSets ss) {

// skeletons generation is independent and should be able to be done in parallel
Set<ThreeSystem> skeletons = packages.parallelStream().flatMap(
aPackage -> generateSkeletonsFromPackages(of(aPackage), overallEntryPoint).stream()
aPackage -> generateSkeletonsFromPackages(Set.of(aPackage), overallEntryPoint).stream()
).collect(toSet());

// custom package destination
Expand Down

0 comments on commit 10dcd2a

Please sign in to comment.