Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-04-18 14:53:08 -0400
committerAlexander Kurtakov2018-04-18 14:53:08 -0400
commit980507919dacd03c52bf0dfdadfe0f72567d368e (patch)
tree2b8b433c414880b8b4d2368457be83377faa11b3 /org.eclipse.debug.ui/ui/org/eclipse/debug/ui
parent8b69a4c5b85a4d0b56b91c14a61a434298849456 (diff)
downloadeclipse.platform.debug-980507919dacd03c52bf0dfdadfe0f72567d368e.tar.gz
eclipse.platform.debug-980507919dacd03c52bf0dfdadfe0f72567d368e.tar.xz
eclipse.platform.debug-980507919dacd03c52bf0dfdadfe0f72567d368e.zip
Also remove useless see comments, convert to lambda and remove redundant type arguments in touched files. Change-Id: Ia38a6b2b4861a75f7b3d16bef471bc3393f938f2 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
index 1ed45112e..2eb1c6fda 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,8 +18,8 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -154,23 +154,17 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
fImportBreakpoints = importBreakpoints;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void run(final IProgressMonitor monitor) throws InvocationTargetException {
SubMonitor localmonitor = SubMonitor.convert(monitor, ImportExportMessages.ImportOperation_0, 1);
try {
XMLMemento memento = null;
if (fBuffer == null) {
- try (Reader reader = new InputStreamReader(new FileInputStream(fFileName), "UTF-8")) { //$NON-NLS-1$
+ try (Reader reader = new InputStreamReader(new FileInputStream(fFileName), StandardCharsets.UTF_8)) {
memento = XMLMemento.createReadRoot(reader);
} catch (FileNotFoundException e) {
throw new InvocationTargetException(e, MessageFormat.format("Breakpoint import file not found: {0}", new Object[] { //$NON-NLS-1$
fFileName }));
- } catch (UnsupportedEncodingException e) {
- throw new InvocationTargetException(e, MessageFormat.format("The import file was written in non-UTF-8 encoding.", new Object[] { //$NON-NLS-1$
- fFileName }));
} catch (IOException e) {
throw new InvocationTargetException(e);
}

Back to the top