Pkgname (tizen id) - not null
authorJan Olszak <j.olszak@samsung.com>
Wed, 21 Nov 2012 10:41:03 +0000 (11:41 +0100)
committerGerrit Code Review <gerrit2@kim11>
Wed, 28 Nov 2012 09:48:18 +0000 (18:48 +0900)
[Issue#] It was possible for pkgname to be null.
[Bug] N/A
[Cause] N/A
[Solution] Changed Column deffinition in db file and replaced DPL:Optional<DPL::String> with DPL::String.
[Verification] Build.

Change-Id: Ie63ec0b72c6cad367ea7500ea515f6896ccf37cf

src/modules/tizen/WidgetDB/WidgetDB.cpp
src/modules/tizen/WidgetInterfaceDAO/WidgetInterfaceDAO.cpp

index 560aabd..f4d9f11 100644 (file)
@@ -368,7 +368,7 @@ std::string WidgetDB::getWidgetPersistentStoragePath() const
     Try
     {
         WrtDB::WidgetDAOReadOnly dao(getWidgetId());
-        return WrtDB::WidgetConfig::GetWidgetPersistentStoragePath(*dao.getPkgname());
+        return WrtDB::WidgetConfig::GetWidgetPersistentStoragePath(dao.getPkgname_NOTNULL());
     }
     Catch(DPL::Exception)
     {
@@ -381,7 +381,7 @@ std::string WidgetDB::getWidgetTemporaryStoragePath() const
     Try
     {
         WrtDB::WidgetDAOReadOnly dao(getWidgetId());
-        return WrtDB::WidgetConfig::GetWidgetTemporaryStoragePath(*dao.getPkgname());
+        return WrtDB::WidgetConfig::GetWidgetTemporaryStoragePath(dao.getPkgname_NOTNULL());
     }
     Catch(DPL::Exception)
     {
index 246c99f..522e93d 100644 (file)
@@ -329,9 +329,9 @@ std::string WidgetInterfaceDAO::databaseFileName(int widgetHandle)
     Try
     {
         WrtDB::WidgetDAOReadOnly widgetDAO(widgetHandle);
-        DPL::Optional<DPL::String> pkgname = widgetDAO.getPkgname();
+        DPL::String pkgname = widgetDAO.getPkgname_NOTNULL();
 
-        filename << GetWidgetPersistentStoragePath(*pkgname)
+        filename << GetWidgetPersistentStoragePath(pkgname)
                  << "/"
                  << GetWidgetInterfaceDatabaseFile();
     }