Skip to content

Commit

Permalink
JAVAMONEY-99: renamed name constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsticks committed Apr 9, 2015
1 parent ed518ba commit e726ecd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
*/
public class DefaultRoundingProvider implements RoundingProviderSpi {

private static final String DEFAULT_ROUNDING_ID = "default";
private Set<String> roundingsIds = new HashSet<>();
private static final String DEFAULT_ROUNDING_NAME = "default";
private Set<String> roundingsNames = new HashSet<>();

public DefaultRoundingProvider() {
roundingsIds.add(DEFAULT_ROUNDING_ID);
roundingsIds = Collections.unmodifiableSet(roundingsIds);
roundingsNames.add(DEFAULT_ROUNDING_NAME);
roundingsNames = Collections.unmodifiableSet(roundingsNames);
}

@Override
Expand Down Expand Up @@ -77,7 +77,7 @@ public MonetaryRounding getRounding(RoundingQuery roundingQuery) {
return new DefaultRounding(scale, mc.getRoundingMode());
} else if (roundingMode != null) {
return new DefaultRounding(scale, roundingMode);
} else if (roundingQuery.getRoundingName() != null && DEFAULT_ROUNDING_ID.equals(roundingQuery.getRoundingName())) {
} else if (roundingQuery.getRoundingName() != null && DEFAULT_ROUNDING_NAME.equals(roundingQuery.getRoundingName())) {
return Monetary.getDefaultRounding();
}
return null;
Expand All @@ -86,7 +86,7 @@ public MonetaryRounding getRounding(RoundingQuery roundingQuery) {

@Override
public Set<String> getRoundingNames() {
return roundingsIds;
return roundingsNames;
}

}

0 comments on commit e726ecd

Please sign in to comment.