From 243bceef5ab08307d8136a3c40b70f9fc6661100 Mon Sep 17 00:00:00 2001 From: chiba Date: Mon, 12 Apr 2010 16:58:08 +0000 Subject: [PATCH] fixed deprecated API calls git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@526 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- Readme.html | 2 +- src/main/javassist/ClassPoolTail.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.html b/Readme.html index 3b839644..fb37ced8 100644 --- a/Readme.html +++ b/Readme.html @@ -67,7 +67,7 @@ other editors.

How to run sample programs

-

JDK 1.3 or later is needed. +

JDK 1.4 or later is needed.

0. If you have Apache Ant

diff --git a/src/main/javassist/ClassPoolTail.java b/src/main/javassist/ClassPoolTail.java index d3d1a51f..aa1aefe7 100644 --- a/src/main/javassist/ClassPoolTail.java +++ b/src/main/javassist/ClassPoolTail.java @@ -57,7 +57,7 @@ final class DirClassPath implements ClassPath { File f = new File(filename); if (f.exists()) try { - return f.getCanonicalFile().toURL(); + return f.getCanonicalFile().toURI().toURL(); } catch (MalformedURLException e) {} catch (IOException e) {} @@ -127,7 +127,7 @@ final class JarClassPath implements ClassPath { try { jarfile = new JarFile(pathname); jarfileURL = new File(pathname).getCanonicalFile() - .toURL().toString(); + .toURI().toURL().toString(); return; } catch (IOException e) {} -- 2.39.5