googleapis / googleapis/google-http-java-client

Add java.time.Duration-based APIs

オープン
#776 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
semver: minor status: blocked type: cleanup
主要言語
Java
スター
1.4k
フォーク
473
PR マージ指標
30日以内にマージされた PR はありません

説明

Representing date/time concepts as numeric primitives is a bad idea. It leads to unit mismatch, overflows, and many other dangerous date/time-related bugs.

For instance, it's impossible to tell what time unit `readTimeout` is without reading it's javadocs:
```java
public final class HttpRequest {
public HttpRequest setReadTimeout(int readTimeout) { ... }
}
```

Please consider adding `java.time.Duration` overloads to all APIs that accept a date/time concept as a numeric primitive. Methods that _return_ a numeric primitive representing a date/time concept are much more difficult as new, alternative method names must be chosen (e.g., `public int getReadTimeout()`).

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。