Skip to content

Commit 5d26487

Browse files
authored
relax throws clause in overridden methods that do not throw (eclipse-platform#1467)
* relax throws clause in overridden methods that do not throw
1 parent b53ea1d commit 5d26487

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.eclipse.core.expressions.Expression;
2121
import org.eclipse.core.expressions.ExpressionInfo;
2222
import org.eclipse.core.expressions.IEvaluationContext;
23-
import org.eclipse.core.runtime.CoreException;
2423
import org.eclipse.ui.IEditorPart;
2524
import org.eclipse.ui.ISources;
2625
import org.eclipse.ui.IViewReference;
@@ -72,7 +71,7 @@ protected Expression getEnabledWhenExpression() {
7271
if (enabledWhen == null) {
7372
enabledWhen = new Expression() {
7473
@Override
75-
public EvaluationResult evaluate(IEvaluationContext context) throws CoreException {
74+
public EvaluationResult evaluate(IEvaluationContext context) {
7675
IWorkbenchWindow window = InternalHandlerUtil.getActiveWorkbenchWindow(context);
7776
if (window != null) {
7877
if (window.getActivePage() != null) {

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchConfigurer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.eclipse.ui.IWorkbench;
2424
import org.eclipse.ui.IWorkbenchWindow;
2525
import org.eclipse.ui.PlatformUI;
26-
import org.eclipse.ui.WorkbenchException;
2726
import org.eclipse.ui.application.IWorkbenchConfigurer;
2827
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
2928
import org.eclipse.ui.application.WorkbenchAdvisor;
@@ -167,7 +166,7 @@ public void openFirstTimeWindow() {
167166
}
168167

169168
@Override
170-
public IWorkbenchWindowConfigurer restoreWorkbenchWindow(IMemento memento) throws WorkbenchException {
169+
public IWorkbenchWindowConfigurer restoreWorkbenchWindow(IMemento memento) {
171170
return getWindowConfigurer(null);
172171
}
173172

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import java.util.HashMap;
1717
import java.util.Map;
18-
import org.eclipse.ui.PartInitException;
1918
import org.eclipse.ui.browser.AbstractWorkbenchBrowserSupport;
2019
import org.eclipse.ui.browser.IWebBrowser;
2120

@@ -53,13 +52,13 @@ IWebBrowser findBrowser(String id) {
5352
}
5453

5554
protected IWebBrowser doCreateBrowser(int style, String browserId, String name, String tooltip)
56-
throws PartInitException {
55+
{
5756
return new DefaultWebBrowser(this, browserId);
5857
}
5958

6059
@Override
6160
public IWebBrowser createBrowser(int style, String browserId, String name, String tooltip)
62-
throws PartInitException {
61+
{
6362
IWebBrowser browser = findBrowser(browserId == null ? getDefaultId() : browserId);
6463
if (browser != null) {
6564
return browser;
@@ -70,7 +69,7 @@ public IWebBrowser createBrowser(int style, String browserId, String name, Strin
7069
}
7170

7271
@Override
73-
public IWebBrowser createBrowser(String browserId) throws PartInitException {
72+
public IWebBrowser createBrowser(String browserId) {
7473
return createBrowser(AS_EXTERNAL, browserId, null, null);
7574
}
7675

0 commit comments

Comments
 (0)