File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
newrelic-agent/src/main/java/com/newrelic/agent Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -863,11 +863,13 @@ public void harvest(StatsEngine statsEngine) {
863863 // LicenseException handled here
864864 logMetricDataError (e );
865865 retry = true ;
866- String message = e .getMessage ().toLowerCase ();
867- // if our data can't be parsed, we probably have a bad metric
868- // (web transaction maybe?). clear out the metrics
869- if (message .contains ("json" ) && message .contains ("parse" )) {
870- retry = false ;
866+ if (e .getMessage () != null ) {
867+ String message = e .getMessage ().toLowerCase ();
868+ // if our data can't be parsed, we probably have a bad metric
869+ // (web transaction maybe?). clear out the metrics
870+ if (message .contains ("json" ) && message .contains ("parse" )) {
871+ retry = false ;
872+ }
871873 }
872874 }
873875 long duration = System .nanoTime () - startTime ;
You can’t perform that action at this time.
0 commit comments