Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
8a7ae957
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8a7ae957
编写于
12月 15, 2018
作者:
I
Ian Hickson
提交者:
GitHub
12月 15, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Undeprecated BigInteger support, but document what it actually does. (#6903)
上级
17789249
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
3 addition
and
8 deletion
+3
-8
shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
...ndroid/io/flutter/plugin/common/StandardMessageCodec.java
+3
-8
未找到文件。
shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
浏览文件 @
8a7ae957
...
@@ -30,6 +30,7 @@ import android.util.Log;
...
@@ -30,6 +30,7 @@ import android.util.Log;
* <li>null</li>
* <li>null</li>
* <li>Booleans</li>
* <li>Booleans</li>
* <li>Bytes, Shorts, Integers, Longs</li>
* <li>Bytes, Shorts, Integers, Longs</li>
* <li>BigIntegers (see below)</li>
* <li>Floats, Doubles</li>
* <li>Floats, Doubles</li>
* <li>Strings</li>
* <li>Strings</li>
* <li>byte[], int[], long[], double[]</li>
* <li>byte[], int[], long[], double[]</li>
...
@@ -53,11 +54,8 @@ import android.util.Log;
...
@@ -53,11 +54,8 @@ import android.util.Log;
* <li>Map: Map</li>
* <li>Map: Map</li>
* </ul>
* </ul>
*
*
* <p>Direct support for BigIntegers has been deprecated on 2018-01-09 to be made
* <p>BigIntegers are represented in Dart as strings with the
* unavailable four weeks after this change is available on the Flutter alpha
* hexadecimal representation of the integer's value.</p>
* branch. BigIntegers were needed because the Dart 1.0 int type had no size
* limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed integer.
* If you need to communicate larger integers, use String encoding instead.</p>
*
*
* <p>To extend the codec, overwrite the writeValue and readValueOfType methods.</p>
* <p>To extend the codec, overwrite the writeValue and readValueOfType methods.</p>
*/
*/
...
@@ -96,7 +94,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
...
@@ -96,7 +94,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
private
static
final
byte
FALSE
=
2
;
private
static
final
byte
FALSE
=
2
;
private
static
final
byte
INT
=
3
;
private
static
final
byte
INT
=
3
;
private
static
final
byte
LONG
=
4
;
private
static
final
byte
LONG
=
4
;
@Deprecated
private
static
final
byte
BIGINT
=
5
;
private
static
final
byte
BIGINT
=
5
;
private
static
final
byte
DOUBLE
=
6
;
private
static
final
byte
DOUBLE
=
6
;
private
static
final
byte
STRING
=
7
;
private
static
final
byte
STRING
=
7
;
...
@@ -237,7 +234,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
...
@@ -237,7 +234,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
writeAlignment
(
stream
,
8
);
writeAlignment
(
stream
,
8
);
writeDouble
(
stream
,
((
Number
)
value
).
doubleValue
());
writeDouble
(
stream
,
((
Number
)
value
).
doubleValue
());
}
else
if
(
value
instanceof
BigInteger
)
{
}
else
if
(
value
instanceof
BigInteger
)
{
Log
.
w
(
"Flutter"
,
"Support for BigIntegers has been deprecated. Use String encoding instead."
);
stream
.
write
(
BIGINT
);
stream
.
write
(
BIGINT
);
writeBytes
(
stream
,
writeBytes
(
stream
,
((
BigInteger
)
value
).
toString
(
16
).
getBytes
(
UTF8
));
((
BigInteger
)
value
).
toString
(
16
).
getBytes
(
UTF8
));
...
@@ -367,7 +363,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
...
@@ -367,7 +363,6 @@ public class StandardMessageCodec implements MessageCodec<Object> {
result
=
buffer
.
getLong
();
result
=
buffer
.
getLong
();
break
;
break
;
case
BIGINT:
{
case
BIGINT:
{
Log
.
w
(
"Flutter"
,
"Support for BigIntegers has been deprecated. Use String encoding instead."
);
final
byte
[]
hex
=
readBytes
(
buffer
);
final
byte
[]
hex
=
readBytes
(
buffer
);
result
=
new
BigInteger
(
new
String
(
hex
,
UTF8
),
16
);
result
=
new
BigInteger
(
new
String
(
hex
,
UTF8
),
16
);
break
;
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录