File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ ## 4.0.1-dev
2
+
3
+ - Fix a potential error with ` checked: true ` when ` ArgumentError.message ` is
4
+ ` null ` .
5
+
1
6
## 4.0.0
2
7
3
8
- Support null safety.
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class CheckedFromJsonException implements Exception {
104
104
innerStack = null ;
105
105
106
106
CheckedFromJsonException ._(
107
- this .innerError,
107
+ Object this .innerError,
108
108
this .innerStack,
109
109
this .map,
110
110
this .key, {
@@ -113,9 +113,12 @@ class CheckedFromJsonException implements Exception {
113
113
badKey = innerError is BadKeyException ,
114
114
message = _getMessage (innerError);
115
115
116
- static String ? _getMessage (Object ? error) {
116
+ static String _getMessage (Object error) {
117
117
if (error is ArgumentError ) {
118
- return error.message? .toString ();
118
+ final message = error.message;
119
+ if (message != null ) {
120
+ return message.toString ();
121
+ }
119
122
}
120
123
if (error is BadKeyException ) {
121
124
return error.message;
Original file line number Diff line number Diff line change 1
1
name : json_annotation
2
- version : 4.0.0
2
+ version : 4.0.1-dev
3
3
description : >-
4
4
Classes and helper functions that support JSON code generation via the
5
5
`json_serializable` package.
You can’t perform that action at this time.
0 commit comments