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

Remove unused GPL-licensed code #9009

Merged
merged 3 commits into from
Sep 13, 2023
Merged

Conversation

bencomp
Copy link
Contributor

@bencomp bencomp commented Oct 2, 2022

For unknown reasons, in 2009 several files from the JDK were copied into the Dataverse codebase, instead of referenced.
It appears that these classes weren't really used.

What this PR does / why we need it:

It removes clear examples of license confusion (if not copyright infringement) caused by including GPL-licensed code in a Apache 2.0 codebase with Harvard copyright notice. I am not a lawyer, however, and wouldn't want to get involved in legal troubles.

Which issue(s) this PR closes:

Partially addresses #2576 – which had been closed "while waiting for legal advice".

Special notes for your reviewer:

If you ever want to use services and service providers, you could do it the Java way, explained at https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ServiceLoader.html.

It appears that @landreev wanted to use the ServiceRegistry at some point in TabularDataFileReader.getTabDataReaderByMimeType(String mimeType).

I'd appreciate a positive review to have this PR count towards my Hacktoberfest goal.

Suggestions on how to test this:

See that there are no compilation errors and test failures without these classes. Check that there are no more references to these classes in comments.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

For unknown reasons, in 2009 several files from the JDK were copied into
the Dataverse codebase, instead of referenced.
It appears that these classes weren't really used.
@bencomp
Copy link
Contributor Author

bencomp commented Oct 3, 2022

I just noticed that the ServiceLoader pattern is in use for Exporters, so it's not completely new. :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 20.051% when pulling ddfae97 on bencomp:remove-gpl-code into 470f99b on IQSS:develop.

Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

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

It does indeed look like unused code (and build/test passes). FWIW, it does not look like there is any copyright/license issue - the Classpath Exception on these classes is meant to allow them to be used in other software (on a different classpath) without the GPL applying.

@bencomp
Copy link
Contributor Author

bencomp commented Dec 5, 2022

Thanks for the review, @qqmyers ! I wasn't aware of the Classpath Exception.
So even if copyright may not have been an issue, removing these unused classes may allow more attention to go to actually used classes.

@bencomp
Copy link
Contributor Author

bencomp commented Aug 23, 2023

Is there anything that I can do to get this merged? The checks passed and there was a positive review over 9 months ago… Of course I don't want to sound impatient 😉

@landreev
Copy link
Contributor

Hello,
I personally simply missed this PR last fall. And it looks like nobody ever put it into our workflow queue, and that was the only reason it sat all this time. (Not because anybody thought there was a problem with the PR).
We are not merging new PRs right now, because we are in the process of putting together a platform upgrade-focused release. But once it is out (shortly), we'll make sure to add this PR to the queue.
I did add the code in question to the Dataverse source tree, but I merely copy-and-pasted it from a project that preceded Dataverse where it was written by another developer. It was originally there to be able to load ingest plugins from external jars. But since we stopped doing that it is indeed unused as of now.

@cmbz cmbz added this to the 6.1 milestone Aug 24, 2023
@cmbz
Copy link

cmbz commented Aug 24, 2023

Added to 6.1 milestone as per 2023/08/24 discussion.

@cmbz cmbz added the Size: 0.5 A percentage of a sprint. 0.35 hours label Aug 24, 2023
@pdurbin
Copy link
Member

pdurbin commented Aug 24, 2023

API tests are passing: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9009/2/testReport/

@scolapasta
Copy link
Contributor

@bencomp now that we've released 6.0, I'm moving waiting 6.1 issues back to the board.

But could you first handle the 6.0 merge and address any EE10 issues. Thanks.

@bencomp
Copy link
Contributor Author

bencomp commented Sep 12, 2023

Although the Jenkins build failed for unknown reason, I think this is ready, @scolapasta. As far as I can tell, there are no EE10 issues.

@landreev
Copy link
Contributor

Yes, Jenkins appears to be failing for unrelated reasons (PostgreSQL config).

Although the Jenkins build failed for unknown reason, I think this is ready, @scolapasta. As far as I can tell, there are no EE10 issues.

@landreev landreev removed their assignment Sep 12, 2023
@kcondon kcondon self-assigned this Sep 13, 2023
@kcondon kcondon merged commit 92404af into IQSS:develop Sep 13, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 0.5 A percentage of a sprint. 0.35 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants