Addressing PR feedback

main
AMZN-koppersr 5 years ago
parent c360e29fbf
commit ddc60041d3

@ -255,7 +255,7 @@ namespace AZ
size_t addedCount = container->Size(outputValue) - containerSize;
if (addedCount > 0)
{
// Values were added which means the container is no longer in its default state of being emtpy.
// Values were added which means the container is no longer in its default state of being empty.
retVal.Combine(JSR::ResultCode(JSR::Tasks::ReadField, JSR::Outcomes::Success));
}
AZStd::string_view message =

@ -73,7 +73,7 @@ namespace AZ
if (isExplicitDefault)
{
*outputValue = 0.0f;
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, "Double value set to default of 0.0.");
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, "Floating point value set to default of 0.0.");
}
switch (inputValue.GetType())

@ -170,13 +170,6 @@ namespace AZ
};
container->EnumTypes(typeCountCallback);
rapidjson::SizeType arraySize = isNewInstance ? typeCount : inputValue.Size();
if (arraySize < typeCount)
{
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported,
"Not enough entries in array to load an AZStd::pair or AZStd::tuple from.");
}
AZStd::vector<const SerializeContext::ClassElement*> classElements;
classElements.reserve(typeCount);
auto typeEnumCallback = [&classElements](const Uuid&, const SerializeContext::ClassElement* genericClassElement)
@ -214,6 +207,13 @@ namespace AZ
}
else
{
if (inputValue.Size() < typeCount)
{
return context.Report(
JSR::Tasks::ReadField, JSR::Outcomes::Unsupported,
"Not enough entries in array to load an AZStd::pair or AZStd::tuple from.");
}
rapidjson::SizeType arrayIndex = 0;
size_t numElementsWritten = 0;
for (size_t i = 0; i < typeCount; ++i)

@ -168,9 +168,9 @@ namespace JsonSerializationTests
{
features.EnableJsonType(rapidjson::kObjectType);
features.m_typeToInject = rapidjson::kNullType;
// The type information in the Serialize Context is incomplete so this test will fail.
// This is because assets have traditionally been treated as a special case, so there's
// information missing in the Json Serialization to deal with these.
// Assets are not fully registered with the Serialize Context for historical reasons. Due to the missing
// information the Json Serializer Conformity Tests can't run the subsection of tests that explicitly
// require the missing information.
features.m_enableNewInstanceTests = false;
}

@ -257,7 +257,7 @@ namespace JsonSerializationTests
{
Base::ConfigureFeatures(features);
// These tests don't work with pointers because there'll be a random value in the pointer
// which the Json Serialization try to delete. The POD version of these tests already cover
// which the Json Serialization will try to delete. The POD version of these tests already cover
// these cases.
features.m_enableNewInstanceTests = false;
}

Loading…
Cancel
Save