Here you can find the source of convertLong(String str, long defaults)
public static long convertLong(String str, long defaults)
//package com.java2s; //License from project: Apache License public class Main { public static long convertLong(String str, long defaults) { if (str == null) { return defaults; }/*from w w w . j ava 2 s. com*/ try { return Long.parseLong(str); } catch (Exception e) { return defaults; } } }