Skip to content

Commit dfab275

Browse files
committedJun 18, 2020
Sync from Piper @317197168
PROTOBUF_SYNC_PIPER
1 parent f77065d commit dfab275

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+348
-240
lines changed
 

‎CHANGES.txt

+11-2
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,25 @@ Unreleased Changes
1111
* Added more Windows macros to proto whitelist.
1212
* Arena constructors for map entry messages are now marked "explicit"
1313
(for regular messages they were already explicit).
14+
* Fix subtle aliasing bug in RepeatedField::Add
15+
* Fix mismatch between MapEntry ByteSize and Serialize with respect to unset
16+
fields.
1417

1518
Python:
16-
* Reject lowercase t for Timestamp json format. Fixes a conformance test.
19+
* JSON format conformance fixes:
20+
* Reject lowercase t for Timestamp json format.
21+
* Print full_name directly for extensions (no camelCase).
22+
* Reject boolean values for integer fields.
23+
* Reject NaN, Infinity, -Infinity that is not quoted.
24+
* Base64 fixes for bytes fields: accept URL-safe base64 and missing padding.
25+
* Bugfix for fields/files named "async" or "await".
1726
* Improved the error message when AttributeError is returned from __getattr__
1827
in EnumTypeWrapper.
19-
* Json format will print full_name directly for extensions.
2028

2129
Java:
2230
* Fixed a bug where setting optional proto3 enums with setFooValue() would
2331
not mark the value as present.
32+
* Add Subtract function to FieldMaskUtil.
2433

2534
C#:
2635
* Dropped support for netstandard1.0 (replaced by support for netstandard1.1).

‎conformance/binary_json_conformance_suite.cc

+23
Original file line numberDiff line numberDiff line change
@@ -3051,6 +3051,29 @@ void BinaryAndJsonConformanceSuite::RunJsonTestsForValue() {
30513051
}
30523052
]
30533053
)");
3054+
RunValidJsonTestWithValidator(
3055+
"NullValueInOtherOneofOldFormat", RECOMMENDED,
3056+
R"({"oneofNullValue": "NULL_VALUE"})",
3057+
[](const Json::Value& value) {
3058+
return (value.isMember("oneofNullValue") &&
3059+
value["oneofNullValue"].isNull());
3060+
},
3061+
true);
3062+
RunValidJsonTestWithValidator(
3063+
"NullValueInOtherOneofNewFormat", RECOMMENDED,
3064+
R"({"oneofNullValue": null})",
3065+
[](const Json::Value& value) {
3066+
return (value.isMember("oneofNullValue") &&
3067+
value["oneofNullValue"].isNull());
3068+
},
3069+
true);
3070+
RunValidJsonTestWithValidator(
3071+
"NullValueInNormalMessage", RECOMMENDED,
3072+
R"({"optionalNullValue": null})",
3073+
[](const Json::Value& value) {
3074+
return value.empty();
3075+
},
3076+
true);
30543077
}
30553078

30563079
void BinaryAndJsonConformanceSuite::RunJsonTestsForAny() {

0 commit comments

Comments
 (0)