mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-19 17:56:41 +10:00
[강운덕] [LUCYSUS-1744] trace id의 기본데이터 type 변경.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@563 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.profiler.util;
|
||||
|
||||
public class NumberUtils {
|
||||
public static long parseLong(String str, long defaultLong) {
|
||||
if(str== null) {
|
||||
return defaultLong;
|
||||
}
|
||||
try {
|
||||
return Long.parseLong(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return defaultLong;
|
||||
}
|
||||
}
|
||||
|
||||
public static int parseInteger(String str, int defaultInt) {
|
||||
if(str == null) {
|
||||
return defaultInt;
|
||||
}
|
||||
try {
|
||||
return Integer.parseInt(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return defaultInt;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user