shwstppr commented on code in PR #9518: URL: https://github.com/apache/cloudstack/pull/9518#discussion_r1738013594
########## 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: @DaanHoogland we may need that in future but not right now. Method is mainly used to parse timeouts from db.properties which are either int or long -- 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