Skip to content

Commit b8afc80

Browse files
wu-shengCopilot
andauthored
Update src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureWrite.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e16dd74 commit b8afc80

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureWrite.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public MeasureWrite tag(String tagName, Serializable<BanyandbModel.TagValue> tag
5959
*/
6060
@Override
6161
protected BanyandbMeasure.WriteRequest build(BanyandbCommon.Metadata metadata) {
62-
if (!timestamp.isPresent() || timestamp.get() <= 0) {
63-
throw new IllegalArgumentException("timestamp is invalid.");
62+
throw new IllegalArgumentException("Timestamp is required and must be greater than 0 for measure writes.");
6463
}
6564
Timestamp ts = Timestamp.newBuilder()
6665
.setSeconds(timestamp.get() / 1000)

0 commit comments

Comments
 (0)