[2.2.1] Remove privacy input data in log & Remove needless log
authordahyeong.kim <dahyeong.kim@samsung.com>
Wed, 24 Jul 2013 08:26:48 +0000 (17:26 +0900)
committerdahyeong.kim <dahyeong.kim@samsung.com>
Wed, 24 Jul 2013 14:25:25 +0000 (23:25 +0900)
Change-Id: Ib22258ba12c9e666700cc228d836ceafc948ecdd
Signed-off-by: dahyeong.kim <dahyeong.kim@samsung.com>
src/base/FBaseInt8.cpp
src/base/FBaseInteger.cpp
src/base/FBaseLong.cpp
src/base/FBaseLongLong.cpp
src/base/FBaseShort.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
index 83027a1..12b5fdc 100644 (file)
@@ -85,7 +85,7 @@ result
 Integer::Decode(const String& s, int& ret)
 {
        SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of 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));
 
        int radix = 0;
        int startIndex = 0;
@@ -148,11 +148,6 @@ Integer::GetHashCode(int val)
 result
 Integer::Parse(const String& s, int& ret)
 {
-       int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0 && len < 12), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s(%ls) MUST be greater than 0 and less than 12.",
-               GetErrorMessage(E_NUM_FORMAT), s.GetPointer());
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -164,13 +159,13 @@ Integer::Parse(const String& s, int radix, int& 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));
 
        errno = 0;
        wchar_t* pEnd = null;
        int tmpRet = wcstol(s.GetPointer(), &pEnd, radix);
-       SysTryReturn(NID_BASE, (pEnd[0] == 0), E_NUM_FORMAT, E_NUM_FORMAT,
+       SysTryReturn(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Integer parse failed. Scan stopped at (%ls).", GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturn(NID_BASE, !((tmpRet == LONG_MAX || tmpRet == LONG_MIN) && (errno != 0)), E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Parsed value cannot fit into an Integer.", GetErrorMessage(E_NUM_FORMAT));
index c043b11..54bee6e 100644 (file)
@@ -96,7 +96,7 @@ result
 Long::Decode(const String& s, long& ret)
 {
        SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of 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));
 
        int radix = 0;
        int startIndex = 0;
@@ -147,10 +147,6 @@ Long::Decode(const String& s, long& ret)
 result
 Long::Parse(const String& s, long& ret)
 {
-       int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0 && len < 12), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s(%ls) MUST be greater than 0 and less than 12.", GetErrorMessage(E_NUM_FORMAT), s.GetPointer());
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -162,13 +158,13 @@ Long::Parse(const String& s, int radix, long& 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));
 
        errno = 0;
        wchar_t* pEnd = null;
        long tmpRet = wcstol(s.GetPointer(), &pEnd, radix);
-       SysTryReturn(NID_BASE, (pEnd[0] == 0), E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Long parse failed. Scan stopped at (%ls).",
+       SysTryReturn(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Long parse failed. Scan stopped at (%ls).",
                GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturn(NID_BASE, !((tmpRet == LONG_MAX || tmpRet == LONG_MIN) && (errno != 0)), E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Parsed value cannot fit into a Long.", GetErrorMessage(E_NUM_FORMAT));
index 0b0dee4..98d1ff5 100644 (file)
@@ -156,12 +156,6 @@ LongLong::ToString(long long value)
 result
 LongLong::Parse(const String& s, long long& ret)
 {
-       wchar_t* pEnd = null;
-
-       int len = s.GetLength();
-       SysTryReturnResult(NID_BASE, (len > 0), E_NUM_FORMAT, "[%s] The length of s MUST be greater than 0.",
-               GetErrorMessage(E_NUM_FORMAT));
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -173,13 +167,13 @@ LongLong::Parse(const String& s, int radix, long long& ret)
                "[%s] The radix(%d) MUST be one of 2, 8, 10 and 16.", GetErrorMessage(E_OUT_OF_RANGE), radix);
 
        int len = s.GetLength();
-       SysTryReturnResult(NID_BASE, (len > 0), E_NUM_FORMAT, "[%s] The length of s MUST be greater than 0.",
+       SysTryReturnResult(NID_BASE, len > 0, E_NUM_FORMAT, "[%s] The length of input String MUST be greater than 0.",
                GetErrorMessage(E_NUM_FORMAT));
 
        errno = 0;
        wchar_t* pEnd = null;
        long long tmpRet = wcstoll(s.GetPointer(), &pEnd, radix);
-       SysTryReturnResult(NID_BASE, (pEnd[0] == 0), E_NUM_FORMAT, "[%s] LongLong parse failed. Scan stopped at (%ls).",
+       SysTryReturnResult(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, "[%s] LongLong parse failed. Scan stopped at (%ls).",
                GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturnResult(NID_BASE, !(errno == ERANGE && (tmpRet == LLONG_MAX || tmpRet == LLONG_MIN)), E_NUM_FORMAT,
                "[%s] Parsed value cannot fit into a long long.", GetErrorMessage(E_NUM_FORMAT));
index d4e2fd9..8221c99 100644 (file)
@@ -102,7 +102,7 @@ result
 Short::Decode(const String& s, short& ret)
 {
        SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of 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;
@@ -170,10 +170,6 @@ CATCH:
 result
 Short::Parse(const String& s, short& ret)
 {
-       int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0 && len < 7), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s(%ls) MUST be greater than 0 and less than 7.", GetErrorMessage(E_NUM_FORMAT), s.GetPointer());
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -185,15 +181,13 @@ Short::Parse(const String& s, int radix, short& 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,
+       SysTryReturn(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Short parse failed. Scan stopped at (%ls).", GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturn(NID_BASE, !(value > Short::VALUE_MAX || value < Short::VALUE_MIN) || (errno != 0), E_NUM_FORMAT,
                E_NUM_FORMAT, "[%s] Parsed value cannot fit into Short.", GetErrorMessage(E_NUM_FORMAT));
@@ -211,7 +205,7 @@ Short::Parse(const String& s, int radix, short& ret)
                ret = static_cast< short >(value);
        }
 
-       return r;
+       return E_SUCCESS;
 }
 
 char