mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-24 12:16:33 +10:00
[강운덕] [LUCYSUS-1744] api metadata를 별도 전송하고 metadata의 상수값을 전달하는 로직 개발.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1163 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -2,7 +2,7 @@ package com.profiler.util;
|
||||
|
||||
public class NumberUtils {
|
||||
public static long parseLong(String str, long defaultLong) {
|
||||
if(str== null) {
|
||||
if (str == null) {
|
||||
return defaultLong;
|
||||
}
|
||||
try {
|
||||
@@ -13,7 +13,7 @@ public class NumberUtils {
|
||||
}
|
||||
|
||||
public static int parseInteger(String str, int defaultInt) {
|
||||
if(str == null) {
|
||||
if (str == null) {
|
||||
return defaultInt;
|
||||
}
|
||||
try {
|
||||
@@ -21,25 +21,25 @@ public class NumberUtils {
|
||||
} catch (NumberFormatException e) {
|
||||
return defaultInt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static short parseShort(String str, short defaultInt) {
|
||||
if (str == null) {
|
||||
return defaultInt;
|
||||
}
|
||||
try {
|
||||
return Short.parseShort(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return defaultInt;
|
||||
}
|
||||
}
|
||||
public static short parseShort(String str, short defaultInt) {
|
||||
if (str == null) {
|
||||
return defaultInt;
|
||||
}
|
||||
try {
|
||||
return Short.parseShort(str);
|
||||
} catch (NumberFormatException e) {
|
||||
return defaultInt;
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer toInteger(Object integer) {
|
||||
if(integer == null) {
|
||||
public static Integer toInteger(Object integer) {
|
||||
if (integer == null) {
|
||||
return null;
|
||||
}
|
||||
if (integer instanceof Integer) {
|
||||
return (Integer)integer;
|
||||
return (Integer) integer;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user