Skip to content

Commit

Permalink
Fix double casting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Forslund committed Jan 13, 2016
1 parent 173e9c6 commit 44107d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/speedment/internal/ui/UISession.java
Expand Up @@ -70,7 +70,6 @@
import javafx.util.Pair; import javafx.util.Pair;
import org.controlsfx.glyphfont.FontAwesome; import org.controlsfx.glyphfont.FontAwesome;
import static com.speedment.internal.util.TextUtil.alignRight; import static com.speedment.internal.util.TextUtil.alignRight;
import com.speedment.stream.MapStream;
import java.util.Map; import java.util.Map;
import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNull;


Expand Down
Expand Up @@ -215,20 +215,20 @@ public OptionalBoolean getAsBoolean(String key) {


@Override @Override
public OptionalLong getAsLong(String key) { public OptionalLong getAsLong(String key) {
final Long value = (Long) config.get(key); final Number value = (Number) config.get(key);
return value == null ? OptionalLong.empty() : OptionalLong.of(value); return value == null ? OptionalLong.empty() : OptionalLong.of(value.longValue());
} }


@Override @Override
public OptionalDouble getAsDouble(String key) { public OptionalDouble getAsDouble(String key) {
final Double value = (Double) config.get(key); final Number value = (Number) config.get(key);
return value == null ? OptionalDouble.empty() : OptionalDouble.of(value); return value == null ? OptionalDouble.empty() : OptionalDouble.of(value.doubleValue());
} }


@Override @Override
public OptionalInt getAsInt(String key) { public OptionalInt getAsInt(String key) {
final Integer value = (Integer) config.get(key); final Number value = (Number) config.get(key);
return value == null ? OptionalInt.empty() : OptionalInt.of(value); return value == null ? OptionalInt.empty() : OptionalInt.of(value.intValue());
} }


@Override @Override
Expand Down

0 comments on commit 44107d6

Please sign in to comment.