GoogleContainerTools / GoogleContainerTools/jib

Warning to use java.time-based API in jib-core Retry.java

Open
#2,417 2 comments 0 reactions 0 assignees View on GitHub
area/jib-core cleanup priority: p4
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

(logs from https://travis-ci.org/github/GoogleContainerTools/jib/jobs/676290173)

```
> Task :jib-core:compileJava
/home/travis/build/GoogleContainerTools/jib/jib-core/src/main/java/com/google/cloud/tools/jib/cache/Retry.java:104: warning: [PreferJavaTimeOverload] Prefer using java.time-based APIs when available. Note that this checker does not and cannot guarantee that the overloads have equivalent semantics, but that is generally the case with overloaded methods.
this.sleepMilliseconds = unit.convert(duration, TimeUnit.MILLISECONDS);
^
(see https://errorprone.info/bugpattern/PreferJavaTimeOverload)
Did you mean 'this.sleepMilliseconds = unit.convert(Duration.ofMillis(duration));'?
1 warning
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.