@Test public void testGetIntValue_3() { String intStr = null; int defaultVal = 1; int result = ParserUtil.getIntValue(intStr, defaultVal); assertEquals(1, result); }
public static int getIntValue(String intStr, int defaultVal) { int paramVal = 0; try { if ((intStr != null) && (!intStr.equals(""))) { paramVal = Integer.parseInt(intStr); } else { paramVal = defaultVal; } } catch (NumberFormatException e) { paramVal = defaultVal; } return paramVal; }
ParserUtil { public static int getIntValue(String intStr, int defaultVal) { int paramVal = 0; try { if ((intStr != null) && (!intStr.equals(""))) { paramVal = Integer.parseInt(intStr); } else { paramVal = defaultVal; } } catch (NumberFormatException e) { paramVal = defaultVal; } return paramVal; } }
ParserUtil { public static int getIntValue(String intStr, int defaultVal) { int paramVal = 0; try { if ((intStr != null) && (!intStr.equals(""))) { paramVal = Integer.parseInt(intStr); } else { paramVal = defaultVal; } } catch (NumberFormatException e) { paramVal = defaultVal; } return paramVal; }  }
ParserUtil { public static int getIntValue(String intStr, int defaultVal) { int paramVal = 0; try { if ((intStr != null) && (!intStr.equals(""))) { paramVal = Integer.parseInt(intStr); } else { paramVal = defaultVal; } } catch (NumberFormatException e) { paramVal = defaultVal; } return paramVal; }  static long getLongValue(String numStr, long defaultVal); static int getIntValue(String intStr, int defaultVal); }
ParserUtil { public static int getIntValue(String intStr, int defaultVal) { int paramVal = 0; try { if ((intStr != null) && (!intStr.equals(""))) { paramVal = Integer.parseInt(intStr); } else { paramVal = defaultVal; } } catch (NumberFormatException e) { paramVal = defaultVal; } return paramVal; }  static long getLongValue(String numStr, long defaultVal); static int getIntValue(String intStr, int defaultVal);  }