Skip to content

Commit b558815

Browse files
committed
Add null check for 'exact' parameter
1 parent 7f646ae commit b558815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/net/explorviz/span/api/LandscapeResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ public Multi<Trace> getDynamic(@PathParam("token") final String token,
128128
).select().where(trace -> trace.startTime() < to);
129129

130130
return tracesWithSpansUnfiltered.onItem().transform(trace -> {
131+
final Long lowerBound = exact != null ? exact : from;
131132
final List<Span> filteredSpans = trace.spanList().stream()
132-
.filter(span -> span.startTime() < to && span.startTime() >= exact)
133+
.filter(span -> span.startTime() < to && span.startTime() >= lowerBound)
133134
.collect(Collectors.toList());
134135
final List<String> filteredSpanIds = filteredSpans.stream()
135136
.map(span -> span.spanId())

0 commit comments

Comments
 (0)