Browse Source

change name of Locator.encodeUri to Locator.encodeURI

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@395304 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
27c1d843ca
4 changed files with 7 additions and 7 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/launch/Launcher.java
  2. +4
    -4
      src/main/org/apache/tools/ant/launch/Locator.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java
  4. +1
    -1
      src/main/org/apache/tools/ant/util/FileUtils.java

+ 1
- 1
src/main/org/apache/tools/ant/launch/Launcher.java View File

@@ -131,7 +131,7 @@ public class Launcher {
}

try {
libPathURLs.add(new URL(Locator.encodeUri(element.toURL().toString())));
libPathURLs.add(new URL(Locator.encodeURI(element.toURL().toString())));
} catch (UnsupportedEncodingException ex) {
throw new MalformedURLException(ex.toString());
}


+ 4
- 4
src/main/org/apache/tools/ant/launch/Locator.java View File

@@ -253,7 +253,7 @@ public final class Locator {
* @throws UnsupportedEncodingException if UTF-8 is not available
* @since Ant 1.7
*/
public static String encodeUri(String path) throws UnsupportedEncodingException {
public static String encodeURI(String path) throws UnsupportedEncodingException {
int i = 0;
int len = path.length();
int ch = 0;
@@ -409,9 +409,9 @@ public final class Locator {
* FileUtils.toURI() cannot be used by Locator.java
* Implemented this way.
* File.toURL() adds file: and changes '\' to '/' for dos OSes
* encodeUri converts characters like ' ' and '#' to %DD
* encodeURI converts characters like ' ' and '#' to %DD
*/
urls[0] = new URL(encodeUri(location.toURL().toString()));
urls[0] = new URL(encodeURI(location.toURL().toString()));
} catch (UnsupportedEncodingException ex) {
throw new MalformedURLException(ex.toString());
}
@@ -435,7 +435,7 @@ public final class Locator {
for (int i = 0; i < matches.length; ++i) {
try {
// See comments above.
urls[i] = new URL(encodeUri(matches[i].toURL().toString()));
urls[i] = new URL(encodeURI(matches[i].toURL().toString()));
} catch (UnsupportedEncodingException ex) {
throw new MalformedURLException(ex.toString());
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java View File

@@ -129,7 +129,7 @@ public class ManifestClassPath
relPath = relPath + '/';
}
try {
relPath = Locator.encodeUri(relPath);
relPath = Locator.encodeURI(relPath);
} catch (UnsupportedEncodingException exc) {
throw new BuildException(exc);
}


+ 1
- 1
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -1073,7 +1073,7 @@ public class FileUtils {
}
path = path.replace('\\', '/');
try {
sb.append(Locator.encodeUri(path));
sb.append(Locator.encodeURI(path));
} catch (UnsupportedEncodingException exc) {
throw new BuildException(exc);
}


Loading…
Cancel
Save