From fef3cedb4bd296532f9941b2847c9559d29eef4d Mon Sep 17 00:00:00 2001 From: chiba Date: Thu, 24 May 2007 07:46:57 +0000 Subject: [PATCH] fixed a but in javassist.bytecode.stackmap etc. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@372 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/ClassPool.java | 3 ++- src/main/javassist/bytecode/ClassFileWriter.java | 2 +- src/main/javassist/bytecode/stackmap/TypeData.java | 2 +- tutorial/tutorial.html | 2 +- tutorial/tutorial2.html | 2 +- tutorial/tutorial3.html | 6 +++--- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/javassist/ClassPool.java b/src/main/javassist/ClassPool.java index 1b84ec4b..2581ae85 100644 --- a/src/main/javassist/ClassPool.java +++ b/src/main/javassist/ClassPool.java @@ -584,7 +584,8 @@ public class ClassPool { * @see javassist.ByteArrayClassPath */ public CtClass makeClass(InputStream classfile) - throws IOException, RuntimeException { + throws IOException, RuntimeException + { classfile = new BufferedInputStream(classfile); CtClass clazz = new CtClassType(classfile, this); clazz.checkModify(); diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index b4f83895..3b2b7c7e 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -46,7 +46,7 @@ public class ClassFileWriter { = AccessFlag.toModifier(cf.getAccessFlags() & ~AccessFlag.SYNCHRONIZED); out.println("major: " + cf.major + ", minor: " + cf.minor - + "modifiers: " + Integer.toHexString(cf.getAccessFlags())); + + " modifiers: " + Integer.toHexString(cf.getAccessFlags())); out.println(Modifier.toString(mod) + " class " + cf.getName() + " extends " + cf.getSuperclass()); diff --git a/src/main/javassist/bytecode/stackmap/TypeData.java b/src/main/javassist/bytecode/stackmap/TypeData.java index 0069f0fa..804264a0 100644 --- a/src/main/javassist/bytecode/stackmap/TypeData.java +++ b/src/main/javassist/bytecode/stackmap/TypeData.java @@ -263,7 +263,7 @@ public abstract class TypeData { cache = cp.get(oldName); CtClass cache2 = cp.get(typeName); - if (cache2.subclassOf(cache)) { + if (cache2.subtypeOf(cache)) { cache = cache2; return true; } diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index 8fe123cc..097d695a 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -1086,6 +1086,6 @@ For more information, see the API documentation of
Java(TM) is a trademark of Sun Microsystems, Inc.
-Copyright (C) 2000-2005 by Shigeru Chiba, All rights reserved. +Copyright (C) 2000-2007 by Shigeru Chiba, All rights reserved. diff --git a/tutorial/tutorial2.html b/tutorial/tutorial2.html index 484e85ec..833d1227 100644 --- a/tutorial/tutorial2.html +++ b/tutorial/tutorial2.html @@ -1623,6 +1623,6 @@ write:
Java(TM) is a trademark of Sun Microsystems, Inc.
-Copyright (C) 2000-2005 by Shigeru Chiba, All rights reserved. +Copyright (C) 2000-2007 by Shigeru Chiba, All rights reserved. diff --git a/tutorial/tutorial3.html b/tutorial/tutorial3.html index 1c4afe73..418ef719 100644 --- a/tutorial/tutorial3.html +++ b/tutorial/tutorial3.html @@ -236,7 +236,7 @@ transformation.

The generics of Java is implemented by the erasure technique. After compilation, all type parameters are dropped off. For -example, suppose that your source code declare a parameterized +example, suppose that your source code declares a parameterized type Vector<String>:

Then the interface you really have to add is Getter -(the type parameters <T> drops off) +(the type parameters <T> drops off) and the method you also have to add to the Wrapper class is this simple one: @@ -289,6 +289,6 @@ public Object get() { return value; }


Java(TM) is a trademark of Sun Microsystems, Inc.
-Copyright (C) 2000-2005 by Shigeru Chiba, All rights reserved. +Copyright (C) 2000-2007 by Shigeru Chiba, All rights reserved. -- 2.39.5