From 22754baabd8e518df938b79b43ed10d21311fdee Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sat, 6 Apr 2019 18:39:38 -0700 Subject: [PATCH 1/3] address reported Java lints --- src/io/flutter/FlutterInitializer.java | 4 ++-- src/io/flutter/ObservatoryConnector.java | 2 +- src/io/flutter/ProjectOpenActivity.java | 2 +- .../FlutterPackagesExplorerActionGroup.java | 2 +- .../flutter/actions/OpenEmulatorAction.java | 3 ++- .../flutter/actions/ReloadAllFlutterApps.java | 2 -- src/io/flutter/bazel/PluginConfig.java | 3 ++- .../NativeEditorNotificationProvider.java | 3 +-- .../flutter/inspector/InspectorService.java | 22 +++++++++---------- src/io/flutter/inspector/InspectorTree.java | 3 ++- .../inspector/WidgetPerfTipsPanel.java | 1 + src/io/flutter/logging/FlutterLogView.java | 2 +- .../flutter/perf/EditorPerfDecorations.java | 4 ++-- src/io/flutter/perf/FlutterWidgetPerf.java | 2 +- src/io/flutter/preview/PreviewArea.java | 2 +- src/io/flutter/preview/PreviewView.java | 18 +++++++-------- .../flutter/run/FlutterRunNotifications.java | 2 +- src/io/flutter/run/OpenDevToolsAction.java | 2 +- src/io/flutter/run/OpenObservatoryAction.java | 2 +- .../flutter/run/OpenTimelineViewAction.java | 2 +- src/io/flutter/run/bazel/BazelFields.java | 2 +- .../run/bazelTest/BazelTestDebugProcess.java | 2 +- .../run/bazelTest/BazelTestFields.java | 1 - .../run/bazelTest/BazelTestLaunchState.java | 1 + .../run/bazelTest/BazelTestRunner.java | 3 +-- ...utterBazelTestConfigurationEditorForm.java | 1 + src/io/flutter/run/daemon/FlutterApp.java | 2 +- .../run/test/FlutterTestEventsConverter.java | 2 +- .../run/test/FlutterTestLocationProvider.java | 5 +---- .../flutter/run/test/FlutterTestRunner.java | 2 +- src/io/flutter/run/test/TestDebugProcess.java | 2 +- .../sdk/FlutterPluginLibraryProperties.java | 3 ++- .../sdk/FlutterSettingsConfigurable.java | 3 +-- .../DartVmServiceBreakpointHandler.java | 9 ++------ .../vmService/DartVmServiceDebugProcess.java | 4 ++-- .../frame/DartVmServiceEvaluator.java | 21 ++++++++++-------- .../DartToplevelTemplateContextType.java | 1 - .../test/DartTestEventsConverterZ.java | 7 +++--- .../util/DartTestLocationProviderZ.java | 3 ++- src/io/flutter/view/FlutterPerfView.java | 1 + src/io/flutter/view/FlutterViewAction.java | 2 +- .../FlutterViewLocalToggleableAction.java | 2 +- .../view/FlutterViewToggleableAction.java | 2 +- src/io/flutter/view/HighlightedTable.java | 5 +++-- src/io/flutter/view/InspectorMemoryTab.java | 18 +++++++-------- src/io/flutter/view/InspectorPanel.java | 4 ++-- src/io/flutter/view/InspectorTreeUI.java | 12 +++++----- .../flutter/perf/FlutterWidgetPerfTest.java | 2 +- 48 files changed, 99 insertions(+), 106 deletions(-) diff --git a/src/io/flutter/FlutterInitializer.java b/src/io/flutter/FlutterInitializer.java index 4391b424d9..4facb652fe 100644 --- a/src/io/flutter/FlutterInitializer.java +++ b/src/io/flutter/FlutterInitializer.java @@ -158,7 +158,7 @@ public void runActivity(@NotNull Project project) { }); notification.addAction(new AnAction("Sounds good!") { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { notification.expire(); final Analytics analytics = getAnalytics(); // We only track for flutter projects. @@ -169,7 +169,7 @@ public void actionPerformed(AnActionEvent event) { }); notification.addAction(new AnAction("No thanks") { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { notification.expire(); setCanReportAnalytics(false); } diff --git a/src/io/flutter/ObservatoryConnector.java b/src/io/flutter/ObservatoryConnector.java index d4fb9e1cea..39f5cc25a0 100644 --- a/src/io/flutter/ObservatoryConnector.java +++ b/src/io/flutter/ObservatoryConnector.java @@ -1,4 +1,4 @@ -package com.jetbrains.lang.dart.ide.runner; +package io.flutter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/io/flutter/ProjectOpenActivity.java b/src/io/flutter/ProjectOpenActivity.java index 78bc1415db..7e867ca8cc 100644 --- a/src/io/flutter/ProjectOpenActivity.java +++ b/src/io/flutter/ProjectOpenActivity.java @@ -64,7 +64,7 @@ public PackagesOutOfDateNotification(@NotNull Project project, @NotNull PubRoot addAction(new AnAction("Run 'flutter packages get'") { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { expire(); final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project); diff --git a/src/io/flutter/actions/FlutterPackagesExplorerActionGroup.java b/src/io/flutter/actions/FlutterPackagesExplorerActionGroup.java index 1df11230d3..d8f7148afa 100644 --- a/src/io/flutter/actions/FlutterPackagesExplorerActionGroup.java +++ b/src/io/flutter/actions/FlutterPackagesExplorerActionGroup.java @@ -23,7 +23,7 @@ private static boolean isFlutterPubspec(@NotNull AnActionEvent e) { } @Override - public void update(AnActionEvent e) { + public void update(@NotNull AnActionEvent e) { final boolean enabled = isFlutterPubspec(e); final Presentation presentation = e.getPresentation(); presentation.setEnabled(enabled); diff --git a/src/io/flutter/actions/OpenEmulatorAction.java b/src/io/flutter/actions/OpenEmulatorAction.java index 8f642897f7..bc6099c213 100644 --- a/src/io/flutter/actions/OpenEmulatorAction.java +++ b/src/io/flutter/actions/OpenEmulatorAction.java @@ -10,6 +10,7 @@ import com.intellij.openapi.project.Project; import io.flutter.android.AndroidEmulator; import io.flutter.android.AndroidSdk; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.List; @@ -37,7 +38,7 @@ public OpenEmulatorAction(AndroidEmulator emulator) { } @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { emulator.startEmulator(); } } diff --git a/src/io/flutter/actions/ReloadAllFlutterApps.java b/src/io/flutter/actions/ReloadAllFlutterApps.java index 76d1031e71..2ed30ed924 100644 --- a/src/io/flutter/actions/ReloadAllFlutterApps.java +++ b/src/io/flutter/actions/ReloadAllFlutterApps.java @@ -17,8 +17,6 @@ import io.flutter.run.daemon.FlutterApp; import org.jetbrains.annotations.NotNull; -import java.awt.event.InputEvent; - /** * Action that reloads all running Flutter apps. */ diff --git a/src/io/flutter/bazel/PluginConfig.java b/src/io/flutter/bazel/PluginConfig.java index 909155e9ae..c65ef78ff2 100644 --- a/src/io/flutter/bazel/PluginConfig.java +++ b/src/io/flutter/bazel/PluginConfig.java @@ -21,6 +21,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.regex.PatternSyntaxException; /** @@ -74,7 +75,7 @@ public static PluginConfig load(@NotNull VirtualFile file) { try ( // Create the input stream in a try-with-resources statement. This will automatically close the stream // in an implicit finally section; this addresses a file handle leak issue we had on MacOS. - final InputStreamReader input = new InputStreamReader(file.getInputStream(), "UTF-8") + final InputStreamReader input = new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8) ) { final Fields fields = GSON.fromJson(input, Fields.class); return new PluginConfig(fields); diff --git a/src/io/flutter/editor/NativeEditorNotificationProvider.java b/src/io/flutter/editor/NativeEditorNotificationProvider.java index b889eff514..1ccbc9ab80 100644 --- a/src/io/flutter/editor/NativeEditorNotificationProvider.java +++ b/src/io/flutter/editor/NativeEditorNotificationProvider.java @@ -56,7 +56,7 @@ private EditorNotificationPanel createPanelForAction(VirtualFile file, VirtualFi if (actionName == null) { return null; } - NativeEditorActionsPanel panel = new NativeEditorActionsPanel(file, root, actionName); + final NativeEditorActionsPanel panel = new NativeEditorActionsPanel(file, root, actionName); return panel.isValidForFile() ? panel : null; } @@ -65,7 +65,6 @@ private static String getActionName(VirtualFile root) { return null; } - //noinspection IfCanBeSwitch if (root.getName().equals("android")) { return "flutter.androidstudio.open"; } diff --git a/src/io/flutter/inspector/InspectorService.java b/src/io/flutter/inspector/InspectorService.java index f4c69115bd..028c6da7d4 100644 --- a/src/io/flutter/inspector/InspectorService.java +++ b/src/io/flutter/inspector/InspectorService.java @@ -11,12 +11,12 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.util.SystemInfo; import com.intellij.xdebugger.XSourcePosition; -import io.flutter.server.vmService.ServiceExtensions; -import io.flutter.server.vmService.VmServiceConsumers; -import io.flutter.server.vmService.frame.DartVmServiceValue; import io.flutter.pub.PubRoot; import io.flutter.run.FlutterDebugProcess; import io.flutter.run.daemon.FlutterApp; +import io.flutter.server.vmService.ServiceExtensions; +import io.flutter.server.vmService.VmServiceConsumers; +import io.flutter.server.vmService.frame.DartVmServiceValue; import io.flutter.utils.StreamSubscription; import io.flutter.utils.VmServiceListenerAdapter; import org.dartlang.vm.service.VmService; @@ -29,8 +29,6 @@ import java.util.function.BiConsumer; import java.util.function.Supplier; -import static java.util.Arrays.asList; - /** * Manages all communication between inspector code running on the DartVM and * inspector code running in the IDE. @@ -92,7 +90,7 @@ public static CompletableFuture create(@NotNull FlutterApp app private InspectorService(@NotNull FlutterApp app, @NotNull FlutterDebugProcess debugProcess, @NotNull VmService vmService, - EvalOnDartLibrary inspectorLibrary, + @NotNull EvalOnDartLibrary inspectorLibrary, @NotNull Set supportedServiceMethods) { this.vmService = vmService; this.app = app; @@ -173,6 +171,7 @@ public ObjectGroup createObjectGroup(String debugName) { return new ObjectGroup(debugName); } + @NotNull private EvalOnDartLibrary getInspectorLibrary() { return inspectorLibrary; } @@ -244,7 +243,7 @@ private void onVmServiceReceived(String streamId, Event event) { public CompletableFuture isWidgetTreeReady() { if (useDaemonApi()) { return invokeServiceMethodDaemonNoGroup("isWidgetTreeReady", new HashMap<>()) - .thenApplyAsync((JsonElement element) -> element.getAsBoolean() == true); + .thenApplyAsync((JsonElement element) -> element.getAsBoolean()); } else { return invokeServiceMethodObservatoryNoGroup("isWidgetTreeReady") @@ -275,7 +274,7 @@ public CompletableFuture inferPubRootDirectoryIfNeeded() { } return root.getChildren().thenComposeAsync((ArrayList children) -> { - if (children != null && children.isEmpty() == false) { + if (children != null && !children.isEmpty()) { // There are already widgets identified as being from the summary tree so // no need to guess the pub root directory. return CompletableFuture.completedFuture(null); @@ -305,7 +304,7 @@ public CompletableFuture inferPubRootDirectoryIfNeeded() { // TODO(jacobr): use the list of loaded scripts to determine the appropriate // package root directory given that the root script of this project is in // this directory rather than guessing based on url structure. - ArrayList parts = new ArrayList(Arrays.asList(path.split("/"))); + ArrayList parts = new ArrayList<>(Arrays.asList(path.split("/"))); String pubRootDirectory = null; for (int i = parts.size() - 1; i >= 0; i--) { @@ -326,10 +325,9 @@ public CompletableFuture inferPubRootDirectoryIfNeeded() { } final String finalPubRootDirectory = pubRootDirectory; - return setPubRootDirectories(new ArrayList(Arrays.asList(pubRootDirectory))).thenApplyAsync((ignored) -> { + return setPubRootDirectories(new ArrayList<>(Collections.singletonList(pubRootDirectory))).thenApplyAsync((ignored) -> { group.dispose(); - final String directory = finalPubRootDirectory; - return directory; + return finalPubRootDirectory; }); }); }); diff --git a/src/io/flutter/inspector/InspectorTree.java b/src/io/flutter/inspector/InspectorTree.java index 5b1e8a3f27..7742700d9a 100644 --- a/src/io/flutter/inspector/InspectorTree.java +++ b/src/io/flutter/inspector/InspectorTree.java @@ -16,6 +16,7 @@ import com.intellij.xdebugger.impl.ui.DebuggerUIUtil; import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl; import io.flutter.view.InspectorTreeUI; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.plaf.TreeUI; @@ -118,7 +119,7 @@ public void dispose() { @Nullable @Override - public Object getData(String dataId) { + public Object getData(@NotNull String dataId) { if (InspectorTree.INSPECTOR_KEY.is(dataId)) { return this; } diff --git a/src/io/flutter/inspector/WidgetPerfTipsPanel.java b/src/io/flutter/inspector/WidgetPerfTipsPanel.java index 403f3f684b..c464f839a0 100644 --- a/src/io/flutter/inspector/WidgetPerfTipsPanel.java +++ b/src/io/flutter/inspector/WidgetPerfTipsPanel.java @@ -146,6 +146,7 @@ private void updateTip() { } } + // TODO(devoncarew): We never query changedEditors. final ArrayList changedEditors = new ArrayList<>(); for (TextEditor editor : newTipsForFile.keySet()) { final List entry = newTipsForFile.get(editor); diff --git a/src/io/flutter/logging/FlutterLogView.java b/src/io/flutter/logging/FlutterLogView.java index 91a7a9c485..6a56889e56 100644 --- a/src/io/flutter/logging/FlutterLogView.java +++ b/src/io/flutter/logging/FlutterLogView.java @@ -687,7 +687,7 @@ private void computeTextAttributesByLogLevelCache() { fontType = fontType | textStyle; } - @SuppressWarnings("MagicConstant") final SimpleTextAttributes textAttributes = new SimpleTextAttributes( + final SimpleTextAttributes textAttributes = new SimpleTextAttributes( attributes.getBackgroundColor(), attributes.getForegroundColor(), effectColor, diff --git a/src/io/flutter/perf/EditorPerfDecorations.java b/src/io/flutter/perf/EditorPerfDecorations.java index 755ef0985a..3e0438192c 100644 --- a/src/io/flutter/perf/EditorPerfDecorations.java +++ b/src/io/flutter/perf/EditorPerfDecorations.java @@ -49,7 +49,7 @@ class EditorPerfDecorations implements EditorMouseListener, EditorPerfModel { /** * Experimental option to animate highlighted widget names. - * + *

* Disabled by default as animating contents of the TextEditor results in * higher than desired memory usage. */ @@ -342,7 +342,7 @@ RangeHighlighter getHighlighter() { public AnAction getClickAction() { return new AnAction() { @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent event) { if (isActive()) { final ToolWindowManagerEx toolWindowManager = ToolWindowManagerEx.getInstanceEx(getApp().getProject()); diff --git a/src/io/flutter/perf/FlutterWidgetPerf.java b/src/io/flutter/perf/FlutterWidgetPerf.java index 31a1163045..b87d40d268 100644 --- a/src/io/flutter/perf/FlutterWidgetPerf.java +++ b/src/io/flutter/perf/FlutterWidgetPerf.java @@ -71,7 +71,7 @@ class StatsForReportKind { private final Map stats = new HashMap<>(); final Set currentEditors = new HashSet<>(); - private boolean profilingEnabled = false; + private boolean profilingEnabled; final Timer uiAnimationTimer; private final WidgetPerfProvider perfProvider; private boolean isDisposed = false; diff --git a/src/io/flutter/preview/PreviewArea.java b/src/io/flutter/preview/PreviewArea.java index 6a109dffe1..b79ae5a272 100644 --- a/src/io/flutter/preview/PreviewArea.java +++ b/src/io/flutter/preview/PreviewArea.java @@ -363,7 +363,7 @@ class TitleAction extends AnAction implements CustomComponentAction { } @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { } @Override diff --git a/src/io/flutter/preview/PreviewView.java b/src/io/flutter/preview/PreviewView.java index a267871f9c..d18c9501c6 100644 --- a/src/io/flutter/preview/PreviewView.java +++ b/src/io/flutter/preview/PreviewView.java @@ -74,8 +74,8 @@ import java.beans.PropertyChangeListener; import java.io.PrintWriter; import java.io.StringWriter; -import java.util.*; import java.util.List; +import java.util.*; import java.util.concurrent.TimeUnit; @com.intellij.openapi.components.State( @@ -342,14 +342,14 @@ public void initToolWindow(@NotNull ToolWindow toolWindow) { if (toolWindow instanceof ToolWindowEx) { final AnAction sendFeedbackAction = new AnAction("Send Feedback", "Send Feedback", FlutterIcons.Feedback) { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { BrowserUtil.browse(FEEDBACK_URL); } }; final AnAction separator = new AnAction(AllIcons.General.Divider) { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { } }; @@ -1013,7 +1013,7 @@ private class QuickAssistAction extends AnAction { } @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { sendAnalyticEvent(id); final SourceChange change; synchronized (actionToChangeMap) { @@ -1044,7 +1044,7 @@ private class ExtractMethodAction extends AnAction { } @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { final AnAction action = ActionManager.getInstance().getAction("ExtractMethod"); if (action != null) { final FlutterOutline outline = getWidgetOutline(); @@ -1097,7 +1097,7 @@ private class ExtractWidgetAction extends AnAction { } @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { final AnAction action = ActionManager.getInstance().getAction("Flutter.ExtractWidget"); if (action != null) { TransactionGuard.submitTransaction(project, () -> { @@ -1138,7 +1138,7 @@ private class ShowOnlyWidgetsAction extends AnAction implements Toggleable, Righ } @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { final FlutterSettings flutterSettings = FlutterSettings.getInstance(); flutterSettings.setShowOnlyWidgets(!flutterSettings.isShowOnlyWidgets()); if (currentOutline != null) { @@ -1168,7 +1168,7 @@ class OutlineComponent extends SimpleToolWindowPanel { } @Override - public Object getData(String dataId) { + public Object getData(@NotNull String dataId) { if (PlatformDataKeys.FILE_EDITOR.is(dataId)) { return myView.currentFileEditor; } @@ -1393,7 +1393,7 @@ public TextOnlyActionWrapper(AnAction action) { } @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { action.actionPerformed(event); } } diff --git a/src/io/flutter/run/FlutterRunNotifications.java b/src/io/flutter/run/FlutterRunNotifications.java index b4eae8b01f..cc254140f0 100644 --- a/src/io/flutter/run/FlutterRunNotifications.java +++ b/src/io/flutter/run/FlutterRunNotifications.java @@ -59,7 +59,7 @@ private void checkForDisplayFirstReload() { notification.setIcon(FlutterIcons.HotReload); notification.addAction(new AnAction("Learn more") { @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { BrowserUtil.browse(FlutterBundle.message("flutter.reload.firstRun.url")); notification.expire(); } diff --git a/src/io/flutter/run/OpenDevToolsAction.java b/src/io/flutter/run/OpenDevToolsAction.java index b559b38ab6..f8c31dbb9d 100644 --- a/src/io/flutter/run/OpenDevToolsAction.java +++ b/src/io/flutter/run/OpenDevToolsAction.java @@ -8,9 +8,9 @@ import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.util.Computable; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import icons.FlutterIcons; import io.flutter.FlutterInitializer; +import io.flutter.ObservatoryConnector; import io.flutter.devtools.DevToolsManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/io/flutter/run/OpenObservatoryAction.java b/src/io/flutter/run/OpenObservatoryAction.java index 2ce815bb1d..1aff62d723 100644 --- a/src/io/flutter/run/OpenObservatoryAction.java +++ b/src/io/flutter/run/OpenObservatoryAction.java @@ -9,10 +9,10 @@ import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.util.Computable; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import icons.FlutterIcons; import io.flutter.FlutterBundle; import io.flutter.FlutterInitializer; +import io.flutter.ObservatoryConnector; import org.jetbrains.annotations.NotNull; public class OpenObservatoryAction extends DumbAwareAction { diff --git a/src/io/flutter/run/OpenTimelineViewAction.java b/src/io/flutter/run/OpenTimelineViewAction.java index 5742855e12..403c44cf0d 100644 --- a/src/io/flutter/run/OpenTimelineViewAction.java +++ b/src/io/flutter/run/OpenTimelineViewAction.java @@ -9,9 +9,9 @@ import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.util.Computable; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import icons.FlutterIcons; import io.flutter.FlutterInitializer; +import io.flutter.ObservatoryConnector; import org.jetbrains.annotations.NotNull; public class OpenTimelineViewAction extends DumbAwareAction { diff --git a/src/io/flutter/run/bazel/BazelFields.java b/src/io/flutter/run/bazel/BazelFields.java index f7f614b864..de5d07a410 100644 --- a/src/io/flutter/run/bazel/BazelFields.java +++ b/src/io/flutter/run/bazel/BazelFields.java @@ -57,7 +57,7 @@ public class BazelFields { * * *

- * If the user overrides --define flutter_build_mode in {@link bazelArgs}, then this field will be ignored. + * If the user overrides --define flutter_build_mode in {@link #bazelArgs}, then this field will be ignored. */ private final boolean enableReleaseMode; diff --git a/src/io/flutter/run/bazelTest/BazelTestDebugProcess.java b/src/io/flutter/run/bazelTest/BazelTestDebugProcess.java index 0440c053a1..c20c22d442 100644 --- a/src/io/flutter/run/bazelTest/BazelTestDebugProcess.java +++ b/src/io/flutter/run/bazelTest/BazelTestDebugProcess.java @@ -9,8 +9,8 @@ import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.xdebugger.XDebugSession; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import com.jetbrains.lang.dart.util.DartUrlResolver; +import io.flutter.ObservatoryConnector; import io.flutter.run.FlutterPopFrameAction; import io.flutter.run.OpenDevToolsAction; import io.flutter.run.OpenObservatoryAction; diff --git a/src/io/flutter/run/bazelTest/BazelTestFields.java b/src/io/flutter/run/bazelTest/BazelTestFields.java index 2e1fa8be6b..d1f6665375 100644 --- a/src/io/flutter/run/bazelTest/BazelTestFields.java +++ b/src/io/flutter/run/bazelTest/BazelTestFields.java @@ -40,7 +40,6 @@ * The fields in a Bazel test run configuration. */ public class BazelTestFields { - @Nullable private final String testName; @Nullable private final String entryFile; @Nullable private final String bazelTarget; diff --git a/src/io/flutter/run/bazelTest/BazelTestLaunchState.java b/src/io/flutter/run/bazelTest/BazelTestLaunchState.java index c3e98dedf8..a9264f3a64 100644 --- a/src/io/flutter/run/bazelTest/BazelTestLaunchState.java +++ b/src/io/flutter/run/bazelTest/BazelTestLaunchState.java @@ -21,6 +21,7 @@ /** * The Bazel version of the {@link io.flutter.run.test.TestLaunchState}. */ +@SuppressWarnings("JavadocReference") public class BazelTestLaunchState extends CommandLineState { @NotNull private final BazelTestFields fields; diff --git a/src/io/flutter/run/bazelTest/BazelTestRunner.java b/src/io/flutter/run/bazelTest/BazelTestRunner.java index ad0ce24dab..f834b6b1d2 100644 --- a/src/io/flutter/run/bazelTest/BazelTestRunner.java +++ b/src/io/flutter/run/bazelTest/BazelTestRunner.java @@ -30,10 +30,10 @@ import com.intellij.xdebugger.XDebugProcessStarter; import com.intellij.xdebugger.XDebugSession; import com.intellij.xdebugger.XDebuggerManager; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import com.jetbrains.lang.dart.sdk.DartSdkLibUtil; import com.jetbrains.lang.dart.util.DartUrlResolver; import io.flutter.FlutterUtils; +import io.flutter.ObservatoryConnector; import io.flutter.run.PositionMapper; import io.flutter.run.common.CommonTestConfigUtils; import io.flutter.run.test.FlutterTestRunner; @@ -49,7 +49,6 @@ * The Bazel version of the {@link FlutterTestRunner}. Runs a Bazel Flutter test configuration in the debugger. */ public class BazelTestRunner extends GenericProgramRunner { - private static final Logger LOG = Logger.getInstance(BazelTestRunner.class); @NotNull diff --git a/src/io/flutter/run/bazelTest/FlutterBazelTestConfigurationEditorForm.java b/src/io/flutter/run/bazelTest/FlutterBazelTestConfigurationEditorForm.java index d087a7e77e..95180fc619 100644 --- a/src/io/flutter/run/bazelTest/FlutterBazelTestConfigurationEditorForm.java +++ b/src/io/flutter/run/bazelTest/FlutterBazelTestConfigurationEditorForm.java @@ -123,6 +123,7 @@ protected JComponent createEditor() { * a suitable default. */ private void updateFields(Scope next) { + // TODO(devoncarew): This if path is empty - due to a refactoring? if (next == Scope.TARGET_PATTERN && displayedScope != Scope.TARGET_PATTERN) { } else if (next != Scope.TARGET_PATTERN) { diff --git a/src/io/flutter/run/daemon/FlutterApp.java b/src/io/flutter/run/daemon/FlutterApp.java index e4abf22d3e..913cbbc918 100644 --- a/src/io/flutter/run/daemon/FlutterApp.java +++ b/src/io/flutter/run/daemon/FlutterApp.java @@ -29,9 +29,9 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.EventDispatcher; import com.intellij.util.concurrency.AppExecutorUtil; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import io.flutter.FlutterInitializer; import io.flutter.FlutterUtils; +import io.flutter.ObservatoryConnector; import io.flutter.logging.FlutterLog; import io.flutter.pub.PubRoot; import io.flutter.pub.PubRoots; diff --git a/src/io/flutter/run/test/FlutterTestEventsConverter.java b/src/io/flutter/run/test/FlutterTestEventsConverter.java index 71e29ac8de..43fd0f9955 100644 --- a/src/io/flutter/run/test/FlutterTestEventsConverter.java +++ b/src/io/flutter/run/test/FlutterTestEventsConverter.java @@ -10,8 +10,8 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.intellij.execution.testframework.TestConsoleProperties; -import com.jetbrains.lang.dart.ide.runner.test.DartTestEventsConverterZ; import com.jetbrains.lang.dart.util.DartUrlResolver; +import io.flutter.test.DartTestEventsConverterZ; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/io/flutter/run/test/FlutterTestLocationProvider.java b/src/io/flutter/run/test/FlutterTestLocationProvider.java index 478a490ccd..1a4ed250ca 100644 --- a/src/io/flutter/run/test/FlutterTestLocationProvider.java +++ b/src/io/flutter/run/test/FlutterTestLocationProvider.java @@ -9,17 +9,14 @@ import com.intellij.execution.Location; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; -import com.jetbrains.lang.dart.ide.runner.util.DartTestLocationProviderZ; import com.jetbrains.lang.dart.psi.DartCallExpression; +import io.flutter.util.DartTestLocationProviderZ; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Objects; - public class FlutterTestLocationProvider extends DartTestLocationProviderZ { public static final FlutterTestLocationProvider INSTANCE = new FlutterTestLocationProvider(); - @Nullable @Override protected Location getLocationByLineAndColumn(@NotNull PsiFile file, int line, int column) { diff --git a/src/io/flutter/run/test/FlutterTestRunner.java b/src/io/flutter/run/test/FlutterTestRunner.java index d8acbe4131..73ec7ffce1 100644 --- a/src/io/flutter/run/test/FlutterTestRunner.java +++ b/src/io/flutter/run/test/FlutterTestRunner.java @@ -21,9 +21,9 @@ import com.intellij.xdebugger.XDebugProcessStarter; import com.intellij.xdebugger.XDebugSession; import com.intellij.xdebugger.XDebuggerManager; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import com.jetbrains.lang.dart.util.DartUrlResolver; import io.flutter.FlutterUtils; +import io.flutter.ObservatoryConnector; import io.flutter.run.PositionMapper; import io.flutter.run.common.CommonTestConfigUtils; import io.flutter.sdk.FlutterSdk; diff --git a/src/io/flutter/run/test/TestDebugProcess.java b/src/io/flutter/run/test/TestDebugProcess.java index 41235c9f39..cf59808a34 100644 --- a/src/io/flutter/run/test/TestDebugProcess.java +++ b/src/io/flutter/run/test/TestDebugProcess.java @@ -9,8 +9,8 @@ import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.xdebugger.XDebugSession; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import com.jetbrains.lang.dart.util.DartUrlResolver; +import io.flutter.ObservatoryConnector; import io.flutter.run.FlutterPopFrameAction; import io.flutter.run.OpenDevToolsAction; import io.flutter.run.OpenObservatoryAction; diff --git a/src/io/flutter/sdk/FlutterPluginLibraryProperties.java b/src/io/flutter/sdk/FlutterPluginLibraryProperties.java index d8b8b6d2eb..611e7ef929 100644 --- a/src/io/flutter/sdk/FlutterPluginLibraryProperties.java +++ b/src/io/flutter/sdk/FlutterPluginLibraryProperties.java @@ -7,6 +7,7 @@ import com.intellij.openapi.roots.libraries.LibraryProperties; import com.intellij.util.xmlb.XmlSerializerUtil; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class FlutterPluginLibraryProperties extends LibraryProperties { @@ -30,7 +31,7 @@ public FlutterPluginLibraryProperties getState() { } @Override - public void loadState(FlutterPluginLibraryProperties properties) { + public void loadState(@NotNull FlutterPluginLibraryProperties properties) { XmlSerializerUtil.copyBean(properties, this); } } diff --git a/src/io/flutter/sdk/FlutterSettingsConfigurable.java b/src/io/flutter/sdk/FlutterSettingsConfigurable.java index ce973dd17f..c7d95483d4 100644 --- a/src/io/flutter/sdk/FlutterSettingsConfigurable.java +++ b/src/io/flutter/sdk/FlutterSettingsConfigurable.java @@ -102,7 +102,6 @@ public void mouseClicked(MouseEvent e) { } }); - //noinspection Convert2Lambda myFormatCodeOnSaveCheckBox .addChangeListener((e) -> myOrganizeImportsOnSaveCheckBox.setEnabled(myFormatCodeOnSaveCheckBox.isSelected())); mySyncAndroidLibrariesCheckBox.setVisible(FlutterUtils.isAndroidStudio()); @@ -189,7 +188,6 @@ public boolean isModified() { return true; } - //noinspection RedundantIfStatement if (settings.isSyncingAndroidLibraries() != mySyncAndroidLibrariesCheckBox.isSelected()) { return true; } @@ -198,6 +196,7 @@ public boolean isModified() { return true; } + //noinspection RedundantIfStatement if (settings.useNewBazelTestRunner(myProject) != myUseNewBazelTestRunner.isSelected()) { return true; } diff --git a/src/io/flutter/server/vmService/DartVmServiceBreakpointHandler.java b/src/io/flutter/server/vmService/DartVmServiceBreakpointHandler.java index da9506c3e3..679fca8856 100644 --- a/src/io/flutter/server/vmService/DartVmServiceBreakpointHandler.java +++ b/src/io/flutter/server/vmService/DartVmServiceBreakpointHandler.java @@ -66,7 +66,7 @@ public void vmBreakpointAdded(@NotNull final XLineBreakpoint xBreakpo private Set getVmBreakpoints(XLineBreakpoint xBreakpoint) { synchronized (myXBreakpointToVmBreakpointIdsMap) { - Set vmBreakpoints = myXBreakpointToVmBreakpointIdsMap.get(xBreakpoint); - if (vmBreakpoints == null) { - vmBreakpoints = new HashSet<>(); - myXBreakpointToVmBreakpointIdsMap.put(xBreakpoint, vmBreakpoints); - } - return vmBreakpoints; + return myXBreakpointToVmBreakpointIdsMap.computeIfAbsent(xBreakpoint, k -> new HashSet<>()); } } } diff --git a/src/io/flutter/server/vmService/DartVmServiceDebugProcess.java b/src/io/flutter/server/vmService/DartVmServiceDebugProcess.java index 841e504293..502da528f6 100644 --- a/src/io/flutter/server/vmService/DartVmServiceDebugProcess.java +++ b/src/io/flutter/server/vmService/DartVmServiceDebugProcess.java @@ -30,7 +30,6 @@ import com.intellij.xdebugger.frame.XStackFrame; import com.intellij.xdebugger.frame.XSuspendContext; import com.jetbrains.lang.dart.ide.runner.DartConsoleFilter; -import com.jetbrains.lang.dart.ide.runner.ObservatoryConnector; import com.jetbrains.lang.dart.ide.runner.actions.DartPopFrameAction; import com.jetbrains.lang.dart.ide.runner.base.DartDebuggerEditorsProvider; import com.jetbrains.lang.dart.ide.runner.server.OpenDartObservatoryUrlAction; @@ -39,6 +38,7 @@ import gnu.trove.TIntObjectHashMap; import io.flutter.FlutterBundle; import io.flutter.FlutterUtils; +import io.flutter.ObservatoryConnector; import io.flutter.run.FlutterDebugProcess; import io.flutter.run.FlutterLaunchMode; import io.flutter.server.vmService.frame.DartVmServiceEvaluator; @@ -66,7 +66,7 @@ public class DartVmServiceDebugProcess extends XDebugProcess { private static final Logger LOG = Logger.getInstance(DartVmServiceDebugProcess.class.getName()); - @Nullable private final ExecutionResult myExecutionResult; + @NotNull private final ExecutionResult myExecutionResult; @NotNull private final DartUrlResolver myDartUrlResolver; @NotNull private final XBreakpointHandler[] myBreakpointHandlers; private final IsolatesInfo myIsolatesInfo; diff --git a/src/io/flutter/server/vmService/frame/DartVmServiceEvaluator.java b/src/io/flutter/server/vmService/frame/DartVmServiceEvaluator.java index 944f0e9d1f..82861b7247 100644 --- a/src/io/flutter/server/vmService/frame/DartVmServiceEvaluator.java +++ b/src/io/flutter/server/vmService/frame/DartVmServiceEvaluator.java @@ -2,7 +2,10 @@ import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; -import com.intellij.openapi.fileEditor.*; +import com.intellij.openapi.fileEditor.FileEditorLocation; +import com.intellij.openapi.fileEditor.FileEditorManager; +import com.intellij.openapi.fileEditor.TextEditor; +import com.intellij.openapi.fileEditor.TextEditorLocation; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; @@ -16,10 +19,10 @@ import com.intellij.xdebugger.evaluation.ExpressionInfo; import com.intellij.xdebugger.evaluation.XDebuggerEvaluator; import com.intellij.xdebugger.frame.XValue; -import io.flutter.server.vmService.DartVmServiceDebugProcess; import com.jetbrains.lang.dart.psi.*; import com.jetbrains.lang.dart.util.DartResolveUtil; import gnu.trove.THashSet; +import io.flutter.server.vmService.DartVmServiceDebugProcess; import io.flutter.server.vmService.VmServiceWrapper; import org.dartlang.vm.service.consumer.GetObjectConsumer; import org.dartlang.vm.service.element.*; @@ -53,7 +56,7 @@ public void evaluate(@NotNull final String expression, final List libraryFiles = new ArrayList<>(); // Turn off pausing on exceptions as it is confusing to mouse over an expression // and to have that trigger pausing at an exception. - if (myDebugProcess == null || myDebugProcess.getVmServiceWrapper() == null) { + if (myDebugProcess.getVmServiceWrapper() == null) { callback.errorOccurred("Device disconnected"); return; } @@ -94,7 +97,7 @@ public void errorOccurred(@NotNull String errorMessage) { if (virtualFile != null) { psiFile = PsiManager.getInstance(project).findFile(virtualFile); if (psiFile != null && fileEditorLocation instanceof TextEditorLocation) { - TextEditorLocation textEditorLocation = (TextEditorLocation)fileEditorLocation; + final TextEditorLocation textEditorLocation = (TextEditorLocation)fileEditorLocation; element = psiFile.findElementAt(textEditor.getEditor().logicalPositionToOffset(textEditorLocation.getPosition())); } } @@ -121,7 +124,7 @@ public void errorOccurred(@NotNull String errorMessage) { wrappedCallback.errorOccurred("No running isolate."); return; } - LibraryRef libraryRef = findMatchingLibrary(isolate, libraryFiles); + final LibraryRef libraryRef = findMatchingLibrary(isolate, libraryFiles); if (dartClassName != null) { vmService.getObject(isolateId, libraryRef.getId(), new GetObjectConsumer() { @@ -132,7 +135,7 @@ public void onError(RPCError error) { @Override public void received(Obj response) { - Library library = (Library)response; + final Library library = (Library)response; for (ClassRef classRef : library.getClasses()) { if (classRef.getName().equals(dartClassName)) { vmService.evaluateInTargetContext(isolateId, classRef.getId(), expression, wrappedCallback); @@ -158,7 +161,7 @@ public void received(Sentinel response) { private LibraryRef findMatchingLibrary(Isolate isolate, List libraryFiles) { if (libraryFiles != null && !libraryFiles.isEmpty()) { - Set uris = new THashSet<>(); + final Set uris = new THashSet<>(); for (VirtualFile libraryFile : libraryFiles) { uris.addAll(myDebugProcess.getUrisForFile(libraryFile)); @@ -248,14 +251,14 @@ public static ExpressionInfo getExpressionInfo(@NotNull final PsiElement context if (reference != null) { TextRange textRange = reference.getTextRange(); // notes.text - the whole reference expression is notes.txt, but we must return only notes - int endOffset = contextElement.getTextRange().getEndOffset(); + final int endOffset = contextElement.getTextRange().getEndOffset(); if (textRange.getEndOffset() != endOffset) { textRange = new TextRange(textRange.getStartOffset(), endOffset); } return new ExpressionInfo(textRange); } - PsiElement parent = contextElement.getParent(); + final PsiElement parent = contextElement.getParent(); return parent instanceof DartId ? new ExpressionInfo(parent.getTextRange()) : null; } } diff --git a/src/io/flutter/template/DartToplevelTemplateContextType.java b/src/io/flutter/template/DartToplevelTemplateContextType.java index a05a82d139..4fa071d522 100644 --- a/src/io/flutter/template/DartToplevelTemplateContextType.java +++ b/src/io/flutter/template/DartToplevelTemplateContextType.java @@ -19,7 +19,6 @@ public DartToplevelTemplateContextType() { @Override protected boolean isInContext(@NotNull PsiElement element) { - //noinspection unchecked return PsiTreeUtil.getNonStrictParentOfType(element, DartClassDefinition.class, PsiComment.class) == null; } } diff --git a/src/io/flutter/test/DartTestEventsConverterZ.java b/src/io/flutter/test/DartTestEventsConverterZ.java index d259baf6c4..adce7f8204 100644 --- a/src/io/flutter/test/DartTestEventsConverterZ.java +++ b/src/io/flutter/test/DartTestEventsConverterZ.java @@ -1,5 +1,4 @@ -package com.jetbrains.lang.dart.ide.runner.test; - +package io.flutter.test; import com.google.gson.*; import com.intellij.execution.testframework.TestConsoleProperties; @@ -725,7 +724,7 @@ public String getUrl() { } public String toString() { - return getClass().getSimpleName() + "(" + String.valueOf(myId) + "," + String.valueOf(myName) + ")"; + return getClass().getSimpleName() + "(" + myId + "," + myName + ")"; } } @@ -781,7 +780,7 @@ public void testDone() { } protected static class Group extends Item { - private int myTestCount = 0; + private int myTestCount; private int myDoneTestsCount = 0; static Group from(JsonObject obj, Map groups, Map suites) { diff --git a/src/io/flutter/util/DartTestLocationProviderZ.java b/src/io/flutter/util/DartTestLocationProviderZ.java index 017412bf1b..06a4255a79 100644 --- a/src/io/flutter/util/DartTestLocationProviderZ.java +++ b/src/io/flutter/util/DartTestLocationProviderZ.java @@ -1,4 +1,4 @@ -package com.jetbrains.lang.dart.ide.runner.util; +package io.flutter.util; import com.google.common.annotations.VisibleForTesting; import com.google.gson.Gson; @@ -19,6 +19,7 @@ import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.PsiElementProcessor; import com.intellij.psi.util.PsiTreeUtil; +import com.jetbrains.lang.dart.ide.runner.util.TestUtil; import com.jetbrains.lang.dart.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/io/flutter/view/FlutterPerfView.java b/src/io/flutter/view/FlutterPerfView.java index 39fe5ce5fc..89b0caf520 100644 --- a/src/io/flutter/view/FlutterPerfView.java +++ b/src/io/flutter/view/FlutterPerfView.java @@ -339,6 +339,7 @@ private static class PerfViewAppState { @Nullable Content content; @Nullable Disposable disposable; JBRunnerTabs tabs; + // TODO(devoncarew): We never query flutterViewActions. ArrayList flutterViewActions = new ArrayList<>(); } } diff --git a/src/io/flutter/view/FlutterViewAction.java b/src/io/flutter/view/FlutterViewAction.java index 6fbbae7f39..be7f7822f9 100644 --- a/src/io/flutter/view/FlutterViewAction.java +++ b/src/io/flutter/view/FlutterViewAction.java @@ -30,7 +30,7 @@ abstract class FlutterViewAction extends DumbAwareAction { } @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { FlutterInitializer.sendAnalyticsAction(this); perform(e); } diff --git a/src/io/flutter/view/FlutterViewLocalToggleableAction.java b/src/io/flutter/view/FlutterViewLocalToggleableAction.java index 35d08d5416..816ed2f2c1 100644 --- a/src/io/flutter/view/FlutterViewLocalToggleableAction.java +++ b/src/io/flutter/view/FlutterViewLocalToggleableAction.java @@ -71,7 +71,7 @@ public void dispose() { } @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { this.setSelected(event, !isSelected()); final Presentation presentation = event.getPresentation(); presentation.putClientProperty("selected", isSelected()); diff --git a/src/io/flutter/view/FlutterViewToggleableAction.java b/src/io/flutter/view/FlutterViewToggleableAction.java index 7e9e24b27b..277f534243 100644 --- a/src/io/flutter/view/FlutterViewToggleableAction.java +++ b/src/io/flutter/view/FlutterViewToggleableAction.java @@ -77,7 +77,7 @@ protected void perform(AnActionEvent event) { } @Override - public void actionPerformed(AnActionEvent event) { + public void actionPerformed(@NotNull AnActionEvent event) { this.setSelected(event, !isSelected()); super.actionPerformed(event); } diff --git a/src/io/flutter/view/HighlightedTable.java b/src/io/flutter/view/HighlightedTable.java index 43095feb90..c7473cf6d5 100644 --- a/src/io/flutter/view/HighlightedTable.java +++ b/src/io/flutter/view/HighlightedTable.java @@ -27,7 +27,8 @@ public class HighlightedTable extends JBTable { public HighlightedTable(TableModel model) { super(model); - RollOverListener listener = new RollOverListener(); + + final RollOverListener listener = new RollOverListener(); addMouseMotionListener(listener); addMouseListener(listener); } @@ -69,7 +70,7 @@ public void mouseExited(MouseEvent e) { @Override public void mouseMoved(MouseEvent e) { int row = rowAtPoint(e.getPoint()); - if( row != rollOverRowIndex ) { + if (row != rollOverRowIndex) { rollOverRowIndex = row; repaint(); } diff --git a/src/io/flutter/view/InspectorMemoryTab.java b/src/io/flutter/view/InspectorMemoryTab.java index 6a1be38531..c3c61a01b0 100644 --- a/src/io/flutter/view/InspectorMemoryTab.java +++ b/src/io/flutter/view/InspectorMemoryTab.java @@ -45,26 +45,26 @@ public class InspectorMemoryTab extends JPanel implements InspectorTabPanel { // new FlutterStudioProfilersView(fsp); // add(view.getComponent(), BorderLayout.CENTER); - Class flutterStudioProfilers_class = Class.forName(CLASS_FlutterStudioProfilers); + final Class flutterStudioProfilers_class = Class.forName(CLASS_FlutterStudioProfilers); - Constructor flutterStudioProfilers_constructor = + @SuppressWarnings("unchecked") final Constructor flutterStudioProfilers_constructor = flutterStudioProfilers_class.getConstructor(Disposable.class, FlutterApp.class); - Object flutterStudioProfilers_instance = + final Object flutterStudioProfilers_instance = flutterStudioProfilers_constructor.newInstance(parentDisposable, app); - Class flutterStudioProfilersView_class = + final Class flutterStudioProfilersView_class = Class.forName(CLASS_FlutterStudioProfilersView); - Constructor flutterStudioProfilersView_constructor = + @SuppressWarnings("unchecked") final Constructor flutterStudioProfilersView_constructor = flutterStudioProfilersView_class.getConstructor(flutterStudioProfilers_class); - Object flutterStudioProfilersView_instance = + final Object flutterStudioProfilersView_instance = flutterStudioProfilersView_constructor.newInstance(flutterStudioProfilers_instance); - Class noArguments[] = new Class[]{}; - Method getComponentMethod = + final Class[] noArguments = new Class[]{ }; + @SuppressWarnings("unchecked") final Method getComponentMethod = flutterStudioProfilersView_class.getMethod("getComponent", noArguments); // call getComponent() - Component component = + @SuppressWarnings("JavaReflectionInvocation") final Component component = (Component)getComponentMethod.invoke(flutterStudioProfilersView_instance, (Object[])noArguments); final JPanel labels = new JPanel(new BorderLayout(6, 0)); diff --git a/src/io/flutter/view/InspectorPanel.java b/src/io/flutter/view/InspectorPanel.java index 579b7ffc46..b178deb46c 100644 --- a/src/io/flutter/view/InspectorPanel.java +++ b/src/io/flutter/view/InspectorPanel.java @@ -1050,7 +1050,7 @@ else if (parentTree != null) { } private void selectionChanged(TreeSelectionEvent event) { - if (visibleToUser == false) { + if (!visibleToUser) { return; } @@ -1070,7 +1070,7 @@ private void selectionChanged(TreeSelectionEvent event) { final boolean maybeReroot = isSummaryTree && subtreePanel != null && selectedDiagnostic != null && !subtreePanel.hasDiagnosticsValue(selectedDiagnostic.getValueRef()); syncSelectionHelper(maybeReroot, null); - if (maybeReroot == false) { + if (!maybeReroot) { if (isSummaryTree && subtreePanel != null) { subtreePanel.selectAndShowNode(selectedDiagnostic); } diff --git a/src/io/flutter/view/InspectorTreeUI.java b/src/io/flutter/view/InspectorTreeUI.java index 13cb0b189e..09327c71c0 100644 --- a/src/io/flutter/view/InspectorTreeUI.java +++ b/src/io/flutter/view/InspectorTreeUI.java @@ -23,7 +23,6 @@ import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Conditions; import com.intellij.openapi.util.registry.Registry; -import com.intellij.ui.Gray; import com.intellij.ui.JBColor; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.MouseEventAdapter; @@ -31,7 +30,6 @@ import icons.FlutterIcons; import io.flutter.inspector.DiagnosticsNode; import io.flutter.inspector.DiagnosticsTreeStyle; -import io.flutter.inspector.InspectorTree; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -173,15 +171,15 @@ protected void installKeyboardActions() { public void actionPerformed(ActionEvent e) { final Object source = e.getSource(); if (source instanceof JTree) { - JTree tree = (JTree)source; - int selectionRow = tree.getLeadSelectionRow(); + final JTree tree = (JTree)source; + final int selectionRow = tree.getLeadSelectionRow(); if (selectionRow != -1) { - TreePath selectionPath = tree.getPathForRow(selectionRow); + final TreePath selectionPath = tree.getPathForRow(selectionRow); if (selectionPath != null) { - boolean leaf = tree.getModel().isLeaf(selectionPath.getLastPathComponent()); + final boolean leaf = tree.getModel().isLeaf(selectionPath.getLastPathComponent()); int toSelect = -1; int toScroll = -1; - if ((!leaf && tree.isExpanded(selectionRow)) || leaf) { + if (leaf || tree.isExpanded(selectionRow)) { if (selectionRow + 1 < tree.getRowCount()) { toSelect = selectionRow + 1; toScroll = toSelect; diff --git a/testSrc/unit/io/flutter/perf/FlutterWidgetPerfTest.java b/testSrc/unit/io/flutter/perf/FlutterWidgetPerfTest.java index c9c005c7b1..185810026e 100644 --- a/testSrc/unit/io/flutter/perf/FlutterWidgetPerfTest.java +++ b/testSrc/unit/io/flutter/perf/FlutterWidgetPerfTest.java @@ -402,7 +402,7 @@ public void testFileStatsCalculation() throws InterruptedException, ExecutionExc assert clockModel != null; assert mainModel != null; - FilePerfInfo mainStats = null; + FilePerfInfo mainStats; stats = clockModel.getStatsFuture().get(); mainStats = mainModel.getStatsFuture().get(); From c31dc2b7edb75f5808350ee218636f34eee7d00c Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Sat, 6 Apr 2019 18:40:01 -0700 Subject: [PATCH 2/3] address lints in java vm service library --- .../vm/service/RemoteServiceCompleter.java | 10 +- .../vm/service/RemoteServiceRunner.java | 5 +- .../org/dartlang/vm/service/VmService.java | 94 +++++++++---------- .../dartlang/vm/service/VmServiceBase.java | 50 +++++----- .../vm/service/VmServiceListener.java | 9 +- .../consumer/AllocationProfileConsumer.java | 4 +- .../service/consumer/BreakpointConsumer.java | 4 +- .../vm/service/consumer/Consumer.java | 7 +- .../service/consumer/CpuProfileConsumer.java | 4 +- .../vm/service/consumer/EvaluateConsumer.java | 8 +- .../consumer/EvaluateInFrameConsumer.java | 8 +- .../vm/service/consumer/FlagListConsumer.java | 4 +- .../service/consumer/GetInstanceConsumer.java | 8 +- .../service/consumer/GetIsolateConsumer.java | 6 +- .../service/consumer/GetLibraryConsumer.java | 8 +- .../service/consumer/GetObjectConsumer.java | 6 +- .../vm/service/consumer/InvokeConsumer.java | 8 +- .../vm/service/consumer/ObjRefConsumer.java | 4 +- .../consumer/ReloadReportConsumer.java | 4 +- .../vm/service/consumer/ResponseConsumer.java | 4 +- .../service/consumer/ScriptListConsumer.java | 4 +- .../consumer/ServiceExtensionConsumer.java | 2 +- .../consumer/SourceReportConsumer.java | 4 +- .../vm/service/consumer/StackConsumer.java | 4 +- .../vm/service/consumer/SuccessConsumer.java | 4 +- .../vm/service/consumer/VMConsumer.java | 4 +- .../vm/service/consumer/VersionConsumer.java | 4 +- .../vm/service/element/AllocationProfile.java | 2 +- .../vm/service/element/BoundField.java | 8 +- .../vm/service/element/BoundVariable.java | 4 +- .../vm/service/element/Breakpoint.java | 4 +- .../vm/service/element/ClassHeapStats.java | 2 +- .../vm/service/element/ClassList.java | 2 +- .../dartlang/vm/service/element/ClassObj.java | 2 +- .../dartlang/vm/service/element/ClassRef.java | 2 +- .../org/dartlang/vm/service/element/Code.java | 4 +- .../dartlang/vm/service/element/CodeKind.java | 2 +- .../dartlang/vm/service/element/CodeRef.java | 4 +- .../vm/service/element/CodeRegion.java | 2 +- .../dartlang/vm/service/element/Context.java | 2 +- .../vm/service/element/ContextElement.java | 8 +- .../vm/service/element/ContextRef.java | 2 +- .../vm/service/element/CpuProfile.java | 2 +- .../dartlang/vm/service/element/Element.java | 9 +- .../vm/service/element/ErrorKind.java | 4 +- .../dartlang/vm/service/element/ErrorObj.java | 4 +- .../dartlang/vm/service/element/ErrorRef.java | 4 +- .../dartlang/vm/service/element/Event.java | 4 +- .../vm/service/element/EventKind.java | 2 +- .../service/element/ExceptionPauseMode.java | 2 +- .../vm/service/element/ExtensionData.java | 2 +- .../dartlang/vm/service/element/Field.java | 2 +- .../dartlang/vm/service/element/FieldRef.java | 2 +- .../org/dartlang/vm/service/element/Flag.java | 2 +- .../dartlang/vm/service/element/FlagList.java | 2 +- .../dartlang/vm/service/element/Frame.java | 4 +- .../vm/service/element/FrameKind.java | 2 +- .../org/dartlang/vm/service/element/Func.java | 4 +- .../dartlang/vm/service/element/FuncRef.java | 4 +- .../vm/service/element/HeapSpace.java | 2 +- .../dartlang/vm/service/element/Instance.java | 6 +- .../vm/service/element/InstanceKind.java | 2 +- .../vm/service/element/InstanceRef.java | 6 +- .../dartlang/vm/service/element/Isolate.java | 4 +- .../vm/service/element/IsolateRef.java | 2 +- .../dartlang/vm/service/element/Library.java | 2 +- .../vm/service/element/LibraryDependency.java | 2 +- .../vm/service/element/LibraryRef.java | 2 +- .../vm/service/element/MapAssociation.java | 14 +-- .../dartlang/vm/service/element/Message.java | 2 +- .../org/dartlang/vm/service/element/Null.java | 2 +- .../dartlang/vm/service/element/NullRef.java | 2 +- .../org/dartlang/vm/service/element/Obj.java | 2 +- .../dartlang/vm/service/element/ObjRef.java | 2 +- .../vm/service/element/ProfileFunction.java | 2 +- .../dartlang/vm/service/element/RPCError.java | 13 ++- .../vm/service/element/ReloadReport.java | 2 +- .../dartlang/vm/service/element/Response.java | 2 +- .../dartlang/vm/service/element/Script.java | 2 +- .../vm/service/element/ScriptList.java | 2 +- .../vm/service/element/ScriptRef.java | 2 +- .../dartlang/vm/service/element/Sentinel.java | 4 +- .../vm/service/element/SentinelKind.java | 2 +- .../vm/service/element/SourceLocation.java | 2 +- .../vm/service/element/SourceReport.java | 2 +- .../service/element/SourceReportCoverage.java | 2 +- .../vm/service/element/SourceReportKind.java | 2 +- .../vm/service/element/SourceReportRange.java | 2 +- .../dartlang/vm/service/element/Stack.java | 2 +- .../vm/service/element/StepOption.java | 2 +- .../dartlang/vm/service/element/Success.java | 2 +- .../vm/service/element/TimelineEvent.java | 2 +- .../vm/service/element/TypeArguments.java | 2 +- .../vm/service/element/TypeArgumentsRef.java | 2 +- .../element/UnresolvedSourceLocation.java | 2 +- .../org/dartlang/vm/service/element/VM.java | 2 +- .../dartlang/vm/service/element/VMRef.java | 2 +- .../dartlang/vm/service/element/Version.java | 2 +- .../service/internal/BlockingRequestSink.java | 2 +- .../vm/service/internal/ErrorRequestSink.java | 7 +- .../vm/service/internal/RequestSink.java | 8 +- .../vm/service/internal/ResponseSink.java | 8 +- .../vm/service/internal/VmServiceConst.java | 38 ++++---- .../internal/WebSocketRequestSink.java | 10 +- .../dartlang/vm/service/logging/Logger.java | 30 +++--- .../dartlang/vm/service/logging/Logging.java | 6 +- 106 files changed, 302 insertions(+), 306 deletions(-) diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceCompleter.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceCompleter.java index 57c4373659..48ae3eae99 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceCompleter.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceCompleter.java @@ -18,15 +18,17 @@ public interface RemoteServiceCompleter { /** * Should be called when a service request completes successfully. + * * @param result the result of the request */ - public void result(JsonObject result); + void result(JsonObject result); /** * Should be called when a service request completes with an error. - * @param code the error code generated by the request + * + * @param code the error code generated by the request * @param message the description of the error - * @param data [optional] the description of the error + * @param data [optional] the description of the error */ - public void error(int code, String message, JsonObject data); + void error(int code, String message, JsonObject data); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceRunner.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceRunner.java index 71701cbb40..cc42969d46 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceRunner.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/RemoteServiceRunner.java @@ -21,8 +21,9 @@ public interface RemoteServiceRunner { /** * Called when a service request has been received. - * @param params the parameters of the request + * + * @param params the parameters of the request * @param completer the completer to invoke at the end of the execution */ - public void run(JsonObject params, RemoteServiceCompleter completer); + void run(JsonObject params, RemoteServiceCompleter completer); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmService.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmService.java index e2cb277234..a9906cfe81 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmService.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmService.java @@ -48,7 +48,7 @@ * More specifically, you should not make any calls to {@link VmService} * from within any {@link Consumer} method. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class VmService extends VmServiceBase { public static final String DEBUG_STREAM_ID = "Debug"; @@ -83,7 +83,7 @@ public class VmService extends VmServiceBase { * The [addBreakpoint] RPC is used to add a breakpoint at a specific line of some script. */ public void addBreakpoint(String isolateId, String scriptId, int line, BreakpointConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("scriptId", scriptId); params.addProperty("line", line); @@ -95,7 +95,7 @@ public void addBreakpoint(String isolateId, String scriptId, int line, Breakpoin * @param column This parameter is optional and may be null. */ public void addBreakpoint(String isolateId, String scriptId, int line, Integer column, BreakpointConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("scriptId", scriptId); params.addProperty("line", line); @@ -107,7 +107,7 @@ public void addBreakpoint(String isolateId, String scriptId, int line, Integer c * The [addBreakpointAtEntry] RPC is used to add a breakpoint at the entrypoint of some function. */ public void addBreakpointAtEntry(String isolateId, String functionId, BreakpointConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("functionId", functionId); request("addBreakpointAtEntry", params, consumer); @@ -119,7 +119,7 @@ public void addBreakpointAtEntry(String isolateId, String functionId, Breakpoint * deferred library which has not yet been loaded. */ public void addBreakpointWithScriptUri(String isolateId, String scriptUri, int line, BreakpointConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("scriptUri", scriptUri); params.addProperty("line", line); @@ -133,7 +133,7 @@ public void addBreakpointWithScriptUri(String isolateId, String scriptUri, int l * @param column This parameter is optional and may be null. */ public void addBreakpointWithScriptUri(String isolateId, String scriptUri, int line, Integer column, BreakpointConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("scriptUri", scriptUri); params.addProperty("line", line); @@ -145,7 +145,7 @@ public void addBreakpointWithScriptUri(String isolateId, String scriptUri, int l * @undocumented */ public void clearCpuProfile(String isolateId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("_clearCpuProfile", params, consumer); } @@ -154,7 +154,7 @@ public void clearCpuProfile(String isolateId, SuccessConsumer consumer) { * @undocumented */ public void clearVMTimeline(SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); request("_clearVMTimeline", params, consumer); } @@ -164,7 +164,7 @@ public void clearVMTimeline(SuccessConsumer consumer) { * @undocumented */ public void collectAllGarbage(String isolateId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("_collectAllGarbage", params, consumer); } @@ -173,7 +173,7 @@ public void collectAllGarbage(String isolateId, SuccessConsumer consumer) { * The [evaluate] RPC is used to evaluate an expression in the context of some target. */ public void evaluate(String isolateId, String targetId, String expression, EvaluateConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("targetId", targetId); params.addProperty("expression", expression); @@ -186,7 +186,7 @@ public void evaluate(String isolateId, String targetId, String expression, Evalu * @param disableBreakpoints This parameter is optional and may be null. */ public void evaluate(String isolateId, String targetId, String expression, Map scope, Boolean disableBreakpoints, EvaluateConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("targetId", targetId); params.addProperty("expression", expression); @@ -201,7 +201,7 @@ public void evaluate(String isolateId, String targetId, String expression, Map scope, Boolean disableBreakpoints, EvaluateInFrameConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("frameIndex", frameIndex); params.addProperty("expression", expression); @@ -231,7 +231,7 @@ public void evaluateInFrame(String isolateId, int frameIndex, String expression, * @undocumented */ public void getAllocationProfile(String isolateId, AllocationProfileConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("_getAllocationProfile", params, consumer); } @@ -245,7 +245,7 @@ public void getAllocationProfile(String isolateId, AllocationProfileConsumer con * @param reset This parameter is optional and may be null. */ public void getAllocationProfile(String isolateId, String gc, Boolean reset, AllocationProfileConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); if (gc != null) params.addProperty("gc", gc); if (reset != null) params.addProperty("reset", reset); @@ -258,7 +258,7 @@ public void getAllocationProfile(String isolateId, String gc, Boolean reset, All * @undocumented */ public void getCpuProfile(String isolateId, String tags, CpuProfileConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("tags", tags); request("_getCpuProfile", params, consumer); @@ -269,7 +269,7 @@ public void getCpuProfile(String isolateId, String tags, CpuProfileConsumer cons * current values. */ public void getFlagList(FlagListConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); request("getFlagList", params, consumer); } @@ -279,7 +279,7 @@ public void getFlagList(FlagListConsumer consumer) { * @undocumented */ public void getInstances(String isolateId, String classId, int limit, ObjRefConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("classId", classId); params.addProperty("limit", limit); @@ -290,7 +290,7 @@ public void getInstances(String isolateId, String classId, int limit, ObjRefCons * The [getIsolate] RPC is used to lookup an [Isolate] object by its [id]. */ public void getIsolate(String isolateId, GetIsolateConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("getIsolate", params, consumer); } @@ -299,7 +299,7 @@ public void getIsolate(String isolateId, GetIsolateConsumer consumer) { * The [getObject] RPC is used to lookup an [object] from some isolate by its [id]. */ public void getObject(String isolateId, String objectId, GetObjectConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("objectId", objectId); request("getObject", params, consumer); @@ -311,7 +311,7 @@ public void getObject(String isolateId, String objectId, GetObjectConsumer consu * @param count This parameter is optional and may be null. */ public void getObject(String isolateId, String objectId, Integer offset, Integer count, GetObjectConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("objectId", objectId); if (offset != null) params.addProperty("offset", offset); @@ -324,7 +324,7 @@ public void getObject(String isolateId, String objectId, Integer offset, Integer * based on the isolate's [isolateId]. */ public void getScripts(String isolateId, ScriptListConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("getScripts", params, consumer); } @@ -334,7 +334,7 @@ public void getScripts(String isolateId, ScriptListConsumer consumer) { * isolate. */ public void getSourceReport(String isolateId, List reports, SourceReportConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.add("reports", convertIterableToJsonArray(reports)); request("getSourceReport", params, consumer); @@ -349,7 +349,7 @@ public void getSourceReport(String isolateId, List reports, So * @param forceCompile This parameter is optional and may be null. */ public void getSourceReport(String isolateId, List reports, String scriptId, Integer tokenPos, Integer endTokenPos, Boolean forceCompile, SourceReportConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.add("reports", convertIterableToJsonArray(reports)); if (scriptId != null) params.addProperty("scriptId", scriptId); @@ -364,7 +364,7 @@ public void getSourceReport(String isolateId, List reports, St * isolate. The isolate does not need to be paused. */ public void getStack(String isolateId, StackConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("getStack", params, consumer); } @@ -373,7 +373,7 @@ public void getStack(String isolateId, StackConsumer consumer) { * The [getVM] RPC returns global information about a Dart virtual machine. */ public void getVM(VMConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); request("getVM", params, consumer); } @@ -381,7 +381,7 @@ public void getVM(VMConsumer consumer) { * @undocumented */ public void getVMTimeline(ResponseConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); request("_getVMTimeline", params, consumer); } @@ -390,7 +390,7 @@ public void getVMTimeline(ResponseConsumer consumer) { * VM. */ public void getVersion(VersionConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); request("getVersion", params, consumer); } @@ -401,7 +401,7 @@ public void getVersion(VersionConsumer consumer) { * @param disableBreakpoints This parameter is optional and may be null. */ public void invoke(String isolateId, String targetId, String selector, List argumentIds, Boolean disableBreakpoints, InvokeConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("targetId", targetId); params.addProperty("selector", selector); @@ -416,7 +416,7 @@ public void invoke(String isolateId, String targetId, String selector, List argumentIds, InvokeConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("targetId", targetId); params.addProperty("selector", selector); @@ -429,7 +429,7 @@ public void invoke(String isolateId, String targetId, String selector, ListIsolate.kill(IMMEDIATE)Isolate.kill(IMMEDIATE). */ public void kill(String isolateId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("kill", params, consumer); } @@ -439,7 +439,7 @@ public void kill(String isolateId, SuccessConsumer consumer) { * and potentially returns before the isolate is paused. */ public void pause(String isolateId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("pause", params, consumer); } @@ -448,7 +448,7 @@ public void pause(String isolateId, SuccessConsumer consumer) { * @undocumented */ public void registerService(String service, String alias, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("service", service); params.addProperty("alias", alias); request("_registerService", params, consumer); @@ -462,7 +462,7 @@ public void registerService(String service, String alias, SuccessConsumer consum * @param packagesUri This parameter is optional and may be null. */ public void reloadSources(String isolateId, Boolean force, Boolean pause, String rootLibUri, String packagesUri, ReloadReportConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); if (force != null) params.addProperty("force", force); if (pause != null) params.addProperty("pause", pause); @@ -475,7 +475,7 @@ public void reloadSources(String isolateId, Boolean force, Boolean pause, String * The [reloadSources] RPC is used to perform a hot reload of an Isolate's sources. */ public void reloadSources(String isolateId, ReloadReportConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("reloadSources", params, consumer); } @@ -484,7 +484,7 @@ public void reloadSources(String isolateId, ReloadReportConsumer consumer) { * The [removeBreakpoint] RPC is used to remove a breakpoint by its [id]. */ public void removeBreakpoint(String isolateId, String breakpointId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("breakpointId", breakpointId); request("removeBreakpoint", params, consumer); @@ -496,7 +496,7 @@ public void removeBreakpoint(String isolateId, String breakpointId, SuccessConsu * @undocumented */ public void requestHeapSnapshot(String isolateId, String roots, boolean collectGarbage, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("roots", roots); params.addProperty("collectGarbage", collectGarbage); @@ -510,7 +510,7 @@ public void requestHeapSnapshot(String isolateId, String roots, boolean collectG * @param frameIndex This parameter is optional and may be null. */ public void resume(String isolateId, StepOption step, Integer frameIndex, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); if (step != null) params.addProperty("step", step.name()); if (frameIndex != null) params.addProperty("frameIndex", frameIndex); @@ -521,7 +521,7 @@ public void resume(String isolateId, StepOption step, Integer frameIndex, Succes * The [resume] RPC is used to resume execution of a paused isolate. */ public void resume(String isolateId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); request("resume", params, consumer); } @@ -533,7 +533,7 @@ public void resume(String isolateId, SuccessConsumer consumer) { * thrown. */ public void setExceptionPauseMode(String isolateId, ExceptionPauseMode mode, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("mode", mode.name()); request("setExceptionPauseMode", params, consumer); @@ -544,7 +544,7 @@ public void setExceptionPauseMode(String isolateId, ExceptionPauseMode mode, Suc * not exist, the flag may not be set at runtime, or the value is of the wrong type for the flag. */ public void setFlag(String name, String value, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("name", name); params.addProperty("value", value); request("setFlag", params, consumer); @@ -555,7 +555,7 @@ public void setFlag(String name, String value, SuccessConsumer consumer) { * work for a given library. */ public void setLibraryDebuggable(String isolateId, String libraryId, boolean isDebuggable, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("libraryId", libraryId); params.addProperty("isDebuggable", isDebuggable); @@ -566,7 +566,7 @@ public void setLibraryDebuggable(String isolateId, String libraryId, boolean isD * The [setName] RPC is used to change the debugging name for an isolate. */ public void setName(String isolateId, String name, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("isolateId", isolateId); params.addProperty("name", name); request("setName", params, consumer); @@ -576,7 +576,7 @@ public void setName(String isolateId, String name, SuccessConsumer consumer) { * The [setVMName] RPC is used to change the debugging name for the vm. */ public void setVMName(String name, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("name", name); request("setVMName", params, consumer); } @@ -585,7 +585,7 @@ public void setVMName(String name, SuccessConsumer consumer) { * @undocumented */ public void setVMTimelineFlags(List recordedStreams, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.add("recordedStreams", convertIterableToJsonArray(recordedStreams)); request("_setVMTimelineFlags", params, consumer); } @@ -594,7 +594,7 @@ public void setVMTimelineFlags(List recordedStreams, SuccessConsumer con * The [streamCancel] RPC cancels a stream subscription in the VM. */ public void streamCancel(String streamId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("streamId", streamId); request("streamCancel", params, consumer); } @@ -604,7 +604,7 @@ public void streamCancel(String streamId, SuccessConsumer consumer) { * begin receiving events from the stream. */ public void streamListen(String streamId, SuccessConsumer consumer) { - JsonObject params = new JsonObject(); + final JsonObject params = new JsonObject(); params.addProperty("streamId", streamId); request("streamListen", params, consumer); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceBase.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceBase.java index c3acf4fddb..14846538a2 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceBase.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceBase.java @@ -43,12 +43,14 @@ */ @SuppressWarnings({"unused", "WeakerAccess"}) abstract class VmServiceBase implements VmServiceConst { + /** * Connect to the VM observatory service via the specified URI * * @return an API object for interacting with the VM service (not {@code null}). */ public static VmService connect(final String url) throws IOException { + // Validate URL URI uri; try { @@ -84,8 +86,7 @@ public void onMessage(WebSocketMessage message) { Logging.getLogger().logInformation("VM message: " + message.getText()); try { vmService.processMessage(message.getText()); - } - catch (Exception e) { + } catch (Exception e) { Logging.getLogger().logError(e.getMessage(), e); } } @@ -168,10 +169,7 @@ public void received(Version response) { * Connect to the VM observatory service on the given local port. * * @return an API object for interacting with the VM service (not {@code null}). - * - * @deprecated prefer the Url based constructor {@link VmServiceBase#connect} */ - @Deprecated public static VmService localConnect(int port) throws IOException { return connect("ws://localhost:" + port + "/ws"); } @@ -300,7 +298,7 @@ public void received(Sentinel response) { /** * Invoke a specific service protocol extension method. - * + *

* See https://api.dartlang.org/stable/dart-developer/dart-developer-library.html. */ public void callServiceExtension(String isolateId, String method, ServiceExtensionConsumer consumer) { @@ -311,7 +309,7 @@ public void callServiceExtension(String isolateId, String method, ServiceExtensi /** * Invoke a specific service protocol extension method. - * + *

* See https://api.dartlang.org/stable/dart-developer/dart-developer-library.html. */ public void callServiceExtension(String isolateId, String method, JsonObject params, ServiceExtensionConsumer consumer) { @@ -343,7 +341,7 @@ protected void request(String method, JsonObject params, Consumer consumer) { } public void connectionOpened() { - for (VmServiceListener listener : new ArrayList<>(vmListeners)) { + for (VmServiceListener listener : vmListeners) { try { listener.connectionOpened(); } catch (Exception e) { @@ -353,7 +351,7 @@ public void connectionOpened() { } private void forwardEvent(String streamId, Event event) { - for (VmServiceListener listener : new ArrayList<>(vmListeners)) { + for (VmServiceListener listener : vmListeners) { try { listener.received(streamId, event); } catch (Exception e) { @@ -363,7 +361,7 @@ private void forwardEvent(String streamId, Event event) { } public void connectionClosed() { - for (VmServiceListener listener : new ArrayList<>(vmListeners)) { + for (VmServiceListener listener : vmListeners) { try { listener.connectionClosed(); } catch (Exception e) { @@ -424,7 +422,7 @@ void processMessage(String jsonText) { } else if (json.has("result") || json.has("error")) { processResponse(json); } else { - Logging.getLogger().logError("Malformed message"); + Logging.getLogger().logError("Malformed message"); } } @@ -491,21 +489,21 @@ void processRequest(JsonObject json) { final RemoteServiceRunner runner = remoteServiceRunners.get(method); try { runner.run(params, new RemoteServiceCompleter() { - public void result(JsonObject result) { - response.add(RESULT, result); - requestSink.add(response); - } + public void result(JsonObject result) { + response.add(RESULT, result); + requestSink.add(response); + } - public void error(int code, String message, JsonObject data) { - final JsonObject error = new JsonObject(); - error.addProperty(CODE, code); - error.addProperty(MESSAGE, message); - if (data != null) { - error.add(DATA, data); - } - response.add(ERROR, error); - requestSink.add(response); + public void error(int code, String message, JsonObject data) { + final JsonObject error = new JsonObject(); + error.addProperty(CODE, code); + error.addProperty(MESSAGE, message); + if (data != null) { + error.add(DATA, data); } + response.add(ERROR, error); + requestSink.add(response); + } }); } catch (Exception e) { final String message = "Internal Server Error"; @@ -519,7 +517,7 @@ public void error(int code, String message, JsonObject data) { } private static final RemoteServiceCompleter ignoreCallback = - new RemoteServiceCompleter() { + new RemoteServiceCompleter() { public void result(JsonObject result) { // ignore } @@ -527,7 +525,7 @@ public void result(JsonObject result) { public void error(int code, String message, JsonObject data) { // ignore } - }; + }; void processNotification(JsonObject json) { String method; diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceListener.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceListener.java index 50da1405f0..7e59bea964 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceListener.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/VmServiceListener.java @@ -19,14 +19,15 @@ * Interface used by {@link VmService} to notify others of VM events. */ public interface VmServiceListener { - public void connectionOpened(); + void connectionOpened(); /** * Called when a VM event has been received. + * * @param streamId the stream identifier (e.g. {@link VmService#DEBUG_STREAM_ID} - * @param event the event + * @param event the event */ - public void received(String streamId, Event event); + void received(String streamId, Event event); - public void connectionClosed(); + void connectionClosed(); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/AllocationProfileConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/AllocationProfileConsumer.java index 22a404cacc..d3bbc7a551 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/AllocationProfileConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/AllocationProfileConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.AllocationProfile; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface AllocationProfileConsumer extends Consumer { - public void received(AllocationProfile response); + void received(AllocationProfile response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/BreakpointConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/BreakpointConsumer.java index 1509481c94..7fdc2ddbc3 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/BreakpointConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/BreakpointConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.Breakpoint; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface BreakpointConsumer extends Consumer { - public void received(Breakpoint response); + void received(Breakpoint response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/Consumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/Consumer.java index ebf0672682..3175d25274 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/Consumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/Consumer.java @@ -1,11 +1,11 @@ /* * Copyright (c) 2015, the Dart project authors. - * + * * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at - * + * * http://www.eclipse.org/legal/epl-v10.html - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under @@ -19,7 +19,6 @@ * Consumer is a common interface for all consumer interfaces. */ public interface Consumer { - /** * Called if the request failed for some reason. */ diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/CpuProfileConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/CpuProfileConsumer.java index db04f2b18b..25878b1009 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/CpuProfileConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/CpuProfileConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.CpuProfile; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface CpuProfileConsumer extends Consumer { - public void received(CpuProfile response); + void received(CpuProfile response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateConsumer.java index 022329551d..e256aab5ad 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateConsumer.java @@ -19,12 +19,12 @@ import org.dartlang.vm.service.element.InstanceRef; import org.dartlang.vm.service.element.Sentinel; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface EvaluateConsumer extends Consumer { - public void received(ErrorRef response); + void received(ErrorRef response); - public void received(InstanceRef response); + void received(InstanceRef response); - public void received(Sentinel response); + void received(Sentinel response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateInFrameConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateInFrameConsumer.java index cd8f4e2c8f..21ac3e7ab4 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateInFrameConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/EvaluateInFrameConsumer.java @@ -19,12 +19,12 @@ import org.dartlang.vm.service.element.InstanceRef; import org.dartlang.vm.service.element.Sentinel; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface EvaluateInFrameConsumer extends Consumer { - public void received(ErrorRef response); + void received(ErrorRef response); - public void received(InstanceRef response); + void received(InstanceRef response); - public void received(Sentinel response); + void received(Sentinel response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/FlagListConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/FlagListConsumer.java index 4f9e04443a..b885561a95 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/FlagListConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/FlagListConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.FlagList; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface FlagListConsumer extends Consumer { - public void received(FlagList response); + void received(FlagList response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetInstanceConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetInstanceConsumer.java index efef32259c..ae6658cd90 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetInstanceConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetInstanceConsumer.java @@ -1,11 +1,11 @@ /* * Copyright (c) 2015, the Dart project authors. - * + * * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at - * + * * http://www.eclipse.org/legal/epl-v10.html - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under @@ -16,5 +16,5 @@ import org.dartlang.vm.service.element.Instance; public interface GetInstanceConsumer extends Consumer { - public void received(Instance response); + void received(Instance response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetIsolateConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetIsolateConsumer.java index a018fb47a6..767aab5876 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetIsolateConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetIsolateConsumer.java @@ -18,10 +18,10 @@ import org.dartlang.vm.service.element.Isolate; import org.dartlang.vm.service.element.Sentinel; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface GetIsolateConsumer extends Consumer { - public void received(Isolate response); + void received(Isolate response); - public void received(Sentinel response); + void received(Sentinel response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetLibraryConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetLibraryConsumer.java index bd15d5cc5c..5d61e604d3 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetLibraryConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetLibraryConsumer.java @@ -1,11 +1,11 @@ /* * Copyright (c) 2015, the Dart project authors. - * + * * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at - * + * * http://www.eclipse.org/legal/epl-v10.html - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under @@ -16,5 +16,5 @@ import org.dartlang.vm.service.element.Library; public interface GetLibraryConsumer extends Consumer { - public void received(Library response); + void received(Library response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetObjectConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetObjectConsumer.java index b0f0ecb3a8..1f7b17c01d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetObjectConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/GetObjectConsumer.java @@ -18,10 +18,10 @@ import org.dartlang.vm.service.element.Obj; import org.dartlang.vm.service.element.Sentinel; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface GetObjectConsumer extends Consumer { - public void received(Obj response); + void received(Obj response); - public void received(Sentinel response); + void received(Sentinel response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/InvokeConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/InvokeConsumer.java index c2df74033c..b542ea6502 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/InvokeConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/InvokeConsumer.java @@ -19,12 +19,12 @@ import org.dartlang.vm.service.element.InstanceRef; import org.dartlang.vm.service.element.Sentinel; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface InvokeConsumer extends Consumer { - public void received(ErrorRef response); + void received(ErrorRef response); - public void received(InstanceRef response); + void received(InstanceRef response); - public void received(Sentinel response); + void received(Sentinel response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ObjRefConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ObjRefConsumer.java index 76957c4719..848684e949 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ObjRefConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ObjRefConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.ObjRef; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface ObjRefConsumer extends Consumer { - public void received(ObjRef response); + void received(ObjRef response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ReloadReportConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ReloadReportConsumer.java index 67b921f938..ca1c31952e 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ReloadReportConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ReloadReportConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.ReloadReport; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface ReloadReportConsumer extends Consumer { - public void received(ReloadReport response); + void received(ReloadReport response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ResponseConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ResponseConsumer.java index ed46bd2e81..f9d8b3363d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ResponseConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ResponseConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.Response; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface ResponseConsumer extends Consumer { - public void received(Response response); + void received(Response response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ScriptListConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ScriptListConsumer.java index 9db2d4896b..0a5fb29200 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ScriptListConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ScriptListConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.ScriptList; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface ScriptListConsumer extends Consumer { - public void received(ScriptList response); + void received(ScriptList response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ServiceExtensionConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ServiceExtensionConsumer.java index 180d13d476..71b676d45d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ServiceExtensionConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/ServiceExtensionConsumer.java @@ -16,5 +16,5 @@ import com.google.gson.JsonObject; public interface ServiceExtensionConsumer extends Consumer { - public void received(JsonObject result); + void received(JsonObject result); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SourceReportConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SourceReportConsumer.java index 4abfedc5b3..0a9fd1f2d3 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SourceReportConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SourceReportConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.SourceReport; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface SourceReportConsumer extends Consumer { - public void received(SourceReport response); + void received(SourceReport response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/StackConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/StackConsumer.java index 30526212aa..d82bd0e770 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/StackConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/StackConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.Stack; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface StackConsumer extends Consumer { - public void received(Stack response); + void received(Stack response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SuccessConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SuccessConsumer.java index cbcf5247e9..e9e8b88bf4 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SuccessConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/SuccessConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.Success; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface SuccessConsumer extends Consumer { - public void received(Success response); + void received(Success response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VMConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VMConsumer.java index 1a853861f9..48a96b865e 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VMConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VMConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.VM; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface VMConsumer extends Consumer { - public void received(VM response); + void received(VM response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VersionConsumer.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VersionConsumer.java index 010ffee7e7..91a7fd9ecf 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VersionConsumer.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/consumer/VersionConsumer.java @@ -17,8 +17,8 @@ import org.dartlang.vm.service.element.Version; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public interface VersionConsumer extends Consumer { - public void received(Version response); + void received(Version response); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/AllocationProfile.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/AllocationProfile.java index 5437fcb30d..eebff720fb 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/AllocationProfile.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/AllocationProfile.java @@ -18,7 +18,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class AllocationProfile extends Response { public AllocationProfile(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundField.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundField.java index 8699da53c6..696cb6cfbc 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundField.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundField.java @@ -21,7 +21,7 @@ /** * A {@link BoundField} represents a field bound to a particular value in an {@link Instance}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class BoundField extends Element { public BoundField(JsonObject json) { @@ -36,10 +36,10 @@ public FieldRef getDecl() { * @return one of InstanceRef or Sentinel */ public InstanceRef getValue() { - JsonElement elem = json.get("value"); + final JsonElement elem = json.get("value"); if (!elem.isJsonObject()) return null; - JsonObject child = elem.getAsJsonObject(); - String type = child.get("type").getAsString(); + final JsonObject child = elem.getAsJsonObject(); + final String type = child.get("type").getAsString(); if ("Sentinel".equals(type)) return null; return new InstanceRef(child); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundVariable.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundVariable.java index 88b481a247..dedb8e116c 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundVariable.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/BoundVariable.java @@ -21,7 +21,7 @@ * A {@link BoundVariable} represents a local variable bound to a particular value in a {@link * Frame}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class BoundVariable extends Response { public BoundVariable(JsonObject json) { @@ -58,7 +58,7 @@ public int getScopeStartTokenPos() { * Sentinel */ public Object getValue() { - JsonObject elem = (JsonObject)json.get("value"); + final JsonObject elem = (JsonObject)json.get("value"); if (elem == null) return null; if (elem.get("type").getAsString().equals("@Instance")) return new InstanceRef(elem); diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Breakpoint.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Breakpoint.java index 2ecebc87fc..bd0c9f5f6c 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Breakpoint.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Breakpoint.java @@ -20,7 +20,7 @@ /** * A {@link Breakpoint} describes a debugger breakpoint. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Breakpoint extends Obj { public Breakpoint(JsonObject json) { @@ -51,7 +51,7 @@ public boolean getIsSyntheticAsyncContinuation() { * @return one of SourceLocation or UnresolvedSourceLocation */ public Object getLocation() { - JsonObject elem = (JsonObject)json.get("location"); + final JsonObject elem = (JsonObject)json.get("location"); if (elem == null) return null; if (elem.get("type").getAsString().equals("SourceLocation")) return new SourceLocation(elem); diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassHeapStats.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassHeapStats.java index f7d7b8ba7b..80d096c776 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassHeapStats.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassHeapStats.java @@ -18,7 +18,7 @@ import com.google.gson.JsonObject; import java.util.List; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ClassHeapStats extends Response { public ClassHeapStats(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassList.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassList.java index 5f1f854fea..85e87028ab 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassList.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassList.java @@ -18,7 +18,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ClassList extends Response { public ClassList(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassObj.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassObj.java index 9014f64831..06b7e34ee8 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassObj.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassObj.java @@ -21,7 +21,7 @@ /** * A {@link ClassObj} provides information about a Dart language class. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ClassObj extends Obj { public ClassObj(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassRef.java index f9d5887d58..c2f2cda26d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ClassRef.java @@ -20,7 +20,7 @@ /** * {@link ClassRef} is a reference to a {@link ClassObj}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ClassRef extends ObjRef { public ClassRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Code.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Code.java index 9fd17fd6aa..56a634986c 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Code.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Code.java @@ -21,7 +21,7 @@ /** * A {@link Code} object represents compiled code in the Dart VM. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Code extends ObjRef { public Code(JsonObject json) { @@ -32,7 +32,7 @@ public Code(JsonObject json) { * What kind of code object is this? */ public CodeKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? CodeKind.Unknown : CodeKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeKind.java index 37c9b7ad03..35324616b8 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeKind.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeKind.java @@ -15,7 +15,7 @@ // This is a generated file. -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum CodeKind { Collected, diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRef.java index ca4f38d1e6..590d891166 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRef.java @@ -21,7 +21,7 @@ /** * {@link CodeRef} is a reference to a {@link Code} object. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class CodeRef extends ObjRef { public CodeRef(JsonObject json) { @@ -32,7 +32,7 @@ public CodeRef(JsonObject json) { * What kind of code object is this? */ public CodeKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? CodeKind.Unknown : CodeKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRegion.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRegion.java index 869e4cd16b..1fbe3e1a75 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRegion.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CodeRegion.java @@ -17,7 +17,7 @@ import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class CodeRegion extends Element { public CodeRegion(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Context.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Context.java index b90f770842..fcd31490dc 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Context.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Context.java @@ -21,7 +21,7 @@ /** * A {@link Context} is a data structure which holds the captured variables for some closure. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Context extends Obj { public Context(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextElement.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextElement.java index 150cbb2181..0ff560912c 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextElement.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextElement.java @@ -18,7 +18,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ContextElement extends Element { public ContextElement(JsonObject json) { @@ -29,10 +29,10 @@ public ContextElement(JsonObject json) { * @return one of InstanceRef or Sentinel */ public InstanceRef getValue() { - JsonElement elem = json.get("value"); + final JsonElement elem = json.get("value"); if (!elem.isJsonObject()) return null; - JsonObject child = elem.getAsJsonObject(); - String type = child.get("type").getAsString(); + final JsonObject child = elem.getAsJsonObject(); + final String type = child.get("type").getAsString(); if ("Sentinel".equals(type)) return null; return new InstanceRef(child); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextRef.java index e49896c9e1..9b66e407af 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ContextRef.java @@ -17,7 +17,7 @@ import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ContextRef extends ObjRef { public ContextRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CpuProfile.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CpuProfile.java index ed9674b3fb..50785b786c 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CpuProfile.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/CpuProfile.java @@ -19,7 +19,7 @@ import com.google.gson.JsonObject; import java.util.List; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class CpuProfile extends Response { public CpuProfile(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Element.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Element.java index fa73a67e22..2319998c5f 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Element.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Element.java @@ -10,8 +10,7 @@ * Superclass for all observatory elements. */ public class Element { - - protected JsonObject json; + protected final JsonObject json; public Element(JsonObject json) { this.json = json; @@ -47,7 +46,7 @@ List> getListListInt(String memberName) { return null; } int size = array.size(); - List> result = new ArrayList>(); + List> result = new ArrayList<>(); for (int index = 0; index < size; ++index) { result.add(jsonArrayToListInt(array.get(index).getAsJsonArray())); } @@ -56,7 +55,7 @@ List> getListListInt(String memberName) { private List jsonArrayToListInt(JsonArray array) { int size = array.size(); - List result = new ArrayList(); + List result = new ArrayList<>(); for (int index = 0; index < size; ++index) { result.add(array.get(index).getAsInt()); } @@ -65,7 +64,7 @@ private List jsonArrayToListInt(JsonArray array) { private List jsonArrayToListString(JsonArray array) { int size = array.size(); - List result = new ArrayList(); + List result = new ArrayList<>(); for (int index = 0; index < size; ++index) { result.add(array.get(index).getAsString()); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorKind.java index 746229cb31..ffdc440774 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorKind.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorKind.java @@ -15,11 +15,11 @@ // This is a generated file. -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum ErrorKind { /** - * The isolate has encounted an internal error. These errors should be reported as bugs. + * The isolate has encountered an internal error. These errors should be reported as bugs. */ InternalError, diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorObj.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorObj.java index 581265edba..c22b7939c7 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorObj.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorObj.java @@ -21,7 +21,7 @@ /** * An {@link ErrorObj} represents a Dart language level error. This is distinct from an rpc error. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ErrorObj extends Obj { public ErrorObj(JsonObject json) { @@ -41,7 +41,7 @@ public InstanceRef getException() { * What kind of error is this? */ public ErrorKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? ErrorKind.Unknown : ErrorKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorRef.java index d5b30feaa2..5506847777 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ErrorRef.java @@ -21,7 +21,7 @@ /** * {@link ErrorRef} is a reference to an {@link ErrorObj}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ErrorRef extends ObjRef { public ErrorRef(JsonObject json) { @@ -32,7 +32,7 @@ public ErrorRef(JsonObject json) { * What kind of error is this? */ public ErrorKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? ErrorKind.Unknown : ErrorKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Event.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Event.java index 06e83dab04..b606b87ad3 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Event.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Event.java @@ -23,7 +23,7 @@ * An {@link Event} is an asynchronous notification from the VM. It is delivered only when the * client has subscribed to an event stream using the streamListen RPC. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Event extends Response { public Event(JsonObject json) { @@ -150,7 +150,7 @@ public IsolateRef getIsolate() { * What kind of event is this? */ public EventKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? EventKind.Unknown : EventKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/EventKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/EventKind.java index 60ace8a6c4..1348d89002 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/EventKind.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/EventKind.java @@ -19,7 +19,7 @@ * Adding new values to {@link EventKind} is considered a backwards compatible change. Clients * should ignore unrecognized events. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum EventKind { /** diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExceptionPauseMode.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExceptionPauseMode.java index ee4ab5c6e4..861edb9254 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExceptionPauseMode.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExceptionPauseMode.java @@ -18,7 +18,7 @@ /** * An {@link ExceptionPauseMode} indicates how the isolate pauses when an exception is thrown. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum ExceptionPauseMode { All, diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExtensionData.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExtensionData.java index 8170f932bd..c0639d0f3d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExtensionData.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ExtensionData.java @@ -20,7 +20,7 @@ /** * An {@link ExtensionData} is an arbitrary map that can have any contents. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ExtensionData extends Element { public ExtensionData(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Field.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Field.java index 6a314e4092..7ce5a1a4ff 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Field.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Field.java @@ -20,7 +20,7 @@ /** * A {@link Field} provides information about a Dart language field or variable. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Field extends Obj { public Field(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FieldRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FieldRef.java index c13265e219..29acd523ba 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FieldRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FieldRef.java @@ -20,7 +20,7 @@ /** * An {@link FieldRef} is a reference to a {@link Field}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class FieldRef extends ObjRef { public FieldRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Flag.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Flag.java index c9b8a60761..18ac152d98 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Flag.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Flag.java @@ -20,7 +20,7 @@ /** * A {@link Flag} represents a single VM command line flag. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Flag extends Element { public Flag(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FlagList.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FlagList.java index 4c5133542d..5acceff17d 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FlagList.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FlagList.java @@ -21,7 +21,7 @@ /** * A {@link FlagList} represents the complete set of VM command line flags. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class FlagList extends Response { public FlagList(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Frame.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Frame.java index 748ed540b5..5dbd0b64c5 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Frame.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Frame.java @@ -19,7 +19,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Frame extends Response { public Frame(JsonObject json) { @@ -50,7 +50,7 @@ public int getIndex() { public FrameKind getKind() { if (json.get("kind") == null) return null; - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? FrameKind.Unknown : FrameKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FrameKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FrameKind.java index 27f2405ebf..b824457fde 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FrameKind.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FrameKind.java @@ -18,7 +18,7 @@ /** * A {@link FrameKind} is used to distinguish different kinds of {@link Frame} objects. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum FrameKind { AsyncActivation, diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Func.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Func.java index fa38b22476..2073d85376 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Func.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Func.java @@ -20,7 +20,7 @@ /** * A {@link Func} represents a Dart language function. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Func extends Obj { public Func(JsonObject json) { @@ -58,7 +58,7 @@ public String getName() { * @return one of LibraryRef, ClassRef or FuncRef */ public Object getOwner() { - JsonObject elem = (JsonObject)json.get("owner"); + final JsonObject elem = (JsonObject)json.get("owner"); if (elem == null) return null; if (elem.get("type").getAsString().equals("@Library")) return new LibraryRef(elem); diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FuncRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FuncRef.java index 176e64f0eb..31fcb98abe 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FuncRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/FuncRef.java @@ -20,7 +20,7 @@ /** * An {@link FuncRef} is a reference to a {@link Func}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class FuncRef extends ObjRef { public FuncRef(JsonObject json) { @@ -40,7 +40,7 @@ public String getName() { * @return one of LibraryRef, ClassRef or FuncRef */ public Object getOwner() { - JsonObject elem = (JsonObject)json.get("owner"); + final JsonObject elem = (JsonObject)json.get("owner"); if (elem == null) return null; if (elem.get("type").getAsString().equals("@Library")) return new LibraryRef(elem); diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/HeapSpace.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/HeapSpace.java index a23c5971f7..e67d65fc93 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/HeapSpace.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/HeapSpace.java @@ -17,7 +17,7 @@ import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class HeapSpace extends Response { public HeapSpace(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Instance.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Instance.java index fe7645a4b3..00283ccd7e 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Instance.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Instance.java @@ -22,7 +22,7 @@ /** * An {@link Instance} represents an instance of the Dart language class {@link Obj}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Instance extends Obj { public Instance(JsonObject json) { @@ -203,7 +203,7 @@ public boolean getIsMultiLine() { * What kind of instance is this? */ public InstanceKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? InstanceKind.Unknown : InstanceKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { @@ -421,7 +421,7 @@ public String getValueAsString() { * Can return null. */ public boolean getValueAsStringIsTruncated() { - JsonElement elem = json.get("valueAsStringIsTruncated"); + final JsonElement elem = json.get("valueAsStringIsTruncated"); return elem != null ? elem.getAsBoolean() : false; } } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceKind.java index fee6c95114..7fea3e50eb 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceKind.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceKind.java @@ -19,7 +19,7 @@ * Adding new values to {@link InstanceKind} is considered a backwards compatible change. Clients * should treat unrecognized instance kinds as {@link PlainInstance}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public enum InstanceKind { /** diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceRef.java index 1c1246e666..f30f8489c8 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceRef.java @@ -21,7 +21,7 @@ /** * {@link InstanceRef} is a reference to an {@link Instance}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class InstanceRef extends ObjRef { public InstanceRef(JsonObject json) { @@ -39,7 +39,7 @@ public ClassRef getClassRef() { * What kind of instance is this? */ public InstanceKind getKind() { - JsonElement value = json.get("kind"); + final JsonElement value = json.get("kind"); try { return value == null ? InstanceKind.Unknown : InstanceKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { @@ -155,7 +155,7 @@ public String getValueAsString() { * Can return null. */ public boolean getValueAsStringIsTruncated() { - JsonElement elem = json.get("valueAsStringIsTruncated"); + final JsonElement elem = json.get("valueAsStringIsTruncated"); return elem != null ? elem.getAsBoolean() : false; } } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Isolate.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Isolate.java index 542b826cf9..a7df1235ef 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Isolate.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Isolate.java @@ -23,7 +23,7 @@ /** * An {@link Isolate} object provides information about one isolate in the VM. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Isolate extends Response { public Isolate(JsonObject json) { @@ -55,7 +55,7 @@ public ErrorObj getError() { * The current pause on exception mode for this isolate. */ public ExceptionPauseMode getExceptionPauseMode() { - JsonElement value = json.get("exceptionPauseMode"); + final JsonElement value = json.get("exceptionPauseMode"); try { return value == null ? ExceptionPauseMode.Unknown : ExceptionPauseMode.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/IsolateRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/IsolateRef.java index d95838baea..b8cb311a01 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/IsolateRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/IsolateRef.java @@ -20,7 +20,7 @@ /** * {@link IsolateRef} is a reference to an {@link Isolate} object. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class IsolateRef extends Response { public IsolateRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Library.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Library.java index c9c7a04a42..520a8dc784 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Library.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Library.java @@ -21,7 +21,7 @@ /** * A {@link Library} provides information about a Dart language library. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Library extends Obj { public Library(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryDependency.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryDependency.java index c8696fc32f..ae42411192 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryDependency.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryDependency.java @@ -20,7 +20,7 @@ /** * A {@link LibraryDependency} provides information about an import or export. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class LibraryDependency extends Element { public LibraryDependency(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryRef.java index 92f07b5e5d..d6402902d7 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/LibraryRef.java @@ -20,7 +20,7 @@ /** * {@link LibraryRef} is a reference to a {@link Library}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class LibraryRef extends ObjRef { public LibraryRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/MapAssociation.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/MapAssociation.java index d45d8d1118..290416c08b 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/MapAssociation.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/MapAssociation.java @@ -18,7 +18,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class MapAssociation extends Element { public MapAssociation(JsonObject json) { @@ -29,10 +29,10 @@ public MapAssociation(JsonObject json) { * @return one of InstanceRef or Sentinel */ public InstanceRef getKey() { - JsonElement elem = json.get("key"); + final JsonElement elem = json.get("key"); if (!elem.isJsonObject()) return null; - JsonObject child = elem.getAsJsonObject(); - String type = child.get("type").getAsString(); + final JsonObject child = elem.getAsJsonObject(); + final String type = child.get("type").getAsString(); if ("Sentinel".equals(type)) return null; return new InstanceRef(child); } @@ -41,10 +41,10 @@ public InstanceRef getKey() { * @return one of InstanceRef or Sentinel */ public InstanceRef getValue() { - JsonElement elem = json.get("value"); + final JsonElement elem = json.get("value"); if (!elem.isJsonObject()) return null; - JsonObject child = elem.getAsJsonObject(); - String type = child.get("type").getAsString(); + final JsonObject child = elem.getAsJsonObject(); + final String type = child.get("type").getAsString(); if ("Sentinel".equals(type)) return null; return new InstanceRef(child); } diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Message.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Message.java index d16c59a40d..45ecca346f 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Message.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Message.java @@ -21,7 +21,7 @@ * A {@link Message} provides information about a pending isolate message and the function that * will be invoked to handle it. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Message extends Response { public Message(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Null.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Null.java index 35bb956c29..637055ae77 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Null.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Null.java @@ -20,7 +20,7 @@ /** * A {@link Null} object represents the Dart language value null. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Null extends Instance { public Null(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/NullRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/NullRef.java index 8f2502e4fd..f4da440e57 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/NullRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/NullRef.java @@ -20,7 +20,7 @@ /** * {@link NullRef} is a reference to an a {@link Null}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class NullRef extends InstanceRef { public NullRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Obj.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Obj.java index 947e4ef97a..26130945f4 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Obj.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Obj.java @@ -20,7 +20,7 @@ /** * An {@link Obj} is a persistent object that is owned by some isolate. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class Obj extends Response { public Obj(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ObjRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ObjRef.java index dd66f54321..4c8833b5bd 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ObjRef.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ObjRef.java @@ -20,7 +20,7 @@ /** * {@link ObjRef} is a reference to a {@link Obj}. */ -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ObjRef extends Response { public ObjRef(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ProfileFunction.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ProfileFunction.java index f99e72d727..3a0ba7a5c7 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ProfileFunction.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ProfileFunction.java @@ -18,7 +18,7 @@ import com.google.gson.JsonObject; import java.util.List; -@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"}) +@SuppressWarnings({"WeakerAccess", "unused"}) public class ProfileFunction extends Element { public ProfileFunction(JsonObject json) { diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/RPCError.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/RPCError.java index de22ea5a6a..91d21d70be 100644 --- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/RPCError.java +++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/RPCError.java @@ -1,11 +1,11 @@ /* * Copyright (c) 2015, the Dart project authors. - * + * * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at - * + * * http://www.eclipse.org/legal/epl-v10.html - * + * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under @@ -15,7 +15,6 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; - import org.dartlang.vm.service.internal.VmServiceConst; /** @@ -24,7 +23,7 @@ * Here is an example error response for our [streamListen](#streamlisten) request above. This error * would be generated if we were attempting to subscribe to the _GC_ stream multiple times from the * same client. - * + * *

  * {
  *   "jsonrpc": "2.0",
@@ -38,10 +37,10 @@
  *   "id": "2"
  * }
  * 
- * + *

* In addition the the [error codes](http://www.jsonrpc.org/specification#error_object) specified in * the JSON-RPC spec, we use the following application specific error codes: - * + * *

  * code | message | meaning
  * ---- | ------- | -------
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ReloadReport.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ReloadReport.java
index 631ec0fed5..4ff5792b05 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ReloadReport.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ReloadReport.java
@@ -17,7 +17,7 @@
 
 import com.google.gson.JsonObject;
 
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class ReloadReport extends Response {
 
   public ReloadReport(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Response.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Response.java
index beeae68baf..256fe4a3f1 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Response.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Response.java
@@ -21,7 +21,7 @@
  * Every non-error response returned by the Service Protocol extends {@link Response}. By using the
  * {@link type} property, the client can determine which type of response has been provided.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Response extends Element {
 
   public Response(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Script.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Script.java
index 81955db6e0..aa8c7a5932 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Script.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Script.java
@@ -21,7 +21,7 @@
 /**
  * A {@link Script} provides information about a Dart language script.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Script extends Obj {
 
   public Script(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptList.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptList.java
index 69655d2927..85607d36cd 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptList.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptList.java
@@ -18,7 +18,7 @@
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class ScriptList extends Response {
 
   public ScriptList(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptRef.java
index ed60b96553..aa1e32d565 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptRef.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/ScriptRef.java
@@ -20,7 +20,7 @@
 /**
  * {@link ScriptRef} is a reference to a {@link Script}.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class ScriptRef extends ObjRef {
 
   public ScriptRef(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Sentinel.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Sentinel.java
index aa7a7adae5..be052c69a0 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Sentinel.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Sentinel.java
@@ -21,7 +21,7 @@
 /**
  * A {@link Sentinel} is used to indicate that the normal response is not available.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Sentinel extends Response {
 
   public Sentinel(JsonObject json) {
@@ -32,7 +32,7 @@ public Sentinel(JsonObject json) {
    * What kind of sentinel is this?
    */
   public SentinelKind getKind() {
-    JsonElement value = json.get("kind");
+    final JsonElement value = json.get("kind");
     try {
       return value == null ? SentinelKind.Unknown : SentinelKind.valueOf(value.getAsString());
     } catch (IllegalArgumentException e) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SentinelKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SentinelKind.java
index d02b940aa3..67684f5296 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SentinelKind.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SentinelKind.java
@@ -18,7 +18,7 @@
 /**
  * A {@link SentinelKind} is used to distinguish different kinds of {@link Sentinel} objects.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public enum SentinelKind {
 
   /**
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceLocation.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceLocation.java
index 9cdb9d0f23..7947c304bd 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceLocation.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceLocation.java
@@ -20,7 +20,7 @@
 /**
  * The {@link SourceLocation} class is used to designate a position or range in some script.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class SourceLocation extends Response {
 
   public SourceLocation(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReport.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReport.java
index 43a92e2066..96641b2e8b 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReport.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReport.java
@@ -22,7 +22,7 @@
  * The {@link SourceReport} class represents a set of reports tied to source locations in an
  * isolate.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class SourceReport extends Response {
 
   public SourceReport(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportCoverage.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportCoverage.java
index f812b03f71..21246e7615 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportCoverage.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportCoverage.java
@@ -22,7 +22,7 @@
  * The {@link SourceReportCoverage} class represents coverage information for one
  * SourceReportRange.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class SourceReportCoverage extends Element {
 
   public SourceReportCoverage(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportKind.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportKind.java
index 7856bd5bf9..76cd1a8fd1 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportKind.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportKind.java
@@ -15,7 +15,7 @@
 
 // This is a generated file.
 
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public enum SourceReportKind {
 
   /**
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportRange.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportRange.java
index 72d664e106..3eedaf183b 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportRange.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/SourceReportRange.java
@@ -22,7 +22,7 @@
  * The {@link SourceReportRange} class represents a range of executable code (function, method,
  * constructor, etc) in the running program. It is part of a SourceReport.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class SourceReportRange extends Element {
 
   public SourceReportRange(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Stack.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Stack.java
index b383cc8e08..aadba76c8b 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Stack.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Stack.java
@@ -18,7 +18,7 @@
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Stack extends Response {
 
   public Stack(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/StepOption.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/StepOption.java
index 95dbf4ad23..719bcd57bb 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/StepOption.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/StepOption.java
@@ -18,7 +18,7 @@
 /**
  * A {@link StepOption} indicates which form of stepping is requested in a resume RPC.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public enum StepOption {
 
   Into,
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Success.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Success.java
index bd1015a8c6..48fd949be9 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Success.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Success.java
@@ -20,7 +20,7 @@
 /**
  * The {@link Success} type is used to indicate that an operation completed successfully.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Success extends Response {
 
   public Success(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TimelineEvent.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TimelineEvent.java
index 506cd57b65..61a29d2e70 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TimelineEvent.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TimelineEvent.java
@@ -20,7 +20,7 @@
 /**
  * An {@link TimelineEvent} is an arbitrary map that contains a Trace Event Format event.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class TimelineEvent extends Element {
 
   public TimelineEvent(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArguments.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArguments.java
index eed1fe7beb..4e6869675d 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArguments.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArguments.java
@@ -22,7 +22,7 @@
  * A {@link TypeArguments} object represents the type argument vector for some instantiated generic
  * type.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class TypeArguments extends Obj {
 
   public TypeArguments(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArgumentsRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArgumentsRef.java
index bb70d323c1..e8f65021da 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArgumentsRef.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/TypeArgumentsRef.java
@@ -20,7 +20,7 @@
 /**
  * {@link TypeArgumentsRef} is a reference to a {@link TypeArguments} object.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class TypeArgumentsRef extends ObjRef {
 
   public TypeArgumentsRef(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/UnresolvedSourceLocation.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/UnresolvedSourceLocation.java
index a2b87dfcd9..633ff1c46c 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/UnresolvedSourceLocation.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/UnresolvedSourceLocation.java
@@ -22,7 +22,7 @@
  * location. As such, it is meant to approximate the final location of the breakpoint but it is not
  * exact.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class UnresolvedSourceLocation extends Response {
 
   public UnresolvedSourceLocation(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VM.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VM.java
index bf68890785..a107cc483c 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VM.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VM.java
@@ -18,7 +18,7 @@
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class VM extends Response {
 
   public VM(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VMRef.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VMRef.java
index 3225902d56..6864ded034 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VMRef.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/VMRef.java
@@ -20,7 +20,7 @@
 /**
  * {@link VMRef} is a reference to a {@link VM} object.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class VMRef extends Response {
 
   public VMRef(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Version.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Version.java
index 6ae08e70c4..49c7276e0c 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Version.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/element/Version.java
@@ -20,7 +20,7 @@
 /**
  * See Versioning.
  */
-@SuppressWarnings({"WeakerAccess", "unused", "UnnecessaryInterfaceModifier"})
+@SuppressWarnings({"WeakerAccess", "unused"})
 public class Version extends Response {
 
   public Version(JsonObject json) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/BlockingRequestSink.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/BlockingRequestSink.java
index 7b0accc707..cf8cd3f795 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/BlockingRequestSink.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/BlockingRequestSink.java
@@ -56,7 +56,7 @@ public void close() {
    * @param errorResponseSink the sink to send error responses to, not {@code null}
    */
   public RequestSink toErrorSink(ResponseSink errorResponseSink, String errorResponseCode,
-      String errorResponseMessage) {
+                                 String errorResponseMessage) {
     ErrorRequestSink errorRequestSink = new ErrorRequestSink(errorResponseSink, errorResponseCode,
         errorResponseMessage);
     synchronized (queue) {
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ErrorRequestSink.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ErrorRequestSink.java
index 1844c33592..9a8fce1c29 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ErrorRequestSink.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ErrorRequestSink.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2015, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -14,7 +14,6 @@
 package org.dartlang.vm.service.internal;
 
 import com.google.gson.JsonObject;
-
 import org.dartlang.vm.service.logging.Logging;
 
 /**
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/RequestSink.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/RequestSink.java
index dbb38c6f9e..ef2a5630c0 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/RequestSink.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/RequestSink.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2015, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -21,7 +21,7 @@
 public interface RequestSink {
   /**
    * Put request into the sink.
-   * 
+   *
    * @param request the request to put, not {@code null}.
    */
   void add(JsonObject request);
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ResponseSink.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ResponseSink.java
index 1530732a5b..5ac1db1200 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ResponseSink.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/ResponseSink.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2015, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -21,7 +21,7 @@
 public interface ResponseSink {
   /**
    * Put response into the sink.
-   * 
+   *
    * @param response the response to put, not {@code null}.
    */
   void add(JsonObject response) throws Exception;
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/VmServiceConst.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/VmServiceConst.java
index d0c1b377f2..3659c3c80f 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/VmServiceConst.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/VmServiceConst.java
@@ -11,50 +11,50 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
- package org.dartlang.vm.service.internal;
+package org.dartlang.vm.service.internal;
 
 /**
  * JSON constants used when communicating with the VM observatory service.
  */
 public interface VmServiceConst {
-  public static final String CODE = "code";
-  public static final String ERROR = "error";
-  public static final String EVENT = "event";
-  public static final String ID = "id";
-  public static final String MESSAGE = "message";
-  public static final String METHOD = "method";
-  public static final String PARAMS = "params";
-  public static final String RESULT = "result";
-  public static final String STREAM_ID = "streamId";
-  public static final String TYPE = "type";
-  public static final String JSONRPC = "jsonrpc";
-  public static final String JSONRPC_VERSION = "2.0";
-  public static final String DATA = "data";
+  static final String CODE = "code";
+  static final String ERROR = "error";
+  static final String EVENT = "event";
+  static final String ID = "id";
+  static final String MESSAGE = "message";
+  static final String METHOD = "method";
+  static final String PARAMS = "params";
+  static final String RESULT = "result";
+  static final String STREAM_ID = "streamId";
+  static final String TYPE = "type";
+  static final String JSONRPC = "jsonrpc";
+  static final String JSONRPC_VERSION = "2.0";
+  static final String DATA = "data";
 
   /**
    * Parse error	Invalid JSON was received by the server.
    * An error occurred on the server while parsing the JSON text.
    */
-  public static final int PARSE_ERROR = -32700;
+  static final int PARSE_ERROR = -32700;
 
   /**
    * Invalid Request	The JSON sent is not a valid Request object.
    */
-  public static final int INVALID_REQUEST = -32600;
+  static final int INVALID_REQUEST = -32600;
 
   /**
    * Method not found	The method does not exist / is not available.
    */
-  public static final int METHOD_NOT_FOUND = -32601;
+  static final int METHOD_NOT_FOUND = -32601;
 
   /**
    * Invalid params	Invalid method parameter(s).
    */
-  public static final int INVALID_PARAMS = -32602;
+  static final int INVALID_PARAMS = -32602;
 
   /**
    * Server error	Reserved for implementation-defined server-errors.
    * -32000 to -32099
    */
-  public static final int SERVER_ERROR = -32000;
+  static final int SERVER_ERROR = -32000;
 }
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/WebSocketRequestSink.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/WebSocketRequestSink.java
index 63002de0e6..8a9ebfd5ac 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/WebSocketRequestSink.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/internal/WebSocketRequestSink.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2015, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -14,11 +14,9 @@
 package org.dartlang.vm.service.internal;
 
 import com.google.gson.JsonObject;
-
-import org.dartlang.vm.service.logging.Logging;
-
 import de.roderick.weberknecht.WebSocket;
 import de.roderick.weberknecht.WebSocketException;
+import org.dartlang.vm.service.logging.Logging;
 
 /**
  * An {@link WebSocket} based implementation of {@link RequestSink}.
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logger.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logger.java
index 04fcef28a5..cf1bd03148 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logger.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logger.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2012, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -23,7 +23,7 @@ public interface Logger {
   /**
    * Implementation of {@link Logger} that does nothing.
    */
-  public class NullLogger implements Logger {
+  class NullLogger implements Logger {
     @Override
     public void logError(String message) {
     }
@@ -41,35 +41,35 @@ public void logInformation(String message, Throwable exception) {
     }
   }
 
-  public static final Logger NULL = new NullLogger();
+  static final Logger NULL = new NullLogger();
 
   /**
    * Log the given message as an error.
-   * 
+   *
    * @param message an explanation of why the error occurred or what it means
    */
-  public void logError(String message);
+  void logError(String message);
 
   /**
    * Log the given exception as one representing an error.
-   * 
-   * @param message an explanation of why the error occurred or what it means
+   *
+   * @param message   an explanation of why the error occurred or what it means
    * @param exception the exception being logged
    */
-  public void logError(String message, Throwable exception);
+  void logError(String message, Throwable exception);
 
   /**
    * Log the given informational message.
-   * 
+   *
    * @param message an explanation of why the error occurred or what it means
    */
-  public void logInformation(String message);
+  void logInformation(String message);
 
   /**
    * Log the given exception as one representing an informational message.
-   * 
-   * @param message an explanation of why the error occurred or what it means
+   *
+   * @param message   an explanation of why the error occurred or what it means
    * @param exception the exception being logged
    */
-  public void logInformation(String message, Throwable exception);
+  void logInformation(String message, Throwable exception);
 }
diff --git a/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logging.java b/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logging.java
index d89451d6cb..867cd1e795 100644
--- a/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logging.java
+++ b/third_party/vmServiceDrivers/org/dartlang/vm/service/logging/Logging.java
@@ -1,11 +1,11 @@
 /*
  * Copyright (c) 2014, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under

From 809f8b1c77113a1cc454872b05566e743fd6d200 Mon Sep 17 00:00:00 2001
From: Devon Carew 
Date: Thu, 11 Apr 2019 07:51:34 -0700
Subject: [PATCH 3/3] review comments

---
 src/io/flutter/inspector/WidgetPerfTipsPanel.java | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/io/flutter/inspector/WidgetPerfTipsPanel.java b/src/io/flutter/inspector/WidgetPerfTipsPanel.java
index c464f839a0..7f560dd327 100644
--- a/src/io/flutter/inspector/WidgetPerfTipsPanel.java
+++ b/src/io/flutter/inspector/WidgetPerfTipsPanel.java
@@ -25,8 +25,8 @@
 import io.flutter.utils.AsyncUtils;
 import org.jetbrains.annotations.NotNull;
 
-import javax.swing.*;
 import javax.swing.Timer;
+import javax.swing.*;
 import java.awt.event.ActionEvent;
 import java.util.*;
 
@@ -146,14 +146,6 @@ private void updateTip() {
         }
       }
 
-      // TODO(devoncarew): We never query changedEditors.
-      final ArrayList changedEditors = new ArrayList<>();
-      for (TextEditor editor : newTipsForFile.keySet()) {
-        final List entry = newTipsForFile.get(editor);
-        if (tipsPerFile == null || !PerfTipRule.equivalentPerfTips(entry, tipsPerFile.get(editor))) {
-          changedEditors.add(editor);
-        }
-      }
       tipsPerFile = newTipsForFile;
       if (!PerfTipRule.equivalentPerfTips(currentTips, tips)) {
         showPerfTips(tips);