mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 10:41:06 +01:00
fix bug in jaxb implementation of data store api
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user