summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2007-05-01 16:06:15 (EDT)
committerpelder2007-05-01 16:06:15 (EDT)
commite6aa3f0b4400a2f9c9421a29987a7510da6cc565 (patch)
tree6e64818903f839cb532c001517e4e8c705e900d2
parent18f216e3b3e1418b2bfd73d09e72ada567d852ef (diff)
downloadorg.eclipse.jet-e6aa3f0b4400a2f9c9421a29987a7510da6cc565.zip
org.eclipse.jet-e6aa3f0b4400a2f9c9421a29987a7510da6cc565.tar.gz
org.eclipse.jet-e6aa3f0b4400a2f9c9421a29987a7510da6cc565.tar.bz2
[184846] The constructor URI(String) expects special characters to be encoded. Other URI constructors will encode as appropriate. Change to these constructors, and avoid other URI methods the use this constructor (resolve(String) and create(String)). Also, platform URL handlers don't correctly decode encoded URLs. Switch from URI.toURL() to new URL(String, int, String, String)
-rw-r--r--tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java25
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java
index 1232dc6..75f3866 100644
--- a/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java
+++ b/tests/org.eclipse.jet.tests.core/src/org/eclipse/jet/tests/tools/compiler/TestTemplateInput.java
@@ -60,31 +60,6 @@ public class TestTemplateInput extends TestCase {
*/
public void testGetTemplatePath_pathWithSpaces() throws IOException, TemplateInputException, URISyntaxException {
final String templatePath = "Copy of test1.txt";
- URI location2 = new URI("file", "/C:/usr/workspaces/ws-m2t-jet-head/org.eclipse.jet.tests.core/data/templates/base1/", null);
- DefaultTemplateInput defaultTemplateInput = new DefaultTemplateInput(location2, templatePath, "UTF-8");
-
- assertEquals(templatePath, defaultTemplateInput.getTemplatePath());
-
- Reader reader = null;
- try {
- reader = defaultTemplateInput.getReader();
- assertNotNull("reader", reader);
- } finally {
- if(reader != null) {
- reader.close();
- }
- }
- }
-
- /**
- * Test method for {@link org.eclipse.jet.internal.core.parser.DefaultTemplateInput#getTemplatePath()}.
- * @throws IOException
- * @throws TemplateInputException
- * @throws URISyntaxException
- */
- public void testGetTemplatePath_pathWithSpaces1() throws IOException, TemplateInputException, URISyntaxException {
- final String templatePath = "Copy of test1.txt";
- URI location2 = new URI("file", "/C:/usr/workspaces/ws-m2t-jet-head/org.eclipse.jet.tests.core/data/templates/base1/", null);
DefaultTemplateInput defaultTemplateInput = new DefaultTemplateInput(location1, templatePath, "UTF-8");
assertEquals(templatePath, defaultTemplateInput.getTemplatePath());