bugfix: now loading value of hold_time column in List table

This commit is contained in:
2022-04-30 13:28:46 +02:00
parent 2508d5389c
commit 71cfeb4856
4 changed files with 17 additions and 6 deletions

View File

@@ -16,6 +16,8 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
import java.util.stream.Collectors;
@@ -162,4 +164,9 @@ public class Util {
public static String dropEmail(String tx) {
return tx.replaceAll( "[.\\-\\w]+@[.\\-\\w]+", "[email_removed]");
}
public static <T> T getNullable(ResultSet rs, String colName) throws SQLException {
final T val = (T) rs.getObject(colName);
return rs.wasNull() ? null : val;
}
}