Skip to content

Commit becbb6d

Browse files
committed
Merge branch 'master' of [email protected]:eclipse-rcptt/org.eclipse.rcptt.git
2 parents a1b2b13 + 68a87c2 commit becbb6d

File tree

8 files changed

+17
-19
lines changed

8 files changed

+17
-19
lines changed

ecl/tests/org.eclipse.rcptt.ecl.parser.test/src/org/eclipse/rcptt/ecl/parser/test/TestSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.io.IOException;
1414
import java.io.InputStream;
1515
import java.io.InputStreamReader;
16+
import java.nio.charset.StandardCharsets;
1617

1718
import org.eclipse.core.runtime.CoreException;
1819
import org.eclipse.core.runtime.IStatus;
@@ -23,7 +24,6 @@
2324
import org.eclipse.rcptt.ecl.runtime.IProcess;
2425
import org.eclipse.rcptt.ecl.runtime.ISession;
2526

26-
import com.google.common.base.Charsets;
2727
import com.google.common.io.CharStreams;
2828

2929
public class TestSession {
@@ -59,7 +59,7 @@ public Object runScript(String script) throws CoreException {
5959

6060
public static String toString(InputStream is) throws IOException {
6161
try {
62-
return CharStreams.toString(new InputStreamReader(is, Charsets.UTF_8));
62+
return CharStreams.toString(new InputStreamReader(is, StandardCharsets.UTF_8));
6363
} finally {
6464
is.close();
6565
}

launching/org.eclipse.rcptt.launching/src/org/eclipse/rcptt/internal/launching/aut/OutputCaptureLaunchListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.io.FileOutputStream;
1515
import java.io.IOException;
1616
import java.io.PrintStream;
17+
import java.nio.charset.StandardCharsets;
1718
import java.util.List;
1819

1920
import org.eclipse.debug.core.IStreamListener;
@@ -22,7 +23,6 @@
2223
import org.eclipse.debug.core.model.IStreamMonitor;
2324
import org.eclipse.debug.core.model.IStreamsProxy;
2425

25-
import com.google.common.base.Charsets;
2626
import org.eclipse.rcptt.core.launching.events.AutBundleState;
2727
import org.eclipse.rcptt.internal.launching.Q7LaunchingPlugin;
2828
import org.eclipse.rcptt.launching.AutLaunch;
@@ -58,7 +58,7 @@ private void startLogging(IProcess[] processes) {
5858
if (listener == null) {
5959
this.listener = new PrintStreamListener(new PrintStream(
6060
new FileOutputStream(logFile, true), true,
61-
Charsets.UTF_8.name()));
61+
StandardCharsets.UTF_8.name()));
6262
}
6363

6464
for (IProcess process : processes) {

launching/org.eclipse.rcptt.reporting.html/src/org/eclipse/rcptt/reporting/html/HtmlReportRenderer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*******************************************************************************/
1111
package org.eclipse.rcptt.reporting.html;
1212

13-
import static com.google.common.base.Charsets.UTF_8;
1413
import static com.google.common.base.Predicates.compose;
1514
import static com.google.common.base.Predicates.equalTo;
1615
import static com.google.common.base.Predicates.not;
@@ -22,6 +21,7 @@
2221
import java.io.OutputStream;
2322
import java.io.OutputStreamWriter;
2423
import java.io.PrintWriter;
24+
import java.nio.charset.StandardCharsets;
2525
import java.text.NumberFormat;
2626

2727
import org.eclipse.core.runtime.CoreException;
@@ -38,7 +38,6 @@
3838
import org.eclipse.rcptt.sherlock.core.model.sherlock.report.Screenshot;
3939
import org.eclipse.rcptt.util.FileUtil;
4040

41-
import com.google.common.base.Charsets;
4241
import com.google.common.base.Function;
4342
import com.google.common.base.Predicate;
4443
import com.google.common.base.Strings;
@@ -57,7 +56,7 @@ public class HtmlReportRenderer implements IReportRenderer {
5756
static String loadAsString(String path) {
5857
try {
5958
byte[] content = FileUtil.getStreamContent(HtmlReportRenderer.class.getResourceAsStream(path));
60-
return new String(content, UTF_8);
59+
return new String(content, StandardCharsets.UTF_8);
6160
} catch (IOException e) {
6261
throw new RuntimeException("Failed to load " + path);
6362
}
@@ -69,7 +68,7 @@ public IStatus generateReport(IContentFactory factory, String reportName,
6968
PrintWriter writer = null;
7069
try {
7170
OutputStream stream = factory.createFileStream(reportName + ".html");
72-
writer = new PrintWriter(new OutputStreamWriter(stream, Charsets.UTF_8));
71+
writer = new PrintWriter(new OutputStreamWriter(stream, StandardCharsets.UTF_8));
7372
renderReport(writer, reportList, factory);
7473
} catch (Exception e) {
7574
return Plugin.UTILS.createError(e);

launching/org.eclipse.rcptt.reporting.html/src/org/eclipse/rcptt/reporting/html/HtmlReporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.io.OutputStream;
1717
import java.io.OutputStreamWriter;
1818
import java.io.PrintWriter;
19+
import java.nio.charset.StandardCharsets;
1920

2021
import org.eclipse.core.runtime.CoreException;
2122
import org.eclipse.core.runtime.IPath;
@@ -24,7 +25,6 @@
2425
import org.eclipse.rcptt.sherlock.core.model.sherlock.report.Report;
2526
import org.eclipse.rcptt.util.FileUtil;
2627

27-
import com.google.common.base.Charsets;
2828
import com.google.common.base.Strings;
2929

3030
public class HtmlReporter extends HtmlReportRenderer {
@@ -76,7 +76,7 @@ protected void renderNameAndDuration(PrintWriter writer, Report report, IContent
7676
PrintWriter childWriter = null;
7777
try {
7878
OutputStream os = content.createFileStream(fileName);
79-
childWriter = new PrintWriter(new OutputStreamWriter(os, Charsets.UTF_8));
79+
childWriter = new PrintWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8));
8080
childWriter.println("<html>");
8181
renderHead(childWriter, root.getName());
8282
childWriter.println("<body onload=\"installDetailsWorkaround()\">");

launching/tests/org.eclipse.rcptt.reporting.html.tests/src/org/eclipse/rcptt/reporting/html/tests/VolatileContentFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.io.ByteArrayOutputStream;
1414
import java.io.IOException;
1515
import java.io.OutputStream;
16+
import java.nio.charset.StandardCharsets;
1617
import java.util.HashMap;
1718
import java.util.List;
1819
import java.util.Map;
@@ -21,8 +22,6 @@
2122
import org.eclipse.rcptt.internal.core.RcpttPlugin;
2223
import org.eclipse.rcptt.reporting.core.IReportRenderer.IContentFactory;
2324

24-
import com.google.common.base.Charsets;
25-
2625
public class VolatileContentFactory implements IContentFactory {
2726
private final Map<String, byte[]> data;
2827
private final String prefix;
@@ -77,6 +76,6 @@ public void removeFileOrFolder(String name) throws CoreException {
7776
}
7877

7978
public String read(String path) {
80-
return new String(data.get(createKey(path)), Charsets.UTF_8);
79+
return new String(data.get(createKey(path)), StandardCharsets.UTF_8);
8180
}
8281
}

rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/PropertyCellEditor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import java.io.IOException;
1616
import java.net.URL;
17+
import java.nio.charset.StandardCharsets;
1718
import java.util.ArrayList;
1819
import java.util.Set;
1920
import java.util.TreeSet;
@@ -68,7 +69,6 @@
6869
import org.eclipse.swt.widgets.Text;
6970
import org.eclipse.ui.ISharedImages;
7071

71-
import com.google.common.base.Charsets;
7272
import com.google.common.io.Resources;
7373

7474
@SuppressWarnings("restriction")
@@ -538,7 +538,7 @@ private static String loadStyles() {
538538
if (url == null) {
539539
return styles = "";
540540
}
541-
return styles = Resources.toString(url, Charsets.UTF_8);
541+
return styles = Resources.toString(url, StandardCharsets.UTF_8);
542542
} catch (IOException e) {
543543
Q7UIPlugin.log(e);
544544
return styles = "";

rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/ecl/EclInformationContol.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
import java.io.IOException;
1414
import java.net.URL;
15+
import java.nio.charset.StandardCharsets;
1516

1617
import org.eclipse.jface.internal.text.html.BrowserInformationControl;
1718
import org.eclipse.jface.internal.text.html.HTMLPrinter;
1819
import org.eclipse.jface.resource.JFaceResources;
1920
import org.eclipse.swt.graphics.FontData;
2021
import org.eclipse.swt.widgets.Shell;
2122

22-
import com.google.common.base.Charsets;
2323
import com.google.common.io.Resources;
2424
import org.eclipse.rcptt.internal.ui.Q7UIPlugin;
2525

@@ -70,7 +70,7 @@ private static String loadStyles() {
7070
if (url == null) {
7171
return styles = "";
7272
}
73-
return styles = Resources.toString(url, Charsets.UTF_8);
73+
return styles = Resources.toString(url, StandardCharsets.UTF_8);
7474
} catch (IOException e) {
7575
Q7UIPlugin.log(e);
7676
return styles = "";

rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/launching/ResourceLaunchConfigurationMigration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.io.InputStreamReader;
2424
import java.io.StringWriter;
2525
import java.io.Writer;
26+
import java.nio.charset.StandardCharsets;
2627

2728
import org.eclipse.core.resources.IContainer;
2829
import org.eclipse.core.resources.IFile;
@@ -51,7 +52,6 @@
5152
import org.eclipse.ui.IStartup;
5253
import org.w3c.dom.Document;
5354

54-
import com.google.common.base.Charsets;
5555
import com.google.common.base.Strings;
5656
import com.google.common.io.Files;
5757

@@ -102,7 +102,7 @@ public void migrate(IFile resource) throws CoreException {
102102
Writer writer = new StringWriter();
103103
LaunchConfigurationMigration.write(document, writer);
104104
resource.setContents(new ByteArrayInputStream(writer.toString()
105-
.getBytes(Charsets.UTF_8)), 0, null);
105+
.getBytes(StandardCharsets.UTF_8)), 0, null);
106106
}
107107
}
108108

0 commit comments

Comments
 (0)