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

Incorrect debug value for java.util.concurrent.TimeUnit.MINUTES #1234

Closed
davidak09 opened this issue Dec 15, 2023 · 0 comments
Closed

Incorrect debug value for java.util.concurrent.TimeUnit.MINUTES #1234

davidak09 opened this issue Dec 15, 2023 · 0 comments

Comments

@davidak09
Copy link
Contributor

Debug value for java.util.concurrent.TimeUnit.MINUTES wrongly displays SECONDS instead of desired MINUTES.

implicit val TimeUnitDebug: Debug[TimeUnit] = tu =>
    Repr.Object(
      List("java", "util", "concurrent", "TimeUnit"),
      tu match {
        case TimeUnit.NANOSECONDS  => "NANOSECONDS"
        case TimeUnit.MICROSECONDS => "MICROSECONDS"
        case TimeUnit.MILLISECONDS => "MILLISECONDS"
        case TimeUnit.SECONDS      => "SECONDS"
        case TimeUnit.MINUTES      => "SECONDS" // <<<<<<<<< HERE
        case TimeUnit.HOURS        => "HOURS"
        case TimeUnit.DAYS         => "DAYS"
      }
    )
davidak09 added a commit to davidak09/zio-prelude that referenced this issue Dec 15, 2023
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

No branches or pull requests

1 participant