Skip to content

Commit

Permalink
[GIE Compiler] fix bugs of int parser
Browse files Browse the repository at this point in the history
  • Loading branch information
shirly121 committed Nov 23, 2023
1 parent 358f034 commit e12b53e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.alibaba.graphscope.common.config;

import java.math.BigDecimal;
import java.util.function.Function;

public class Config<T> {
Expand Down Expand Up @@ -46,7 +47,7 @@ public static Config<Short> shortConfig(String key, short defaultVal) {
}

public static Config<Integer> intConfig(String key, int defaultVal) {
return new Config<>(key, String.valueOf(defaultVal), (s) -> Integer.parseInt(s));
return new Config<>(key, String.valueOf(defaultVal), (s) -> new BigDecimal(s).intValue());
}

public static Config<Long> longConfig(String key, long defaultVal) {
Expand Down

0 comments on commit e12b53e

Please sign in to comment.