fix bug in jaxb implementation of data store api

This commit is contained in:
Sebastian Sdorra
2012-12-07 13:26:12 +01:00
parent 76c59e395d
commit ee00375773

View File

@@ -111,20 +111,17 @@ public class JAXBDataStore<T> extends FileBasedStore<T> implements DataStore<T>
File file = getFile(id);
if (file.exists())
try
{
try
{
Marshaller marshaller = context.createMarshaller();
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(item, file);
}
catch (JAXBException ex)
{
throw new StoreException("could not write object with id ".concat(id),
ex);
}
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(item, file);
}
catch (JAXBException ex)
{
throw new StoreException("could not write object with id ".concat(id),
ex);
}
}