Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-06-21 12:15:49 +0000
committerAlexander Kurtakov2017-06-21 12:21:08 +0000
commit59162e661ff01d376d08a5db825dcbc0e90cd561 (patch)
treec50cbfaba596c4ba73ac9d6041cb1c9f501064bf /tests
parent95c2979c2b0a297031f294e2715a09cdc5921853 (diff)
downloadeclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.tar.gz
eclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.tar.xz
eclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.zip
Bug 518569 - Use StandardCharsetsI20170621-2000
Change-Id: Ia2c156836e394226b450c1ca5c1e335b93f1eb65 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java
index 21c9725d8..375406f97 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/StreamMergerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -14,6 +14,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
import junit.framework.TestCase;
@@ -144,9 +145,9 @@ public class StreamMergerTest extends TestCase {
}
private IStatus merge(StringBuffer output, String a, String m, String y) throws UnsupportedEncodingException {
- InputStream ancestor= new ByteArrayInputStream(a.getBytes(encoding));
- InputStream target= new ByteArrayInputStream(m.getBytes(encoding));
- InputStream other= new ByteArrayInputStream(y.getBytes(encoding));
+ InputStream ancestor= new ByteArrayInputStream(a.getBytes(StandardCharsets.UTF_8));
+ InputStream target= new ByteArrayInputStream(m.getBytes(StandardCharsets.UTF_8));
+ InputStream other= new ByteArrayInputStream(y.getBytes(StandardCharsets.UTF_8));
return merge(output, ancestor, target, other);
}
@@ -159,7 +160,7 @@ public class StreamMergerTest extends TestCase {
IStreamMerger merger= new TextStreamMerger();
IStatus status= merger.merge(os, encoding, ancestor, encoding, target, encoding, other, encoding, (IProgressMonitor) null);
- output.append(new String(os.toByteArray(), encoding));
+ output.append(new String(os.toByteArray(), StandardCharsets.UTF_8));
return status;
}

Back to the top