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

[LIC-Base] Simplify IO operations #1071

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

HannesWell
Copy link
Contributor

This PR simplifies the IO operations in the package org.eclipse.passage.lic.base.io by better leveraging Java's NIO Path API.

Some of the changes require Java-11. But since some other Plug-ins already use Java-11 as their lower bound (just like Eclipse-Platform) I assume this is OK.

@HannesWell HannesWell force-pushed the simplify branch 2 times, most recently from e896ba3 to bb64297 Compare April 5, 2022 16:03
@ruspl-afed
Copy link
Contributor

Hi @HannesWell ! Thank you for PR.
At the moment Eclipse Passage supports Java 8 since a lot of companies are still using Java 8 (and older Eclipse Platform).
Please open a dedicated issue if you have strong arguments that Eclipse Passage need to switch to Java 11.

@HannesWell
Copy link
Contributor Author

At the moment Eclipse Passage supports Java 8 since a lot of companies are still using Java 8 (and older Eclipse Platform). Please open a dedicated issue if you have strong arguments that Eclipse Passage need to switch to Java 11.

Understand, then I was misguided by some of the other Plug-ins that already require Java-11.
I updated this PR. It would only be a bit less code but no strong need for Java-11.

Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

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

Dear @HannesWell

We appreciate your effort very much.

First of all, you have found a serious bug, which is cool. Thank you!

Regarding main idea of the request: io operations are presented in Passage LIC in old-style facion for a reason: we cannot afford switchig to Java11 for Passage Core for observable future.

While products forming bundles (passage.loc, passage.fls) can indeed make use of Java11, all passage.lics must stick with Java8. We have integrations with Java8-only products, and thus must respect backward compatibility. Above this, becides Eclipse ecosystem, we build Passage LIC separately to be used in not-eclipse applications - here, too, keeping plain Java8 compatibility matters.

This means, all 8->11 porting work you've done will not pass. Sorry you wasted your resources for it.

Thank you again for spending so many time with our codebase :)

@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #1071 (a3b70bf) into master (4022e64) will decrease coverage by 0.03%.
The diff coverage is 96.00%.

@@             Coverage Diff              @@
##             master    #1071      +/-   ##
============================================
- Coverage     33.11%   33.07%   -0.04%     
  Complexity      346      346              
============================================
  Files          1156     1156              
  Lines         25623    25612      -11     
  Branches       1588     1587       -1     
============================================
- Hits           8485     8472      -13     
- Misses        16634    16636       +2     
  Partials        504      504              
Impacted Files Coverage Δ
...rg/eclipse/passage/lic/base/io/FileCollection.java 85.71% <85.71%> (-9.03%) ⬇️
...c/org/eclipse/passage/lic/base/io/FileContent.java 100.00% <100.00%> (ø)
...org/eclipse/passage/lic/base/io/FileKeyKeeper.java 35.00% <100.00%> (ø)
...org/eclipse/passage/lic/base/io/PathKeyKeeper.java 62.50% <100.00%> (ø)
.../src/org/eclipse/passage/lic/base/io/Settings.java 88.00% <100.00%> (-4.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4022e64...a3b70bf. Read the comment docs.

@eparovyshnaya
Copy link
Contributor

I updated this PR

Dear @HannesWell

Please have a look at code review concerns.

Copy link
Contributor Author

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Thank you for your detailed review and elaboration. I now understand the constraints of Project passage a bit better.
I implemented your remarks accordingly. :)

The changes that require Java-11 didn't took me long, so it's not a problem that I had to revert them.

Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

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

@HannesWell
IO usage looks ok, there are just some code quality issues

Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

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

@HannesWell minor notes left.

Make also sure you've updated copyright headers of changed files according to Eclipse Project Handbook:

  • place 2022 to last update position and
  • mention yourself in contributors list.

Copy link
Contributor Author

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Make also sure you've updated copyright headers of changed files according to Eclipse Project Handbook:

Sorry, I forgot that, thanks for the reminder. The years are updated in each file and I added myself as contributor in those files where I did more than a single line change.

Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

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

You did great adopting the changes for the project code quality standards!
One final touch and we are done :)

@HannesWell
Copy link
Contributor Author

You did great adopting the changes for the project code quality standards! One final touch and we are done :)

Thanks. I applied your final remark.

Signed-off-by: Hannes Wellmann <[email protected]>
Copy link
Contributor

@eparovyshnaya eparovyshnaya left a comment

Choose a reason for hiding this comment

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

Thank you )

@eparovyshnaya eparovyshnaya merged commit b2e54f0 into eclipse-passage:master Apr 8, 2022
@HannesWell
Copy link
Contributor Author

Thank you )

You are welcome and thank you for your reviews. :)

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.

3 participants