mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-21349 ICU4J units cleanup: eclipse warnings, unsuppress one warning
toString() now uses category, so @SuppressWarnings("unused") is no longer needed.
This commit is contained in:
parent
86d06eca8b
commit
c231cf7c4f
5 changed files with 4 additions and 7 deletions
|
@ -86,7 +86,7 @@ class U_I18N_API ComplexUnitsConverter : public UMemory {
|
|||
*
|
||||
* @param inputUnit represents the source unit. (should be single or compound unit).
|
||||
* @param outputUnits represents the output unit. could be any type. (single, compound or mixed).
|
||||
* @param ratesInfo
|
||||
* @param ratesInfo a ConversionRates instance containing the unit conversion rates.
|
||||
* @param status
|
||||
*/
|
||||
ComplexUnitsConverter(const MeasureUnitImpl &inputUnit, const MeasureUnitImpl &outputUnits,
|
||||
|
|
|
@ -2,12 +2,9 @@
|
|||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
package com.ibm.icu.impl.number;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ibm.icu.impl.units.ComplexUnitsConverter;
|
||||
import com.ibm.icu.impl.units.ConversionRates;
|
||||
import com.ibm.icu.impl.units.MeasureUnitImpl;
|
||||
import com.ibm.icu.util.Measure;
|
||||
import com.ibm.icu.util.MeasureUnit;
|
||||
|
||||
/**
|
||||
|
|
|
@ -86,6 +86,7 @@ public class ComplexUnitsConverter {
|
|||
* @param outputUnits
|
||||
* represents the output unit. could be any type. (single, compound or mixed).
|
||||
* @param conversionRates
|
||||
* a ConversionRates instance containing the unit conversion rates.
|
||||
*/
|
||||
public ComplexUnitsConverter(MeasureUnitImpl inputUnit, MeasureUnitImpl outputUnits,
|
||||
ConversionRates conversionRates) {
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.List;
|
|||
import com.ibm.icu.impl.IllegalIcuArgumentException;
|
||||
import com.ibm.icu.impl.number.MicroProps;
|
||||
import com.ibm.icu.number.Precision;
|
||||
import com.ibm.icu.util.Measure;
|
||||
import com.ibm.icu.util.MeasureUnit;
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,7 +64,7 @@ public class UnitsTest {
|
|||
for (Measure measure : measures) {
|
||||
double accuracy = 0.0;
|
||||
if (i == expected.length - 1) {
|
||||
accuracy = accuracy;
|
||||
accuracy = this.accuracy;
|
||||
}
|
||||
assertTrue("input " + value + ", output measure " + i + ": expected " +
|
||||
expected[i] + ", expected unit " +
|
||||
|
@ -572,7 +572,6 @@ public class UnitsTest {
|
|||
/**
|
||||
* Test Case Data
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
String category;
|
||||
String usage;
|
||||
String region;
|
||||
|
@ -622,6 +621,7 @@ public class UnitsTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ArrayList<MeasureUnitImpl> outputUnits = new ArrayList<>();
|
||||
for (Pair<String, MeasureUnitImpl> unit : outputUnitInOrder) {
|
||||
|
|
Loading…
Add table
Reference in a new issue