influxdata / influxdata/influxdb-java

InfluxDBResultMapper doesnt call POJO setter

オープン
#670 コメント 6 件 リアクション 0 件 担当者 1 名 @fmachado が担当を希望しています GitHub で見る
kind/enhancement question
主要言語
Java
スター
1.2k
フォーク
469
PR マージ指標
30日以内にマージされた PR はありません

説明

It is puzzling that `InfluxDBResultMapper` doesnt call POJO setter.
My POJO looks like
```
class MyPOJO
{
@Column(name = "time")
private Instant time;

//getter ignored
public void setTime(Instant time) {
this.time = time.truncatedTo(ChronoUnit.SECONDS);
}
}
```

Then I do something like
```
final List resultEvents = resultMapper.toPOJO(result, MyPOJO.class);
```
Assumption is `setTime` would be called for each point fetched. But it doesnt. It somehow bypasses it. `time` is private. Reflection in play here?
Expectation is that if I remove my setter, `toPOJO` call would fail. But it doesnt.

I have tried 2.17, 2.7 and 2.9 versions.

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

このリポジトリのコントリビューションガイドは索引されていません

評価

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

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

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