Skip to content

Commit 102ed67

Browse files
authored
[CQ] Data Flow: inline redundant locals (#7998)
Tidy up some needless locals.
1 parent 1e8bc6d commit 102ed67

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

flutter-idea/src/io/flutter/view/MultiIconSimpleColoredComponent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ private TextLayout createAndCacheTextLayout(int fragmentIndex, Font basefont, Fo
546546
Font currentFont = basefont;
547547
int currentIndex = start;
548548
for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) {
549-
final Font font = basefont;
550549
// TODO(jacobr): SuitableFontProvider is a private class so we can't
551550
// easily use it. How important is supporting this use case?
552551
/*
@@ -558,11 +557,11 @@ private TextLayout createAndCacheTextLayout(int fragmentIndex, Font basefont, Fo
558557
}
559558
*/
560559
final int i = it.getIndex();
561-
if (!Comparing.equal(currentFont, font)) {
560+
if (!Comparing.equal(currentFont, basefont)) {
562561
if (i > currentIndex) {
563562
string.addAttribute(TextAttribute.FONT, currentFont, currentIndex, i);
564563
}
565-
currentFont = font;
564+
currentFont = basefont;
566565
currentIndex = i;
567566
}
568567
}

flutter-idea/src/org/dartlang/analysis/server/protocol/ExtractWidgetFeedback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ public int hashCode() {
6363
}
6464

6565
public JsonObject toJson() {
66-
JsonObject jsonObject = new JsonObject();
67-
return jsonObject;
66+
return new JsonObject();
6867
}
6968

7069
@Override

0 commit comments

Comments
 (0)