@@ -47,10 +47,10 @@ public void setStrict(boolean strict) {
4747 }
4848
4949 public void strictCheck () {
50- strictCheck ("description" , true , descriptionChecked );
51- strictCheck ("unit" , true , unitChecked );
52- strictCheck ("type" , true , typeChecked );
53- strictCheck ("data point attributes" , true , dataPointAttributesChecked );
50+ strictCheck ("description" , /* expectedValue= */ true , descriptionChecked );
51+ strictCheck ("unit" , /* expectedValue= */ true , unitChecked );
52+ strictCheck ("type" , /* expectedValue= */ true , typeChecked );
53+ strictCheck ("data point attributes" , /* expectedValue= */ true , dataPointAttributesChecked );
5454 }
5555
5656 private void strictCheck (String attribute , boolean expectedValue , boolean value ) {
@@ -75,7 +75,7 @@ public MetricAssert hasDescription(String description) {
7575
7676 info .description ("unexpected description for metric '%s'" , actual .getName ());
7777 objects .assertEqual (info , actual .getDescription (), description );
78- strictCheck ("description" , false , descriptionChecked );
78+ strictCheck ("description" , /* expectedValue= */ false , descriptionChecked );
7979 descriptionChecked = true ;
8080 return this ;
8181 }
@@ -92,7 +92,7 @@ public MetricAssert hasUnit(String unit) {
9292
9393 info .description ("unexpected unit for metric '%s'" , actual .getName ());
9494 objects .assertEqual (info , actual .getUnit (), unit );
95- strictCheck ("unit" , false , unitChecked );
95+ strictCheck ("unit" , /* expectedValue= */ false , unitChecked );
9696 unitChecked = true ;
9797 return this ;
9898 }
@@ -108,7 +108,7 @@ public MetricAssert isGauge() {
108108
109109 info .description ("gauge expected for metric '%s'" , actual .getName ());
110110 objects .assertEqual (info , actual .hasGauge (), true );
111- strictCheck ("type" , false , typeChecked );
111+ strictCheck ("type" , /* expectedValue= */ false , typeChecked );
112112 typeChecked = true ;
113113 return this ;
114114 }
@@ -135,7 +135,7 @@ private MetricAssert hasSum(boolean monotonic) {
135135 public MetricAssert isCounter () {
136136 // counters have a monotonic sum as their value can't decrease
137137 hasSum (true );
138- strictCheck ("type" , false , typeChecked );
138+ strictCheck ("type" , /* expectedValue= */ false , typeChecked );
139139 typeChecked = true ;
140140 return this ;
141141 }
@@ -144,7 +144,7 @@ public MetricAssert isCounter() {
144144 public MetricAssert isUpDownCounter () {
145145 // up down counters are non-monotonic as their value can increase & decrease
146146 hasSum (false );
147- strictCheck ("type" , false , typeChecked );
147+ strictCheck ("type" , /* expectedValue= */ false , typeChecked );
148148 typeChecked = true ;
149149 return this ;
150150 }
@@ -182,7 +182,7 @@ private MetricAssert checkDataPoints(Consumer<List<NumberDataPoint>> listConsume
182182 info .description ("at least one set of data points expected for metric '%s'" , actual .getName ());
183183 integers .assertGreaterThan (info , count , 0 );
184184
185- strictCheck ("data point attributes" , false , dataPointAttributesChecked );
185+ strictCheck ("data point attributes" , /* expectedValue= */ false , dataPointAttributesChecked );
186186 dataPointAttributesChecked = true ;
187187 return this ;
188188 }
0 commit comments