Skip to content

Commit

Permalink
Minor change to fix IntelliJ warning
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Jun 29, 2017
1 parent a8d599e commit ef28be7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class NumberCategory {
return OmniIndivisibleValue.of(asIndivisible(this))
}

private static BigDecimal asDivisible(Number self) {
static BigDecimal asDivisible(Number self) {
switch(self) {
case BigDecimal: return self
case BigInteger: return new BigDecimal((BigInteger)self)
default: return new BigDecimal(self.longValue())
}
}

private static long asIndivisible(Number self) {
static long asIndivisible(Number self) {
switch(self) {
case BigDecimal: return ((BigDecimal) self).longValueExact()
case BigInteger: return ((BigInteger) self).longValue()
Expand Down

0 comments on commit ef28be7

Please sign in to comment.