Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Getting ride of guava #12

wants to merge 1 commit into from

Conversation

velo
Copy link

@velo velo commented Oct 31, 2018

Got class def not found when running with maven 3.5.4

Since it was not critical, I decided to take it away

Copy link
Contributor

@ifedorenko ifedorenko left a 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));
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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<>();
Copy link
Contributor

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.

@velo velo force-pushed the master branch 2 times, most recently from cf9401d to 0bed705 Compare November 4, 2018 09:16
@velo
Copy link
Author

velo commented Nov 4, 2018

Changes applied and CLA sent

@cstamas
Copy link
Member

cstamas commented Nov 17, 2022

@velo Happy Birthday!

@gnodet
Copy link
Member

gnodet commented May 11, 2023

Superseded with #26

@gnodet gnodet closed this May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants