diff options
65 files changed, 192 insertions, 7 deletions
diff --git a/src/main/javassist/CannotCompileException.java b/src/main/javassist/CannotCompileException.java index 9c699287..0ab6e8d2 100644 --- a/src/main/javassist/CannotCompileException.java +++ b/src/main/javassist/CannotCompileException.java @@ -22,6 +22,8 @@ import javassist.compiler.CompileError; * Thrown when bytecode transformation has failed. */ public class CannotCompileException extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private Throwable myCause; /** diff --git a/src/main/javassist/ClassMap.java b/src/main/javassist/ClassMap.java index a0bb9499..c83e34e7 100644 --- a/src/main/javassist/ClassMap.java +++ b/src/main/javassist/ClassMap.java @@ -48,6 +48,8 @@ import javassist.bytecode.Descriptor; * @see CtNewMethod#copy(CtMethod,String,CtClass,ClassMap) */ public class ClassMap extends java.util.HashMap { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private ClassMap parent; /** diff --git a/src/main/javassist/CtClass.java b/src/main/javassist/CtClass.java index aacb59d8..622e8cf6 100644 --- a/src/main/javassist/CtClass.java +++ b/src/main/javassist/CtClass.java @@ -521,6 +521,9 @@ public abstract class CtClass { ClassFile cf = getClassFile2(); if (cf != null) { ClassMap cm = new ClassMap() { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public void put(String oldname, String newname) { put0(oldname, newname); } diff --git a/src/main/javassist/NotFoundException.java b/src/main/javassist/NotFoundException.java index 00325cbb..135d7904 100644 --- a/src/main/javassist/NotFoundException.java +++ b/src/main/javassist/NotFoundException.java @@ -20,6 +20,9 @@ package javassist; * Signals that something could not be found. */ public class NotFoundException extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public NotFoundException(String msg) { super(msg); } diff --git a/src/main/javassist/bytecode/BadBytecode.java b/src/main/javassist/bytecode/BadBytecode.java index 9959ae6c..7a049b45 100644 --- a/src/main/javassist/bytecode/BadBytecode.java +++ b/src/main/javassist/bytecode/BadBytecode.java @@ -20,6 +20,9 @@ package javassist.bytecode; * Signals that a bad bytecode sequence has been found. */ public class BadBytecode extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public BadBytecode(int opcode) { super("bytecode " + opcode); } diff --git a/src/main/javassist/bytecode/CodeAttribute.java b/src/main/javassist/bytecode/CodeAttribute.java index 090ae74d..e6f0e672 100644 --- a/src/main/javassist/bytecode/CodeAttribute.java +++ b/src/main/javassist/bytecode/CodeAttribute.java @@ -146,6 +146,9 @@ public class CodeAttribute extends AttributeInfo implements Opcode { * in <code>CodeAttribute</code>. */ public static class RuntimeCopyException extends RuntimeException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + /** * Constructs an exception. */ diff --git a/src/main/javassist/bytecode/CodeIterator.java b/src/main/javassist/bytecode/CodeIterator.java index e1edcbb7..c053a58c 100644 --- a/src/main/javassist/bytecode/CodeIterator.java +++ b/src/main/javassist/bytecode/CodeIterator.java @@ -796,7 +796,10 @@ public class CodeIterator implements Opcode { // methods for implementing insertGap(). - static class AlignmentException extends Exception {} + static class AlignmentException extends Exception { + + /** default serialVersionUID */ + private static final long serialVersionUID = 1L;} /** * insertGapCore0() inserts a gap (some NOPs). diff --git a/src/main/javassist/bytecode/DuplicateMemberException.java b/src/main/javassist/bytecode/DuplicateMemberException.java index 3d763271..5a2edf57 100644 --- a/src/main/javassist/bytecode/DuplicateMemberException.java +++ b/src/main/javassist/bytecode/DuplicateMemberException.java @@ -25,6 +25,9 @@ import javassist.CannotCompileException; * @see ClassFile#addField(FieldInfo) */ public class DuplicateMemberException extends CannotCompileException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public DuplicateMemberException(String msg) { super(msg); } diff --git a/src/main/javassist/bytecode/StackMapTable.java b/src/main/javassist/bytecode/StackMapTable.java index a02d5e72..f2e063d8 100644 --- a/src/main/javassist/bytecode/StackMapTable.java +++ b/src/main/javassist/bytecode/StackMapTable.java @@ -79,6 +79,9 @@ public class StackMapTable extends AttributeInfo { * in <code>StackMapTable</code>. */ public static class RuntimeCopyException extends RuntimeException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + /** * Constructs an exception. */ diff --git a/src/main/javassist/bytecode/annotation/NoSuchClassError.java b/src/main/javassist/bytecode/annotation/NoSuchClassError.java index 64187f8c..a2b23b34 100644 --- a/src/main/javassist/bytecode/annotation/NoSuchClassError.java +++ b/src/main/javassist/bytecode/annotation/NoSuchClassError.java @@ -21,6 +21,8 @@ package javassist.bytecode.annotation; * It keeps the name of the class that caused this error. */ public class NoSuchClassError extends Error { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private String className; /** diff --git a/src/main/javassist/bytecode/stackmap/BasicBlock.java b/src/main/javassist/bytecode/stackmap/BasicBlock.java index 7a643609..b07adb95 100644 --- a/src/main/javassist/bytecode/stackmap/BasicBlock.java +++ b/src/main/javassist/bytecode/stackmap/BasicBlock.java @@ -28,6 +28,9 @@ import java.util.ArrayList; */ public class BasicBlock { static class JsrBytecode extends BadBytecode { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + JsrBytecode() { super("JSR"); } } diff --git a/src/main/javassist/compiler/CompileError.java b/src/main/javassist/compiler/CompileError.java index 331b7847..59ce6d57 100644 --- a/src/main/javassist/compiler/CompileError.java +++ b/src/main/javassist/compiler/CompileError.java @@ -20,6 +20,8 @@ import javassist.CannotCompileException; import javassist.NotFoundException; public class CompileError extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private Lex lex; private String reason; diff --git a/src/main/javassist/compiler/KeywordTable.java b/src/main/javassist/compiler/KeywordTable.java index 5f516e3d..01301736 100644 --- a/src/main/javassist/compiler/KeywordTable.java +++ b/src/main/javassist/compiler/KeywordTable.java @@ -17,6 +17,9 @@ package javassist.compiler; public final class KeywordTable extends java.util.HashMap { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public KeywordTable() { super(); } public int lookup(String name) { diff --git a/src/main/javassist/compiler/NoFieldException.java b/src/main/javassist/compiler/NoFieldException.java index 7f84ad23..dd878590 100644 --- a/src/main/javassist/compiler/NoFieldException.java +++ b/src/main/javassist/compiler/NoFieldException.java @@ -19,6 +19,8 @@ package javassist.compiler; import javassist.compiler.ast.ASTree; public class NoFieldException extends CompileError { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private String fieldName; private ASTree expr; diff --git a/src/main/javassist/compiler/SymbolTable.java b/src/main/javassist/compiler/SymbolTable.java index a8e0dd72..6988898f 100644 --- a/src/main/javassist/compiler/SymbolTable.java +++ b/src/main/javassist/compiler/SymbolTable.java @@ -20,6 +20,8 @@ import java.util.HashMap; import javassist.compiler.ast.Declarator; public final class SymbolTable extends HashMap { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private SymbolTable parent; public SymbolTable() { this(null); } diff --git a/src/main/javassist/compiler/SyntaxError.java b/src/main/javassist/compiler/SyntaxError.java index fdf357c8..ed759bb0 100644 --- a/src/main/javassist/compiler/SyntaxError.java +++ b/src/main/javassist/compiler/SyntaxError.java @@ -17,6 +17,9 @@ package javassist.compiler; public class SyntaxError extends CompileError { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public SyntaxError(Lex lexer) { super("syntax error near \"" + lexer.getTextAround() + "\"", lexer); } diff --git a/src/main/javassist/compiler/ast/ASTList.java b/src/main/javassist/compiler/ast/ASTList.java index cf398966..f1e6123b 100644 --- a/src/main/javassist/compiler/ast/ASTList.java +++ b/src/main/javassist/compiler/ast/ASTList.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * The right subtree must be an ASTList object or null. */ public class ASTList extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private ASTree left; private ASTList right; diff --git a/src/main/javassist/compiler/ast/ASTree.java b/src/main/javassist/compiler/ast/ASTree.java index aaad0732..3fdd563a 100644 --- a/src/main/javassist/compiler/ast/ASTree.java +++ b/src/main/javassist/compiler/ast/ASTree.java @@ -25,6 +25,9 @@ import javassist.compiler.CompileError; * and <code>getRight()</code> returns null. */ public abstract class ASTree implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public ASTree getLeft() { return null; } public ASTree getRight() { return null; } diff --git a/src/main/javassist/compiler/ast/ArrayInit.java b/src/main/javassist/compiler/ast/ArrayInit.java index 26838fca..27a15035 100644 --- a/src/main/javassist/compiler/ast/ArrayInit.java +++ b/src/main/javassist/compiler/ast/ArrayInit.java @@ -22,6 +22,9 @@ import javassist.compiler.CompileError; * Array initializer such as <code>{ 1, 2, 3 }</code>. */ public class ArrayInit extends ASTList { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public ArrayInit(ASTree firstElement) { super(firstElement); } diff --git a/src/main/javassist/compiler/ast/AssignExpr.java b/src/main/javassist/compiler/ast/AssignExpr.java index 060a5bd3..835debc1 100644 --- a/src/main/javassist/compiler/ast/AssignExpr.java +++ b/src/main/javassist/compiler/ast/AssignExpr.java @@ -26,6 +26,9 @@ public class AssignExpr extends Expr { * =, %=, &=, *=, +=, -=, /=, ^=, |=, <<=, >>=, >>>= */ + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + private AssignExpr(int op, ASTree _head, ASTList _tail) { super(op, _head, _tail); } diff --git a/src/main/javassist/compiler/ast/BinExpr.java b/src/main/javassist/compiler/ast/BinExpr.java index 3b9f8ea2..8aafb364 100644 --- a/src/main/javassist/compiler/ast/BinExpr.java +++ b/src/main/javassist/compiler/ast/BinExpr.java @@ -30,6 +30,9 @@ public class BinExpr extends Expr { * <<, >>, >>>, +, -, *, /, % */ + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + private BinExpr(int op, ASTree _head, ASTList _tail) { super(op, _head, _tail); } diff --git a/src/main/javassist/compiler/ast/CallExpr.java b/src/main/javassist/compiler/ast/CallExpr.java index 5e3dd434..b8e21daf 100644 --- a/src/main/javassist/compiler/ast/CallExpr.java +++ b/src/main/javassist/compiler/ast/CallExpr.java @@ -24,6 +24,8 @@ import javassist.compiler.MemberResolver; * Method call expression. */ public class CallExpr extends Expr { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private MemberResolver.Method method; // cached result of lookupMethod() private CallExpr(ASTree _head, ASTList _tail) { diff --git a/src/main/javassist/compiler/ast/CastExpr.java b/src/main/javassist/compiler/ast/CastExpr.java index 7d4f4d80..26870529 100644 --- a/src/main/javassist/compiler/ast/CastExpr.java +++ b/src/main/javassist/compiler/ast/CastExpr.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * Cast expression. */ public class CastExpr extends ASTList implements TokenId { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected int castType; protected int arrayDim; diff --git a/src/main/javassist/compiler/ast/CondExpr.java b/src/main/javassist/compiler/ast/CondExpr.java index 8645736f..bba5a510 100644 --- a/src/main/javassist/compiler/ast/CondExpr.java +++ b/src/main/javassist/compiler/ast/CondExpr.java @@ -22,6 +22,9 @@ import javassist.compiler.CompileError; * Conditional expression. */ public class CondExpr extends ASTList { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public CondExpr(ASTree cond, ASTree thenp, ASTree elsep) { super(cond, new ASTList(thenp, new ASTList(elsep))); } diff --git a/src/main/javassist/compiler/ast/Declarator.java b/src/main/javassist/compiler/ast/Declarator.java index 5f14ac57..87cc58ec 100644 --- a/src/main/javassist/compiler/ast/Declarator.java +++ b/src/main/javassist/compiler/ast/Declarator.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * Variable declarator. */ public class Declarator extends ASTList implements TokenId { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected int varType; protected int arrayDim; protected int localVar; diff --git a/src/main/javassist/compiler/ast/DoubleConst.java b/src/main/javassist/compiler/ast/DoubleConst.java index 23ff0b65..0d30ec10 100644 --- a/src/main/javassist/compiler/ast/DoubleConst.java +++ b/src/main/javassist/compiler/ast/DoubleConst.java @@ -23,6 +23,8 @@ import javassist.compiler.TokenId; * Double constant. */ public class DoubleConst extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected double value; protected int type; diff --git a/src/main/javassist/compiler/ast/Expr.java b/src/main/javassist/compiler/ast/Expr.java index bc798bbc..c96c77b6 100644 --- a/src/main/javassist/compiler/ast/Expr.java +++ b/src/main/javassist/compiler/ast/Expr.java @@ -29,6 +29,8 @@ public class Expr extends ASTList implements TokenId { * Otherwise, the object should be an instance of a subclass. */ + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected int operatorId; Expr(int op, ASTree _head, ASTList _tail) { diff --git a/src/main/javassist/compiler/ast/FieldDecl.java b/src/main/javassist/compiler/ast/FieldDecl.java index 82d4856c..f3fc30ce 100644 --- a/src/main/javassist/compiler/ast/FieldDecl.java +++ b/src/main/javassist/compiler/ast/FieldDecl.java @@ -19,6 +19,9 @@ package javassist.compiler.ast; import javassist.compiler.CompileError; public class FieldDecl extends ASTList { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public FieldDecl(ASTree _head, ASTList _tail) { super(_head, _tail); } diff --git a/src/main/javassist/compiler/ast/InstanceOfExpr.java b/src/main/javassist/compiler/ast/InstanceOfExpr.java index cddf0317..98b7257c 100644 --- a/src/main/javassist/compiler/ast/InstanceOfExpr.java +++ b/src/main/javassist/compiler/ast/InstanceOfExpr.java @@ -22,6 +22,9 @@ import javassist.compiler.CompileError; * Instanceof expression. */ public class InstanceOfExpr extends CastExpr { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public InstanceOfExpr(ASTList className, int dim, ASTree expr) { super(className, dim, expr); } diff --git a/src/main/javassist/compiler/ast/IntConst.java b/src/main/javassist/compiler/ast/IntConst.java index 90feeb58..04354ab7 100644 --- a/src/main/javassist/compiler/ast/IntConst.java +++ b/src/main/javassist/compiler/ast/IntConst.java @@ -23,6 +23,8 @@ import javassist.compiler.TokenId; * Integer constant. */ public class IntConst extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected long value; protected int type; diff --git a/src/main/javassist/compiler/ast/Keyword.java b/src/main/javassist/compiler/ast/Keyword.java index 8127dc1e..9b72af51 100644 --- a/src/main/javassist/compiler/ast/Keyword.java +++ b/src/main/javassist/compiler/ast/Keyword.java @@ -22,6 +22,8 @@ import javassist.compiler.CompileError; * Keyword. */ public class Keyword extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected int tokenId; public Keyword(int token) { diff --git a/src/main/javassist/compiler/ast/Member.java b/src/main/javassist/compiler/ast/Member.java index f77de616..856f8521 100644 --- a/src/main/javassist/compiler/ast/Member.java +++ b/src/main/javassist/compiler/ast/Member.java @@ -23,6 +23,8 @@ import javassist.CtField; * Member name. */ public class Member extends Symbol { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; // cache maintained by fieldAccess() in TypeChecker. // this is used to obtain the value of a static final field. private CtField field; diff --git a/src/main/javassist/compiler/ast/MethodDecl.java b/src/main/javassist/compiler/ast/MethodDecl.java index 0a7d828f..7a0b7db7 100644 --- a/src/main/javassist/compiler/ast/MethodDecl.java +++ b/src/main/javassist/compiler/ast/MethodDecl.java @@ -19,6 +19,8 @@ package javassist.compiler.ast; import javassist.compiler.CompileError; public class MethodDecl extends ASTList { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; public static final String initName = "<init>"; public MethodDecl(ASTree _head, ASTList _tail) { diff --git a/src/main/javassist/compiler/ast/NewExpr.java b/src/main/javassist/compiler/ast/NewExpr.java index b1413f60..9ae2a910 100644 --- a/src/main/javassist/compiler/ast/NewExpr.java +++ b/src/main/javassist/compiler/ast/NewExpr.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * New Expression. */ public class NewExpr extends ASTList implements TokenId { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected boolean newArray; protected int arrayType; diff --git a/src/main/javassist/compiler/ast/Pair.java b/src/main/javassist/compiler/ast/Pair.java index b050dd28..553c9557 100644 --- a/src/main/javassist/compiler/ast/Pair.java +++ b/src/main/javassist/compiler/ast/Pair.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * overriding abstract methods in ASTree. */ public class Pair extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected ASTree left, right; public Pair(ASTree _left, ASTree _right) { diff --git a/src/main/javassist/compiler/ast/Stmnt.java b/src/main/javassist/compiler/ast/Stmnt.java index 251f66c3..e41b57cf 100644 --- a/src/main/javassist/compiler/ast/Stmnt.java +++ b/src/main/javassist/compiler/ast/Stmnt.java @@ -23,6 +23,8 @@ import javassist.compiler.CompileError; * Statement. */ public class Stmnt extends ASTList implements TokenId { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected int operatorId; public Stmnt(int op, ASTree _head, ASTList _tail) { diff --git a/src/main/javassist/compiler/ast/StringL.java b/src/main/javassist/compiler/ast/StringL.java index f52186e5..acc9e141 100644 --- a/src/main/javassist/compiler/ast/StringL.java +++ b/src/main/javassist/compiler/ast/StringL.java @@ -22,6 +22,8 @@ import javassist.compiler.CompileError; * String literal. */ public class StringL extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected String text; public StringL(String t) { diff --git a/src/main/javassist/compiler/ast/Symbol.java b/src/main/javassist/compiler/ast/Symbol.java index f71d0f91..67d8cb07 100644 --- a/src/main/javassist/compiler/ast/Symbol.java +++ b/src/main/javassist/compiler/ast/Symbol.java @@ -22,6 +22,8 @@ import javassist.compiler.CompileError; * Identifier. */ public class Symbol extends ASTree { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected String identifier; public Symbol(String sym) { diff --git a/src/main/javassist/compiler/ast/Variable.java b/src/main/javassist/compiler/ast/Variable.java index 88a31daa..1729faf2 100644 --- a/src/main/javassist/compiler/ast/Variable.java +++ b/src/main/javassist/compiler/ast/Variable.java @@ -22,6 +22,8 @@ import javassist.compiler.CompileError; * Variable. */ public class Variable extends Symbol { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected Declarator declarator; public Variable(String sym, Declarator d) { diff --git a/src/main/javassist/tools/reflect/CannotCreateException.java b/src/main/javassist/tools/reflect/CannotCreateException.java index a6fbdc5e..83f92fc6 100644 --- a/src/main/javassist/tools/reflect/CannotCreateException.java +++ b/src/main/javassist/tools/reflect/CannotCreateException.java @@ -20,6 +20,9 @@ package javassist.tools.reflect; * Signals that <code>ClassMetaobject.newInstance()</code> fails. */ public class CannotCreateException extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public CannotCreateException(String s) { super(s); } diff --git a/src/main/javassist/tools/reflect/CannotInvokeException.java b/src/main/javassist/tools/reflect/CannotInvokeException.java index e679a782..c1f86958 100644 --- a/src/main/javassist/tools/reflect/CannotInvokeException.java +++ b/src/main/javassist/tools/reflect/CannotInvokeException.java @@ -29,6 +29,8 @@ import java.lang.IllegalAccessException; */ public class CannotInvokeException extends RuntimeException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private Throwable err = null; /** diff --git a/src/main/javassist/tools/reflect/CannotReflectException.java b/src/main/javassist/tools/reflect/CannotReflectException.java index e6507c56..c7179545 100644 --- a/src/main/javassist/tools/reflect/CannotReflectException.java +++ b/src/main/javassist/tools/reflect/CannotReflectException.java @@ -29,6 +29,9 @@ import javassist.CannotCompileException; * @see javassist.CannotCompileException */ public class CannotReflectException extends CannotCompileException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public CannotReflectException(String msg) { super(msg); } diff --git a/src/main/javassist/tools/reflect/ClassMetaobject.java b/src/main/javassist/tools/reflect/ClassMetaobject.java index c958053f..bb5388d8 100644 --- a/src/main/javassist/tools/reflect/ClassMetaobject.java +++ b/src/main/javassist/tools/reflect/ClassMetaobject.java @@ -40,6 +40,8 @@ import java.io.ObjectOutputStream; * @see javassist.tools.reflect.Metalevel */ public class ClassMetaobject implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; /** * The base-level methods controlled by a metaobject * are renamed so that they begin with diff --git a/src/main/javassist/tools/reflect/Metaobject.java b/src/main/javassist/tools/reflect/Metaobject.java index 91a6126e..545840f6 100644 --- a/src/main/javassist/tools/reflect/Metaobject.java +++ b/src/main/javassist/tools/reflect/Metaobject.java @@ -45,6 +45,8 @@ import java.io.ObjectOutputStream; * @see javassist.tools.reflect.Metalevel */ public class Metaobject implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; protected ClassMetaobject classmetaobject; protected Metalevel baseobject; protected Method[] methods; diff --git a/src/main/javassist/tools/rmi/ObjectImporter.java b/src/main/javassist/tools/rmi/ObjectImporter.java index 43b62039..84502056 100644 --- a/src/main/javassist/tools/rmi/ObjectImporter.java +++ b/src/main/javassist/tools/rmi/ObjectImporter.java @@ -73,6 +73,8 @@ import java.lang.reflect.*; * @see javassist.tools.web.Viewer */ public class ObjectImporter implements java.io.Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private final byte[] endofline = { 0x0d, 0x0a }; private String servername, orgServername; private int port, orgPort; diff --git a/src/main/javassist/tools/rmi/ObjectNotFoundException.java b/src/main/javassist/tools/rmi/ObjectNotFoundException.java index 47cfb68e..bd5b27eb 100644 --- a/src/main/javassist/tools/rmi/ObjectNotFoundException.java +++ b/src/main/javassist/tools/rmi/ObjectNotFoundException.java @@ -17,6 +17,9 @@ package javassist.tools.rmi; public class ObjectNotFoundException extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public ObjectNotFoundException(String name) { super(name + " is not exported"); } diff --git a/src/main/javassist/tools/rmi/RemoteException.java b/src/main/javassist/tools/rmi/RemoteException.java index e00dff59..6d4612a7 100644 --- a/src/main/javassist/tools/rmi/RemoteException.java +++ b/src/main/javassist/tools/rmi/RemoteException.java @@ -21,6 +21,9 @@ package javassist.tools.rmi; * during remote method invocation. */ public class RemoteException extends RuntimeException { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public RemoteException(String msg) { super(msg); } diff --git a/src/main/javassist/tools/rmi/RemoteRef.java b/src/main/javassist/tools/rmi/RemoteRef.java index 6b604bc5..4537352e 100644 --- a/src/main/javassist/tools/rmi/RemoteRef.java +++ b/src/main/javassist/tools/rmi/RemoteRef.java @@ -21,6 +21,8 @@ package javassist.tools.rmi; * reference through a network stream. */ public class RemoteRef implements java.io.Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; public int oid; public String classname; diff --git a/src/main/javassist/tools/web/BadHttpRequest.java b/src/main/javassist/tools/web/BadHttpRequest.java index 0eaa266c..cb76b264 100644 --- a/src/main/javassist/tools/web/BadHttpRequest.java +++ b/src/main/javassist/tools/web/BadHttpRequest.java @@ -20,6 +20,8 @@ package javassist.tools.web; * Thrown when receiving an invalid HTTP request. */ public class BadHttpRequest extends Exception { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private Exception e; public BadHttpRequest() { e = null; } diff --git a/src/main/javassist/util/proxy/RuntimeSupport.java b/src/main/javassist/util/proxy/RuntimeSupport.java index 371d553d..2c6a5ecc 100644 --- a/src/main/javassist/util/proxy/RuntimeSupport.java +++ b/src/main/javassist/util/proxy/RuntimeSupport.java @@ -31,6 +31,9 @@ public class RuntimeSupport { public static MethodHandler default_interceptor = new DefaultMethodHandler(); static class DefaultMethodHandler implements MethodHandler, Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Exception diff --git a/src/main/javassist/util/proxy/SerializedProxy.java b/src/main/javassist/util/proxy/SerializedProxy.java index a0485da0..9427e7e5 100644 --- a/src/main/javassist/util/proxy/SerializedProxy.java +++ b/src/main/javassist/util/proxy/SerializedProxy.java @@ -31,6 +31,8 @@ import java.security.ProtectionDomain; * @see RuntimeSupport#makeSerializedProxy(Object) */ class SerializedProxy implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private String superClass; private String[] interfaces; private byte[] filterSignature; diff --git a/src/test/javassist/proxyfactory/MyCls.java b/src/test/javassist/proxyfactory/MyCls.java index 43fcb8dd..c4c5f35e 100644 --- a/src/test/javassist/proxyfactory/MyCls.java +++ b/src/test/javassist/proxyfactory/MyCls.java @@ -7,6 +7,8 @@ import java.io.Serializable; */ public class MyCls implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private int i,j; public int getI() { diff --git a/src/test/javassist/proxyfactory/ProxyFactoryTest.java b/src/test/javassist/proxyfactory/ProxyFactoryTest.java index 2b41af7a..dd52619d 100644 --- a/src/test/javassist/proxyfactory/ProxyFactoryTest.java +++ b/src/test/javassist/proxyfactory/ProxyFactoryTest.java @@ -59,6 +59,8 @@ public class ProxyFactoryTest extends TestCase { public static class MyMethodHandler implements MethodHandler, Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; private int x; public int getX() { diff --git a/src/test/javassist/proxyfactory/Tester.java b/src/test/javassist/proxyfactory/Tester.java index 601076da..7d484ecb 100644 --- a/src/test/javassist/proxyfactory/Tester.java +++ b/src/test/javassist/proxyfactory/Tester.java @@ -8,12 +8,17 @@ import java.io.ByteArrayOutputStream; import java.lang.reflect.Method; class Hand implements java.io.Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; public int setHandler(int i) { return i; } int getHandler() { return 3; } } public class Tester extends TestCase { static class MHandler implements MethodHandler, java.io.Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable { System.out.println("Name: " + m.getName()); diff --git a/src/test/test/javassist/bytecode/analysis/AnalyzerTest.java b/src/test/test/javassist/bytecode/analysis/AnalyzerTest.java index 0c5a77e6..0337cbf8 100644 --- a/src/test/test/javassist/bytecode/analysis/AnalyzerTest.java +++ b/src/test/test/javassist/bytecode/analysis/AnalyzerTest.java @@ -319,13 +319,17 @@ public class AnalyzerTest extends TestCase { public static class A {}; - public static class B1 extends A implements Serializable {}; - public static class B2 extends A implements Serializable {}; - public static class A2 implements Serializable, Cloneable {}; - public static class A3 implements Serializable, Cloneable {}; - + public static class B1 extends A implements Serializable { + private static final long serialVersionUID = 1L;}; + public static class B2 extends A implements Serializable { + private static final long serialVersionUID = 1L;}; + public static class A2 implements Serializable, Cloneable { + private static final long serialVersionUID = 1L;}; + public static class A3 implements Serializable, Cloneable { + private static final long serialVersionUID = 1L;}; public static class B3 extends A {}; - public static class C31 extends B3 implements Serializable {}; + public static class C31 extends B3 implements Serializable { + private static final long serialVersionUID = 1L;}; public void dummy(Serializable s) {} diff --git a/src/test/test/javassist/proxy/ProxySerializationTest.java b/src/test/test/javassist/proxy/ProxySerializationTest.java index 28125de0..42e16ca7 100644 --- a/src/test/test/javassist/proxy/ProxySerializationTest.java +++ b/src/test/test/javassist/proxy/ProxySerializationTest.java @@ -80,6 +80,9 @@ public class ProxySerializationTest extends TestCase public static class TestFilter implements MethodFilter, Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public boolean isHandled(Method m) { if (m.getName().equals("getName")) { return true; @@ -105,6 +108,9 @@ public class ProxySerializationTest extends TestCase public static class TestHandler implements MethodHandler, Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { return proceed.invoke(self, args); @@ -127,6 +133,8 @@ public class ProxySerializationTest extends TestCase public static class TestClass implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; public String name; public TestClass() diff --git a/src/test/test/javassist/proxy/ProxySimpleTest.java b/src/test/test/javassist/proxy/ProxySimpleTest.java index bbae9d8d..c73ab397 100644 --- a/src/test/test/javassist/proxy/ProxySimpleTest.java +++ b/src/test/test/javassist/proxy/ProxySimpleTest.java @@ -84,6 +84,9 @@ public class ProxySimpleTest extends TestCase { } public static class ReadWriteData implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public int foo() { return 4; } } @@ -102,10 +105,16 @@ public class ProxySimpleTest extends TestCase { } public static class WriteReplace implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object writeReplace() { return this; } } public static class WriteReplace2 implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object writeReplace(int i) { return Integer.valueOf(i); } } diff --git a/src/test/test1/GetThrowables.java b/src/test/test1/GetThrowables.java index 19e9a8a5..11ff3e05 100644 --- a/src/test/test1/GetThrowables.java +++ b/src/test/test1/GetThrowables.java @@ -1,9 +1,15 @@ package test1; class GetThrow1 extends Exception { + + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; } class GetThrow2 extends Exception { + + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; } public class GetThrowables { diff --git a/src/test/test1/MySerializableClass.java b/src/test/test1/MySerializableClass.java index 486d1b1b..975dd653 100644 --- a/src/test/test1/MySerializableClass.java +++ b/src/test/test1/MySerializableClass.java @@ -7,6 +7,8 @@ import java.io.*; * @author Bob Lee */ public class MySerializableClass implements Serializable, Cloneable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; String fieldA; String fieldB; diff --git a/src/test/test2/NewExprInTry.java b/src/test/test2/NewExprInTry.java index e6e1fe90..804a7c8d 100644 --- a/src/test/test2/NewExprInTry.java +++ b/src/test/test2/NewExprInTry.java @@ -3,6 +3,9 @@ package test2; import java.util.HashMap;
class HashMapWrapper extends HashMap {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
HashMapWrapper(int size, int args) {
super(size);
}
diff --git a/src/test/test2/Prune.java b/src/test/test2/Prune.java index 1daf9cbb..f98f7764 100644 --- a/src/test/test2/Prune.java +++ b/src/test/test2/Prune.java @@ -1,6 +1,8 @@ package test2;
public class Prune extends java.awt.Point implements Cloneable, Runnable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
public int value;
public Prune(int i) {
diff --git a/src/test/test4/GetAllRefInnerTest.java b/src/test/test4/GetAllRefInnerTest.java index 352b3252..a4921caf 100644 --- a/src/test/test4/GetAllRefInnerTest.java +++ b/src/test/test4/GetAllRefInnerTest.java @@ -20,6 +20,9 @@ public class GetAllRefInnerTest<T> { } public Object foo() { return new java.util.HashSet<String>() { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public String toString() { return this.getClass().toString(); } }; } diff --git a/src/test/test4/JIRA181.java b/src/test/test4/JIRA181.java index c3d2f45a..7c0b0930 100644 --- a/src/test/test4/JIRA181.java +++ b/src/test/test4/JIRA181.java @@ -3,6 +3,9 @@ package test4; import java.util.ArrayList; public class JIRA181<T extends Number> extends ArrayList<T> { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public @interface Condition { Class<? extends ICondition> condition(); } diff --git a/src/test/testproxy/ProxyFactoryPerformanceTest.java b/src/test/testproxy/ProxyFactoryPerformanceTest.java index 55bc7849..829f960a 100644 --- a/src/test/testproxy/ProxyFactoryPerformanceTest.java +++ b/src/test/testproxy/ProxyFactoryPerformanceTest.java @@ -163,6 +163,9 @@ class EnhancerUser extends Thread implements InvocationHandler { */
class SampleBean implements Serializable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
long oid;
int version;
diff --git a/src/test/testproxy/ProxyTester.java b/src/test/testproxy/ProxyTester.java index f325997d..b7f36bcf 100644 --- a/src/test/testproxy/ProxyTester.java +++ b/src/test/testproxy/ProxyTester.java @@ -398,6 +398,9 @@ public class ProxyTester extends TestCase { } public static class ReadWriteData implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public int foo() { return 4; } } @@ -416,10 +419,16 @@ public class ProxyTester extends TestCase { } public static class WriteReplace implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object writeReplace() { return this; } } public static class WriteReplace2 implements Serializable { + /** default serialVersionUID */ + private static final long serialVersionUID = 1L; + public Object writeReplace(int i) { return Integer.valueOf(i); } } |