Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Thienel2015-10-01 02:27:56 -0400
committerFlorian Thienel2015-10-01 02:27:56 -0400
commit39114659fa9528fa481c9bac1681c1b9f0ab346c (patch)
tree07eff90666314fb6b00e2287e6ccd3721e91c083
parent3caa5c6414f986afbf618eee0c0ea6d5f6163c4c (diff)
downloadorg.eclipse.mylyn.docs.vex-39114659fa9528fa481c9bac1681c1b9f0ab346c.tar.gz
org.eclipse.mylyn.docs.vex-39114659fa9528fa481c9bac1681c1b9f0ab346c.tar.xz
org.eclipse.mylyn.docs.vex-39114659fa9528fa481c9bac1681c1b9f0ab346c.zip
remove use of java.nio.charset.StandardCharsets
We are currently using Java 1.6, StandardCharsets was added with 1.7. Change-Id: Ib35f690f18d0b064a9b396242a19de6995719070 Signed-off-by: Florian Thienel <florian@thienel.org>
-rw-r--r--org.eclipse.vex.ui.tests/src/org/eclipse/vex/ui/internal/config/tests/PluginDoctypeConfigTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.vex.ui.tests/src/org/eclipse/vex/ui/internal/config/tests/PluginDoctypeConfigTest.java b/org.eclipse.vex.ui.tests/src/org/eclipse/vex/ui/internal/config/tests/PluginDoctypeConfigTest.java
index 230dd2a8..d9c240e9 100644
--- a/org.eclipse.vex.ui.tests/src/org/eclipse/vex/ui/internal/config/tests/PluginDoctypeConfigTest.java
+++ b/org.eclipse.vex.ui.tests/src/org/eclipse/vex/ui/internal/config/tests/PluginDoctypeConfigTest.java
@@ -16,7 +16,6 @@ import static org.junit.Assert.assertNotNull;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.lang.reflect.Field;
-import java.nio.charset.StandardCharsets;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -42,6 +41,7 @@ public class PluginDoctypeConfigTest {
private IProject project;
private ConfigurationRegistry configurationRegistry;
+ private static final String UTF_8 = "UTF-8";
private static final String SIMPLE_DTD = "<!ELEMENT el1 ANY><!ELEMENT el2 ANY>";
@After
@@ -64,9 +64,9 @@ public class PluginDoctypeConfigTest {
* Make sure the property page is created without errors.
*/
@Test
- public void testDtdPropertyPage() throws CoreException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
+ public void testDtdPropertyPage() throws Exception {
project = PluginProjectTest.createVexPluginProject("DtdPropertyPageTest");
- final InputStream is = new ByteArrayInputStream(SIMPLE_DTD.getBytes(StandardCharsets.UTF_8));
+ final InputStream is = new ByteArrayInputStream(SIMPLE_DTD.getBytes(UTF_8));
project.getFile(PluginProjectTest.DTD_FILE_NAME).setContents(is, true, false, null);
final Display display = Display.getCurrent();
@@ -96,7 +96,7 @@ public class PluginDoctypeConfigTest {
// Create a new .dtd file and open the property page
final IFile file = project.getFile("test_new.dtd");
- final InputStream is = new ByteArrayInputStream(SIMPLE_DTD.getBytes(StandardCharsets.UTF_8));
+ final InputStream is = new ByteArrayInputStream(SIMPLE_DTD.getBytes(UTF_8));
file.create(is, true, null);
page.setElement(file);
page.createControl(shell);
@@ -140,4 +140,5 @@ public class PluginDoctypeConfigTest {
assertEquals("test_new.dtd", doctype.getResourceUri().toString());
assertEquals("test_new.dtd", doctype.getSystemId()); // The system id should match the filename by default
}
+
}

Back to the top