if (dataUnit.equals(LogisticsInventoryFormatter.AMMUNITION_UNIT)) {
String supplyType = data.getSupplyType(); if (supplyType.equals(LogisticsInventoryFormatter.AMMUNITION_SUPPLY_TYPE)) {
  public String getPreferredUnit(InventoryData data) {    String dataUnit = data.getUnit();    String item = data.getItem();    if (dataUnit.equals(LogisticsInventoryFormatter.AMMUNITION_UNIT)) {      return getAmmoUnitLabel();    } else if (item.equals(LogisticsInventoryFormatter.WATER_ITEM_ID)) {      return getWaterUnitLabel();    }    return dataUnit;  }