Remove version check in ApplicationData 79/36379/2
authorJakub Izydorczyk <j.izydorczyk@samsung.com>
Thu, 5 Mar 2015 14:17:56 +0000 (15:17 +0100)
committerPawel Sikorski <p.sikorski@samsung.com>
Mon, 9 Mar 2015 11:00:00 +0000 (04:00 -0700)
Remove getting manifest version attribute error code, as
according to w3c specification version attribute is optional
and can be any string.

Links to spec:
http://www.w3.org/TR/widgets/#the-version-attribute and
http://www.w3.org/TR/widgets/#version-attribute

Change-Id: I5d8192a34721d8e7c9ac08af70e98af9fd011dda

src/widget-manifest-parser/application_data.cc
src/widget-manifest-parser/application_manifest_constants.cc

index 34fd98e..347d727 100644 (file)
@@ -184,17 +184,8 @@ bool ApplicationData::LoadName(std::string* error) {
 
 bool ApplicationData::LoadVersion(std::string* error) {
   assert(error);
-  std::string version_str;
-
-  version_ = "";
-
-  bool ok = manifest_->GetString(widget_keys::kVersionKey, &version_str);
-  if (!ok) {
-    *error = errors::kInvalidVersion;
-    return true;
-  }
-
-  version_ = std::string(version_str);
+  if (!manifest_->GetString(widget_keys::kVersionKey, &version_))
+    LOG(INFO) << "Version is not defined.";
   return true;
 }
 
index 601f3f1..c6a09fd 100644 (file)
@@ -156,9 +156,6 @@ const char kInvalidKey[] =
     "Value 'key' is missing or invalid.";
 const char kInvalidName[] =
     "Required value 'name' is missing or invalid.";
-const char kInvalidVersion[] =
-    "Required value 'version' is missing or invalid. It must be between 1-4 "
-    "dot-separated integers each between 0 and 65536.";
 const char kManifestParseError[] =
     "Manifest is not valid JSON.";
 const char kManifestUnreadable[] =