diff --git a/src/main/java/net/openhft/xstreem/convertors/DataValueConverter.java b/src/main/java/net/openhft/xstreem/convertors/DataValueConverter.java index b072f9ada..9948140a4 100644 --- a/src/main/java/net/openhft/xstreem/convertors/DataValueConverter.java +++ b/src/main/java/net/openhft/xstreem/convertors/DataValueConverter.java @@ -38,11 +38,8 @@ import java.beans.PropertyDescriptor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Iterator; import java.util.Map; -import static java.beans.Introspector.getBeanInfo; - /** * @author Rob Austin. @@ -51,7 +48,6 @@ public class DataValueConverter implements Converter { private static final Logger LOG = LoggerFactory.getLogger(DataValueConverter.class); - @Override public void marshal(Object o, HierarchicalStreamWriter writer, MarshallingContext context) { @@ -96,7 +92,6 @@ public class DataValueConverter implements Converter { if (fileModel.indexedGetter() != null) { try { - // final IndexedPropertyDescriptor indexedPropertyDescriptor = (IndexedPropertyDescriptor) p; final Method indexedReadMethod = fileModel.indexedGetter(); if (indexedReadMethod == null) @@ -129,7 +124,7 @@ public class DataValueConverter implements Converter { writer.endNode(); } catch (NoSuchFieldException | IllegalAccessException e1) { - LOG.error("", e1); + throw new ConversionException("", e1); } continue; @@ -140,7 +135,6 @@ public class DataValueConverter implements Converter { final Method readMethod = fileModel.getter(); - if (readMethod == null) continue; @@ -258,7 +252,7 @@ public class DataValueConverter implements Converter { fillInObject(reader, context, instance); } } catch (IllegalAccessException | InvocationTargetException e) { - LOG.error("", e); + throw new ConversionException("", e); } reader.moveUp(); @@ -280,7 +274,7 @@ public class DataValueConverter implements Converter { try { setter.invoke(using, object); } catch (Exception e) { - LOG.error("", e); + throw new ConversionException("", e); } reader.moveUp(); @@ -320,14 +314,13 @@ public class DataValueConverter implements Converter { } } catch (Exception e) { - // + throw new ConversionException("class=" + aClass.getName(), e); } throw new ConversionException("setValue(..) method not found in class=" + aClass.getCanonicalName()); } - @Override public boolean canConvert(Class clazz) { final String canonicalName = clazz.getCanonicalName();