diff --git a/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java b/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java index 21c32f5e84..1f4da8e3b6 100644 --- a/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java +++ b/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java @@ -111,20 +111,17 @@ public class JAXBDataStore extends FileBasedStore implements DataStore 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); } }