Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a83abaa3
Unverified
Commit
a83abaa3
authored
Apr 02, 2021
by
Jenn Magder
Committed by
GitHub
Apr 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate fingerprint to null safety (#79587)
parent
bc4bda02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
build_validation.dart
packages/flutter_tools/lib/src/android/build_validation.dart
+1
-3
fingerprint.dart
packages/flutter_tools/lib/src/base/fingerprint.dart
+11
-10
test_wrapper.dart
packages/flutter_tools/lib/src/test/test_wrapper.dart
+0
-2
No files found.
packages/flutter_tools/lib/src/android/build_validation.dart
View file @
a83abaa3
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'../base/common.dart'
;
import
'../build_info.dart'
;
...
...
@@ -27,7 +25,7 @@ void validateBuild(AndroidBuildInfo androidBuildInfo) {
);
}
if
(
buildInfo
.
buildNumber
!=
null
)
{
final
int
result
=
int
.
tryParse
(
buildInfo
.
buildNumber
);
final
int
?
result
=
int
.
tryParse
(
buildInfo
.
buildNumber
!
);
if
(
result
==
null
)
{
throwToolExit
(
'buildNumber:
${buildInfo.buildNumber}
was not a valid integer value.
\n
'
...
...
packages/flutter_tools/lib/src/base/fingerprint.dart
View file @
a83abaa3
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:crypto/crypto.dart'
show
md5
;
import
'package:meta/meta.dart'
;
...
...
@@ -19,10 +17,10 @@ import 'utils.dart';
/// such as checking if Cocoapods should be run.
class
Fingerprinter
{
Fingerprinter
({
@
required
this
.
fingerprintPath
,
@
required
Iterable
<
String
>
paths
,
@
required
FileSystem
fileSystem
,
@
required
Logger
logger
,
required
this
.
fingerprintPath
,
required
Iterable
<
String
>
paths
,
required
FileSystem
fileSystem
,
required
Logger
logger
,
})
:
_paths
=
paths
.
toList
(),
assert
(
fingerprintPath
!=
null
),
assert
(
paths
!=
null
&&
paths
.
every
((
String
path
)
=>
path
!=
null
)),
...
...
@@ -81,8 +79,8 @@ class Fingerprinter {
@immutable
class
Fingerprint
{
const
Fingerprint
.
_
({
Map
<
String
,
String
>
checksums
,
})
:
_checksums
=
checksums
;
Map
<
String
,
String
>
?
checksums
,
})
:
_checksums
=
checksums
??
const
<
String
,
String
>{}
;
factory
Fingerprint
.
fromBuildInputs
(
Iterable
<
String
>
inputPaths
,
FileSystem
fileSystem
)
{
final
Iterable
<
File
>
files
=
inputPaths
.
map
<
File
>(
fileSystem
.
file
);
...
...
@@ -103,9 +101,12 @@ class Fingerprint {
/// Throws [Exception], if there is a version mismatch between the
/// serializing framework and this framework.
factory
Fingerprint
.
fromJson
(
String
jsonData
)
{
final
Map
<
String
,
dynamic
>
content
=
castStringKeyedMap
(
json
.
decode
(
jsonData
));
final
Map
<
String
,
dynamic
>?
content
=
castStringKeyedMap
(
json
.
decode
(
jsonData
));
final
Map
<
String
,
String
>?
files
=
content
==
null
?
null
:
castStringKeyedMap
(
content
[
'files'
])?.
cast
<
String
,
String
>();
return
Fingerprint
.
_
(
checksums:
castStringKeyedMap
(
content
[
'files'
])?.
cast
<
String
,
String
>()
??
<
String
,
String
>{},
checksums:
files
??
<
String
,
String
>{},
);
}
...
...
packages/flutter_tools/lib/src/test/test_wrapper.dart
View file @
a83abaa3
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:async'
;
import
'package:test_core/src/executable.dart'
as
test
;
// ignore: implementation_imports
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment