Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-02-11 21:40:51 +0000
committerAlexander Kurtakov2019-02-12 10:14:27 +0000
commitff508f4576e41ccc0fd4f0ed417e5320572fdb76 (patch)
treec34d41d41310cab1d2778a18d122a95aeff23255 /org.eclipse.ui.cheatsheets/src/org/eclipse
parentbe07c17efd7df789819ac96dc4d99fd2e54c9ccb (diff)
downloadeclipse.platform.ua-ff508f4576e41ccc0fd4f0ed417e5320572fdb76.tar.gz
eclipse.platform.ua-ff508f4576e41ccc0fd4f0ed417e5320572fdb76.tar.xz
eclipse.platform.ua-ff508f4576e41ccc0fd4f0ed417e5320572fdb76.zip
Varargs reflection methods and try-with-resources.
Change-Id: Ib1f5311b9a5f7fde578129b96613fbeacfe0a0c0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org/eclipse')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskEditorManager.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetItemExtensionElement.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskEditorManager.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskEditorManager.java
index 093917e36..f51a8bc95 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskEditorManager.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskEditorManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2017 IBM Corporation and others.
+ * Copyright (c) 2005, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -63,7 +63,7 @@ public class TaskEditorManager {
}
try {
if (extClass != null) {
- Constructor<?> c = extClass.getConstructor(new Class[0]);
+ Constructor<?> c = extClass.getConstructor();
editorInstance = (TaskEditor) c.newInstance();
}
} catch (Exception e) {
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetItemExtensionElement.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetItemExtensionElement.java
index 59f3a0e8b..d7e5a6c0b 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetItemExtensionElement.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetItemExtensionElement.java
@@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.registry;
+
import java.lang.reflect.Constructor;
import org.eclipse.core.runtime.IAdaptable;

Back to the top