Skip to content

Commit 331d55e

Browse files
committed
spotless apply update
1 parent 8e2ca54 commit 331d55e

File tree

1 file changed

+10
-8
lines changed
  • sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models

1 file changed

+10
-8
lines changed

sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/metrics/models/MetricsHelper.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,28 +330,30 @@ public static String toMetricsTimespan(QueryTimeInterval timeInterval) {
330330

331331
// If we have both start and end times, use them directly
332332
if (timeInterval.getStartTime() != null && timeInterval.getEndTime() != null) {
333-
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getStartTime()) + "/" +
334-
DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getEndTime());
333+
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getStartTime()) + "/"
334+
+ DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getEndTime());
335335
}
336336

337337
// If we have start time and duration, calculate end time
338338
if (timeInterval.getStartTime() != null && timeInterval.getDuration() != null) {
339-
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getStartTime()) + "/" +
340-
DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getStartTime().plus(timeInterval.getDuration()));
339+
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getStartTime()) + "/"
340+
+ DateTimeFormatter.ISO_OFFSET_DATE_TIME
341+
.format(timeInterval.getStartTime().plus(timeInterval.getDuration()));
341342
}
342343

343344
// If we have duration and end time, calculate start time
344345
if (timeInterval.getDuration() != null && timeInterval.getEndTime() != null) {
345-
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getEndTime().minus(timeInterval.getDuration())) + "/" +
346-
DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getEndTime());
346+
return DateTimeFormatter.ISO_OFFSET_DATE_TIME
347+
.format(timeInterval.getEndTime().minus(timeInterval.getDuration())) + "/"
348+
+ DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(timeInterval.getEndTime());
347349
}
348350

349351
// If we only have duration, calculate absolute start and end times based on current time
350352
if (timeInterval.getDuration() != null) {
351353
OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
352354
OffsetDateTime startTime = now.minus(timeInterval.getDuration());
353-
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(startTime) + "/" +
354-
DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(now);
355+
return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(startTime) + "/"
356+
+ DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(now);
355357
}
356358

357359
return null;

0 commit comments

Comments
 (0)