diff --git a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java index 03a18ec68a44..2b7f29681e2d 100644 --- a/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java +++ b/java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestDialog.java @@ -1,22 +1,7 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0 - * - * 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 the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.testIntegration.createTest; import com.intellij.CommonBundle; -import com.intellij.application.options.CodeStyle; import com.intellij.codeInsight.CodeInsightBundle; import com.intellij.codeInsight.daemon.impl.quickfix.OrderEntryFix; import com.intellij.icons.AllIcons; @@ -94,7 +79,7 @@ public class CreateTestDialog extends DialogWrapper { protected PsiDirectory myTargetDirectory; private TestFramework mySelectedFramework; - private final ComboBox myLibrariesCombo = new ComboBox(new DefaultComboBoxModel()); + private final ComboBox myLibrariesCombo = new ComboBox<>(new DefaultComboBoxModel<>()); private EditorTextField myTargetClassNameField; private ReferenceEditorComboWithBrowseButton mySuperClassField; private ReferenceEditorComboWithBrowseButton myTargetPackageField; @@ -375,7 +360,7 @@ public class CreateTestDialog extends DialogWrapper { final String defaultLibrary = getDefaultLibraryName(); TestFramework defaultDescriptor = null; - final DefaultComboBoxModel model = (DefaultComboBoxModel)myLibrariesCombo.getModel(); + final DefaultComboBoxModel model = (DefaultComboBoxModel)myLibrariesCombo.getModel(); final List descriptors = new SmartList<>(Extensions.getExtensions(TestFramework.EXTENSION_NAME)); descriptors.sort((d1, d2) -> Comparing.compare(d1.getName(), d2.getName())); @@ -564,7 +549,7 @@ public class CreateTestDialog extends DialogWrapper { if (selectedRoot == null) return null; return new WriteCommandAction(myProject, CodeInsightBundle.message("create.directory.command")) { - protected void run(@NotNull Result result) throws Throwable { + protected void run(@NotNull Result result) { result.setResult(RefactoringUtil.createPackageDirectoryInSourceRoot(targetPackage, selectedRoot)); } }.execute().getResultObject();