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

GLSP-1380: Remove dependency to Guava #244

Merged
merged 3 commits into from
Aug 30, 2024
Merged

GLSP-1380: Remove dependency to Guava #244

merged 3 commits into from
Aug 30, 2024

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Aug 27, 2024

What it does

Removes the dependency to Google Guava. We mostly used collection creation which can be done with native Java now almost as conveniently. Other than that we only used the BiMap for source model indexing in EMF. While Guavas BIMaps are powerful most of their functionality is not required for our usecases therefore the useage got replaced with a custom BiIndex implementation.

  • Replaces usage of Lists.newArrayList etc. with Java native calls
  • Guava Preconditions were only used in two places -> replaced with in method exception handling
  • Introduce a BiIndex helper class that serves as a replacement for Guavas BiMap in source model indexing
  • Add test cases for the new BiIndex
  • Update target platforms

Fixes eclipse-glsp/glsp#1380

Contributed on behalf of AxonIvy AG

How to test

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

Removes the dependency to Google Guava. We mostly used collection creation which can be done with native Java now almost as conveniently. Other than that we only used the BiMap for source model indexing in EMF. While Guavas BIMaps are powerful most of their functionality is not required for our usecases therefore the useage got replaced with a custom BiIndex implementation. 

 - Replaces usage of Lists.newArrayList etc. with Java native calls
 -  Guava Preconditions were only used in two places -> replaced with in method exception handling
- Introduce a `BIIndex` helper class that serves as a replacement for Guavas BIMap in source model indexing
- Add test cases for the new BiIndex
- Update target platforms

Fixes eclipse-glsp/glsp#1380

Contributed on behalf of AxonIvy AG
@tortmayr tortmayr marked this pull request as ready for review August 27, 2024 15:43
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, in general. Everything still seems to work as expected. I just a minor nitpick and I'm wondering about the dependency-reduced-pom.xml. Could you please elaborate?

@martin-fleck-at
Copy link
Contributor

This should probably mentioned in the changelog or do you think it won't be necessary?

@tortmayr
Copy link
Contributor Author

tortmayr commented Aug 29, 2024

This should probably mentioned in the changelog or do you think it won't be necessary?

Yes, you are right. I forgot to tick the checkboxes. Should definitely be added to the changelog

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tortmayr tortmayr merged commit c2b0676 into master Aug 30, 2024
6 checks passed
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.

Check Guava dependency in Java Server
2 participants