File tree Expand file tree Collapse file tree
dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/exception Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ boolean hasExceptionStateTracked() {
182182
183183 public static class ThrowableState {
184184 private final String exceptionId ;
185- private List <Snapshot > snapshots ;
185+ private final List <Snapshot > snapshots = new ArrayList <>() ;
186186 private boolean snapshotSent ;
187187
188188 private ThrowableState (String exceptionId ) {
@@ -198,13 +198,10 @@ public List<Snapshot> getSnapshots() {
198198 }
199199
200200 public boolean isSampling () {
201- return snapshots != null && !snapshots .isEmpty ();
201+ return !snapshots .isEmpty ();
202202 }
203203
204204 public void addSnapshot (Snapshot snapshot ) {
205- if (snapshots == null ) {
206- snapshots = new ArrayList <>();
207- }
208205 snapshots .add (snapshot );
209206 }
210207
You can’t perform that action at this time.
0 commit comments