Skip to content

Commit 4b43c8d

Browse files
authored
[CQ] remove redundant cast (#8501)
No need for a cast here. <img width="1866" height="154" alt="image" src="https://github.com/user-attachments/assets/7b865cd3-41be-4a93-8a43-25134ce33fa6" /> --- <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent e296bc7 commit 4b43c8d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/io/flutter/test/DartTestEventsConverterZ.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package io.flutter.test;
22

3-
import com.google.gson.*;
3+
import com.google.gson.Gson;
4+
import com.google.gson.JsonArray;
5+
import com.google.gson.JsonElement;
6+
import com.google.gson.JsonObject;
7+
import com.google.gson.JsonSyntaxException;
48
import com.intellij.execution.testframework.TestConsoleProperties;
59
import com.intellij.execution.testframework.sm.ServiceMessageBuilder;
610
import com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter;
@@ -18,7 +22,11 @@
1822

1923
import java.lang.reflect.Type;
2024
import java.text.ParseException;
21-
import java.util.*;
25+
import java.util.ArrayList;
26+
import java.util.HashMap;
27+
import java.util.List;
28+
import java.util.Map;
29+
import java.util.Objects;
2230
import java.util.regex.Matcher;
2331
import java.util.regex.Pattern;
2432

@@ -263,7 +271,7 @@ private boolean handleTestDone(JsonObject obj) throws ParseException {
263271
//if (test.getMetadata().skip) return true; // skipped tests are reported as ignored in handleTestStart(). testFinished signal must follow
264272

265273
ServiceMessageBuilder testFinished = ServiceMessageBuilder.testFinished(test.getBaseName());
266-
long duration = getTimestamp(obj) - (Long)myTestIdToTimestamp.get(test.getId());
274+
long duration = getTimestamp(obj) - myTestIdToTimestamp.get(test.getId());
267275
testFinished.addAttribute("duration", Long.toString(duration));
268276

269277
return finishMessage(testFinished, test.getId(), test.getValidParentId()) && checkGroupDone(test.getParent());

0 commit comments

Comments
 (0)