aboutsummaryrefslogtreecommitdiffstats
path: root/sample/evolve
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-01-11 06:06:30 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-01-11 06:06:30 +0000
commit52a455616e4077b5b61823cb4765c02fc6866f9a (patch)
treea9f95d54cccee9e336a667043b4e958d30257064 /sample/evolve
parent5b8d2d6c7ab0102e8a1bb0384cf769ed8f0f34da (diff)
downloadjavassist-52a455616e4077b5b61823cb4765c02fc6866f9a.tar.gz
javassist-52a455616e4077b5b61823cb4765c02fc6866f9a.zip
restructred sub packages
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@233 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'sample/evolve')
-rw-r--r--sample/evolve/DemoServer.java2
-rw-r--r--sample/evolve/Evolution.java6
-rw-r--r--sample/evolve/VersionManager.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/sample/evolve/DemoServer.java b/sample/evolve/DemoServer.java
index dd64c550..b334bccb 100644
--- a/sample/evolve/DemoServer.java
+++ b/sample/evolve/DemoServer.java
@@ -1,6 +1,6 @@
package sample.evolve;
-import javassist.web.*;
+import javassist.tools.web.*;
import java.io.*;
/**
diff --git a/sample/evolve/Evolution.java b/sample/evolve/Evolution.java
index ecae0921..e804ff46 100644
--- a/sample/evolve/Evolution.java
+++ b/sample/evolve/Evolution.java
@@ -60,9 +60,9 @@ public class Evolution implements Translator {
private void onLoadUpdatable(String classname) throws NotFoundException,
CannotCompileException {
// if the class is a concrete class,
- // classname is <updatableClassName>$<version>.
+ // classname is <updatableClassName>$$<version>.
- int i = classname.lastIndexOf('$');
+ int i = classname.lastIndexOf("$$");
if (i <= 0)
return;
@@ -72,7 +72,7 @@ public class Evolution implements Translator {
int version;
try {
- version = Integer.parseInt(classname.substring(i + 1));
+ version = Integer.parseInt(classname.substring(i + 2));
}
catch (NumberFormatException e) {
throw new NotFoundException(classname, e);
diff --git a/sample/evolve/VersionManager.java b/sample/evolve/VersionManager.java
index 184397fd..efecee19 100644
--- a/sample/evolve/VersionManager.java
+++ b/sample/evolve/VersionManager.java
@@ -41,7 +41,7 @@ public class VersionManager {
else
version = ((Integer)found).intValue() + 1;
- Class c = Class.forName(qualifiedClassname + '$' + version);
+ Class c = Class.forName(qualifiedClassname + "$$" + version);
versionNo.put(qualifiedClassname, new Integer(version));
return c;
}