diff --git a/platform/util/src/com/intellij/util/xmlb/AccessorBindingWrapper.java b/platform/util/src/com/intellij/util/xmlb/AccessorBindingWrapper.java index a64eec817a65..2e5d0ae008ae 100644 --- a/platform/util/src/com/intellij/util/xmlb/AccessorBindingWrapper.java +++ b/platform/util/src/com/intellij/util/xmlb/AccessorBindingWrapper.java @@ -31,7 +31,9 @@ class AccessorBindingWrapper implements Binding { public Object serialize(Object o, Object context, SerializationFilter filter) { Object value = myAccessor.read(o); - assert value != null : "Property " + myAccessor + " of object " + o + " must not be null"; + if (value == null) { + throw new XmlSerializationException("Property " + myAccessor + " of object " + o + " (" + o.getClass() + ") must not be null"); + } return myBinding.serialize(value, context, filter); }