Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class CapturedContext implements ValueReferenceResolver {
private String thisClassName;
private long duration;
private final Map<String, Status> statusByProbeId = new LinkedHashMap<>();
private Map<String, CapturedValue> watches;
private Map<String, CapturedValue> captureExpressions;

public CapturedContext() {}

Expand Down Expand Up @@ -260,8 +260,8 @@ public Map<String, CapturedValue> getStaticFields() {
return staticFields;
}

public Map<String, CapturedValue> getWatches() {
return watches;
public Map<String, CapturedValue> getCaptureExpressions() {
return captureExpressions;
}

public Limits getLimits() {
Expand All @@ -277,9 +277,9 @@ public String getThisClassName() {
* instance representation into the corresponding string value.
*/
public void freeze(TimeoutChecker timeoutChecker) {
if (watches != null) {
// freeze only watches
watches.values().forEach(capturedValue -> capturedValue.freeze(timeoutChecker));
if (captureExpressions != null) {
// freeze only capture expressions
captureExpressions.values().forEach(capturedValue -> capturedValue.freeze(timeoutChecker));
return;
}
if (arguments != null) {
Expand Down Expand Up @@ -377,11 +377,11 @@ private void putInStaticFields(String name, CapturedValue value) {
staticFields.put(name, value);
}

public void addWatch(CapturedValue value) {
if (watches == null) {
watches = new HashMap<>();
public void addCaptureExpression(CapturedValue value) {
if (captureExpressions == null) {
captureExpressions = new HashMap<>();
}
watches.put(value.name, value);
captureExpressions.put(value.name, value);
}

public static class Status {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public ExceptionProbe(
// forcing a useless condition to be instrumented with captureEntry=false
new ProbeCondition(DSL.when(DSL.TRUE), "true"),
capture,
sampling);
sampling,
null);
this.exceptionProbeManager = exceptionProbeManager;
this.chainedExceptionIdx = chainedExceptionIdx;
}
Expand Down
Loading