diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java index 707a907d32b..1da35ce9568 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.springframework.beans.factory.support; +import java.io.NotSerializableException; import java.io.ObjectStreamException; import java.io.Serializable; import java.lang.annotation.Annotation; @@ -929,7 +930,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return new SerializedBeanFactoryReference(this.serializationId); } else { - return this; + throw new NotSerializableException("DefaultListableBeanFactory has no serialization id"); } }