| The method's logic is not clear, however simple. It's also not clear why it is necessary to create a method to compare integers (areIntegersEqual) instead of simply using "==". The logic can be refactored in something like:
private boolean areAllBatchesLoaded(VariantMetricInformation variantMetricInformation) { |
return variantMetricInformation.getTotalBatches() == variantMetricInformation.getServedBatches() |
&& receiveAllBatchedLoadedEvent(variantMetricInformation) != null; |
}
|
https://github.com/matzew/aerogear-unifiedpush-server/blob/0e75417f6d7acad93b413803bf84bf4bd285c1d4/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/MetricsCollector.java#L148-L154 |