mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
优化 GifDecoder 类中的一处 equals 判断
使用 contentEquals(app) 直接进行 char 数组比对,避免 equals(app.toString()) 中将 StringBuilder 转为 String,会多一道 char 数组拷贝
This commit is contained in:
parent
c61cca20ca
commit
34249995bf
@ -606,7 +606,7 @@ public class GifDecoder {
|
|||||||
for (int i = 0; i < 11; i++) {
|
for (int i = 0; i < 11; i++) {
|
||||||
app.append((char) block[i]);
|
app.append((char) block[i]);
|
||||||
}
|
}
|
||||||
if ("NETSCAPE2.0".equals(app.toString())) {
|
if ("NETSCAPE2.0".contentEquals(app)) {
|
||||||
readNetscapeExt();
|
readNetscapeExt();
|
||||||
} else {
|
} else {
|
||||||
skip(); // don't care
|
skip(); // don't care
|
||||||
|
Loading…
Reference in New Issue
Block a user