From 837ece487dd4c28c9d20b914695e5eae5277bb24 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 5 Feb 2009 14:48:10 +0300 Subject: [PATCH] 4769844: classes in java.beans that are serializable but don't define serialVersionUID Reviewed-by: peterz, rupashka --- .../share/classes/java/beans/IndexedPropertyChangeEvent.java | 3 ++- jdk/src/share/classes/java/beans/IntrospectionException.java | 3 ++- jdk/src/share/classes/java/beans/PropertyChangeEvent.java | 3 ++- jdk/src/share/classes/java/beans/PropertyVetoException.java | 4 ++-- .../classes/java/beans/beancontext/BeanContextEvent.java | 3 ++- .../java/beans/beancontext/BeanContextMembershipEvent.java | 3 ++- .../beans/beancontext/BeanContextServiceAvailableEvent.java | 3 ++- .../beans/beancontext/BeanContextServiceRevokedEvent.java | 3 ++- .../java/beans/beancontext/BeanContextServicesSupport.java | 4 +++- jdk/src/share/classes/sun/beans/editors/ColorEditor.java | 4 +++- jdk/src/share/classes/sun/beans/editors/FontEditor.java | 3 ++- 11 files changed, 24 insertions(+), 12 deletions(-) diff --git a/jdk/src/share/classes/java/beans/IndexedPropertyChangeEvent.java b/jdk/src/share/classes/java/beans/IndexedPropertyChangeEvent.java index ea78643e435..951cd871fe5 100644 --- a/jdk/src/share/classes/java/beans/IndexedPropertyChangeEvent.java +++ b/jdk/src/share/classes/java/beans/IndexedPropertyChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,6 +41,7 @@ package java.beans; * @author Mark Davidson */ public class IndexedPropertyChangeEvent extends PropertyChangeEvent { + private static final long serialVersionUID = -320227448495806870L; private int index; diff --git a/jdk/src/share/classes/java/beans/IntrospectionException.java b/jdk/src/share/classes/java/beans/IntrospectionException.java index cac0b20fc01..2f5a65eda73 100644 --- a/jdk/src/share/classes/java/beans/IntrospectionException.java +++ b/jdk/src/share/classes/java/beans/IntrospectionException.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ package java.beans; public class IntrospectionException extends Exception { + private static final long serialVersionUID = -3728150539969542619L; /** * Constructs an IntrospectionException with a diff --git a/jdk/src/share/classes/java/beans/PropertyChangeEvent.java b/jdk/src/share/classes/java/beans/PropertyChangeEvent.java index 69f523d92e3..3e0c9cef6f9 100644 --- a/jdk/src/share/classes/java/beans/PropertyChangeEvent.java +++ b/jdk/src/share/classes/java/beans/PropertyChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,7 @@ package java.beans; */ public class PropertyChangeEvent extends java.util.EventObject { + private static final long serialVersionUID = 7042693688939648123L; /** * Constructs a new PropertyChangeEvent. diff --git a/jdk/src/share/classes/java/beans/PropertyVetoException.java b/jdk/src/share/classes/java/beans/PropertyVetoException.java index f736b3bade5..73376496b53 100644 --- a/jdk/src/share/classes/java/beans/PropertyVetoException.java +++ b/jdk/src/share/classes/java/beans/PropertyVetoException.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-1998 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ package java.beans; public class PropertyVetoException extends Exception { - + private static final long serialVersionUID = 129596057694162164L; /** * Constructs a PropertyVetoException with a diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextEvent.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextEvent.java index 4574605a154..2530869534b 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextEvent.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 1997-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,7 @@ import java.beans.beancontext.BeanContext; */ public abstract class BeanContextEvent extends EventObject { + private static final long serialVersionUID = 7267998073569045052L; /** * Contruct a BeanContextEvent diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java index 7e6c1ae0a69..3752e390341 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,7 @@ import java.util.Iterator; * @see java.beans.beancontext.BeanContextMembershipListener */ public class BeanContextMembershipEvent extends BeanContextEvent { + private static final long serialVersionUID = 3499346510334590959L; /** * Contruct a BeanContextMembershipEvent diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceAvailableEvent.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceAvailableEvent.java index 558c7f9f363..7bb47a66033 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceAvailableEvent.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceAvailableEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,7 @@ import java.util.Iterator; */ public class BeanContextServiceAvailableEvent extends BeanContextEvent { + private static final long serialVersionUID = -5333985775656400778L; /** * Construct a BeanContextAvailableServiceEvent. diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java index a508f4ca157..50d888cdf7e 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import java.beans.beancontext.BeanContextServices; *

*/ public class BeanContextServiceRevokedEvent extends BeanContextEvent { + private static final long serialVersionUID = -1295543154724961754L; /** * Construct a BeanContextServiceEvent. diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java index d9552c8a34e..54dfdd7d227 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,7 @@ import java.util.Locale; public class BeanContextServicesSupport extends BeanContextSupport implements BeanContextServices { + private static final long serialVersionUID = -8494482757288719206L; /** *

@@ -594,6 +595,7 @@ public class BeanContextServicesSupport extends BeanContextSupport */ protected static class BCSSServiceProvider implements Serializable { + private static final long serialVersionUID = 861278251667444782L; BCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp) { super(); diff --git a/jdk/src/share/classes/sun/beans/editors/ColorEditor.java b/jdk/src/share/classes/sun/beans/editors/ColorEditor.java index a3610e0ee2e..55dd9137be1 100644 --- a/jdk/src/share/classes/sun/beans/editors/ColorEditor.java +++ b/jdk/src/share/classes/sun/beans/editors/ColorEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,8 @@ import java.awt.*; import java.beans.*; public class ColorEditor extends Panel implements PropertyEditor { + private static final long serialVersionUID = 1781257185164716054L; + public ColorEditor() { setLayout(null); diff --git a/jdk/src/share/classes/sun/beans/editors/FontEditor.java b/jdk/src/share/classes/sun/beans/editors/FontEditor.java index 88de9aea48f..04d4c187e22 100644 --- a/jdk/src/share/classes/sun/beans/editors/FontEditor.java +++ b/jdk/src/share/classes/sun/beans/editors/FontEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.awt.*; import java.beans.*; public class FontEditor extends Panel implements java.beans.PropertyEditor { + private static final long serialVersionUID = 6732704486002715933L; public FontEditor() { setLayout(null);