DaanHoogland commented on code in PR #9518: URL: https://github.com/apache/cloudstack/pull/9518#discussion_r1736090824
########## framework/db/src/main/java/com/cloud/utils/db/TransactionLegacy.java: ########## @@ -1020,6 +1025,21 @@ public static void initDataSource(String propsFileName) throws IOException { } } + private static <T extends Number> T parseNumber(String value, Class<T> type) { + if (value == null) { + return null; + } + try { + if (type.equals(Long.class)) { + return type.cast(Long.parseLong(value)); + } else { + return type.cast(Integer.parseInt(value)); + } Review Comment: we are never expected to use float/double or some other format? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org