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

Fix fetching permissions through getPosixFileAttributes and add equality #3345

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

dantb
Copy link
Contributor

@dantb dantb commented Nov 24, 2023

Fixes #3343 and #3344

@@ -42,6 +42,20 @@ sealed trait BasicFileAttributes {
def lastAccessTime: FiniteDuration
def lastModifiedTime: FiniteDuration
def size: Long

override def equals(that: Any): Boolean = that match {
Copy link
Member

Choose a reason for hiding this comment

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

Override hashCode and toString here too?

@@ -54,6 +68,11 @@ object BasicFileAttributes {
// the owner/group operations JVM only.
sealed trait PosixFileAttributes extends BasicFileAttributes {
def permissions: PosixPermissions

final override def equals(that: Any): Boolean = that match {
Copy link
Member

Choose a reason for hiding this comment

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

hashCode and toString as well?

@mpilquist
Copy link
Member

Thanks! The mima warning can be safely added to exclusion list.

@mpilquist mpilquist merged commit fb78701 into typelevel:main Jan 20, 2024
15 checks passed
@dantb dantb deleted the fix-posix-perms branch January 25, 2024 09:08
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.

Fetching permissions through getPosixFileAttributes always fails with None.get
2 participants