-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ride of guava #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generally in favour of this change, but I'd like to see few changes before I merge it. You will also need to submit signed CLA to takari.
@@ -38,7 +36,7 @@ | |||
|
|||
public static Comparator<MavenProject> create(MavenSession session) { | |||
final ProjectDependencyGraph dependencyGraph = session.getProjectDependencyGraph(); | |||
return create0(DependencyGraph.fromMaven(dependencyGraph), ImmutableMap.of(), p -> id(p)); | |||
return create0(DependencyGraph.fromMaven(dependencyGraph), new HashMap<>(), p -> id(p)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think emptyMap
is more appropriate here
this.rootProjects = ImmutableSet.copyOf(rootProjects); | ||
this.projects = ImmutableSet.copyOf(projects); | ||
this.rootProjects = new HashSet<>(rootProjects); | ||
this.projects = new HashSet<>(projects); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need immutable ordered sets here.
this.serviceTimes = ImmutableMap.copyOf(serviceTimes); | ||
this.bottleneckTimes = ImmutableMap.copyOf(bottleneckTimes); | ||
this.serviceTimes = new HashMap<>(serviceTimes); | ||
this.bottleneckTimes = new HashMap<>(bottleneckTimes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need immutable maps here, and I'd make them ordered just for consistency.
ImmutableMap.Builder<String, AtomicLong> serviceTimes = ImmutableMap.builder(); | ||
ImmutableMap.Builder<String, AtomicLong> bottleneckTimes = ImmutableMap.builder(); | ||
Map<String, AtomicLong> serviceTimes = new HashMap<>(); | ||
Map<String, AtomicLong> bottleneckTimes = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need immutable maps here, and I'd make them ordered just for consistency.
cf9401d
to
0bed705
Compare
Changes applied and CLA sent |
@velo Happy Birthday! |
Superseded with #26 |
Got class def not found when running with maven 3.5.4
Since it was not critical, I decided to take it away