Skip to content

Commit

Permalink
@W-14071255: return null instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoineausf committed Sep 6, 2023
1 parent 08a7458 commit 999419e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,16 @@ else if ( protobuf )
OutputStream output = res.getOutputStream();

List<MetricsResponse.Series> metricsSeriesList = new ArrayList<MetricsResponse.Series>();
LOG.info( "carbonapi request: setting values..." );
for ( Series series : seriesList )
{
List<Double> valuesList = new ArrayList<Double>();
List<Boolean> isAbsent = new ArrayList<Boolean>();
for ( Double value : series.values )
{
valuesList.add(value == null ? (double) 0 : value );
LOG.info( String.format( "carbonapi request: found value [%s]",
( value == null ? "null" : (double) value ) ) );
valuesList.add((double)value);
isAbsent.add(false);
}
MetricsResponse.Series metricsSeries =
Expand Down

0 comments on commit 999419e

Please sign in to comment.