Clean up redundant code constructs

Results of the following IntelliJ inspections:
 * Redundant 'isInstance' or 'cast' call
 * Redundant array creation
 * Redundant Collection operation
 * Redundant String operation
 * Redundant type cast

The only manual change was to remove a suppression and comment about a
redundant cast which doesn't appear to be an issue in the current
version of JDK 8

Change-Id: I34a70d436512cc4efe9dafb0917be3dfce4ba06b
This commit is contained in:
Dave Borowitz
2018-12-21 11:27:39 -08:00
parent 4e22200be9
commit 737b035223
21 changed files with 27 additions and 35 deletions

View File

@@ -120,7 +120,7 @@ abstract class BucketedCallback<V> implements BucketedMetric {
@Override
public Map<Object, Metric> getCells() {
return Maps.transformValues(cells, in -> (Metric) in);
return Maps.transformValues(cells, in -> in);
}
final class ValueGauge implements Gauge<V> {