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

chore: update commons-compress to 1.26.1 #1020

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

JoeWang1127
Copy link
Contributor

No description provided.

@@ -112,12 +112,6 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

commons-io is a dependency of commons-compress so that we don't need to define this dependency anymore.

The current version, 2.7, is incompatible with commons-compress 1.26.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

This module uses FileUtils from commons-io. Please keep this declaration.

image

However, it's only used in FileUtils.deleteDirectory(stagingDirectory.toFile()). Can you see whether it can be replaced by Guava's method? https://guava.dev/releases/32.0.0-jre/api/docs/com/google/common/io/MoreFiles.html#deleteRecursively(java.nio.file.Path,com.google.common.io.RecursiveDeleteOption...) If it works, then this module does not need to declare the dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested guava's deleteRecursively but the following error occurred:

Caused by: com.google.common.io.InsecureRecursiveDeleteException: /var/folders/2b/zvjk1hd11jx5kmjj2s8my6tr00zvqy/T/junit17596486141951131749: unable to guarantee security of recursive delete
        at com.google.common.io.MoreFiles.checkAllowsInsecure(MoreFiles.java:750)
        at com.google.common.io.MoreFiles.deleteRecursively(MoreFiles.java:542)
        at com.google.cloud.tools.maven.stage.AppEngineWebXmlStager.stage(AppEngineWebXmlStager.java:61)

The test passed by using RecursiveDeleteOption.ALLOW_INSECURE, but I'm not sure whether this is a good option.

I'll update the dependency version instead.

Copy link
Contributor

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

Please keep commons-io dependency or remove the reference to its class.

@suztomo
Copy link
Contributor

suztomo commented Apr 15, 2024

Thank you

@JoeWang1127 JoeWang1127 merged commit f22f8bd into main Apr 15, 2024
8 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/update-common-compress branch April 15, 2024 16:28
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.

None yet

2 participants