[3.0][Cherry-pick] Remove privacy input data in log & Remove needless log
[platform/framework/native/appfw.git] / src / base / FBaseInt8.cpp
index ae0a1d2..8307d9a 100644 (file)
@@ -96,7 +96,7 @@ result
 Int8::Decode(const String& s, char& ret)
 {
        SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of string s MUST be greater than 0.", GetErrorMessage(E_NUM_FORMAT));
+               "[%s] The length of input String MUST be greater than 0.", GetErrorMessage(E_NUM_FORMAT));
 
        long value = 0;
        int radix = 0;
@@ -164,10 +164,6 @@ CATCH:
 result
 Int8::Parse(const String& s, char& ret)
 {
-       int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0 && len < 5), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s(%ls) MUST be greater than 0 and less than 5.", GetErrorMessage(E_NUM_FORMAT), s.GetPointer());
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -179,15 +175,13 @@ Int8::Parse(const String& s, int radix, char& ret)
                "[%s] The radix(%d) MUST be one of 2, 8, 10 and 16.", GetErrorMessage(E_OUT_OF_RANGE), radix);
 
        int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0), E_NUM_FORMAT, E_NUM_FORMAT, "[%s] The length of s MUST be greater than 0.",
+       SysTryReturn(NID_BASE, len > 0, E_NUM_FORMAT, E_NUM_FORMAT, "[%s] The length of input String MUST be greater than 0.",
                GetErrorMessage(E_NUM_FORMAT));
 
-       result r = E_SUCCESS;
-
        errno = 0;
        wchar_t* pEnd = null;
        long value = wcstol(s.GetPointer(), &pEnd, radix);
-       SysTryReturn(NID_BASE, (pEnd[0] == 0), E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Int8 parse failed. Scan stopped at (%ls).",
+       SysTryReturn(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Int8 parse failed. Scan stopped at (%ls).",
                GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturn(NID_BASE, !((value == LONG_MAX || value == LONG_MIN) && (errno != 0)), E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Parsed value cannot fit into an Int8.", GetErrorMessage(E_NUM_FORMAT));
@@ -205,7 +199,7 @@ Int8::Parse(const String& s, int radix, char& ret)
                ret = static_cast< char >(value);
        }
 
-       return r;
+       return E_SUCCESS;
 }
 
 char