File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed
src/main/java/edu/harvard/iq/dataverse/export Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -47,25 +47,11 @@ public String getDisplayName(Locale locale) {
4747
4848 @ Override
4949 public void exportDataset (ExportDataProvider dataProvider , OutputStream outputStream ) throws ExportException {
50- XMLStreamWriter xmlw = null ;
51- //XMLStreamWriter is not auto-closable - can't use try-with-resources here
5250 try {
53- xmlw = XMLOutputFactory .newInstance ().createXMLStreamWriter (outputStream );
54- xmlw .writeStartDocument ();
55- xmlw .flush ();
5651 DdiExportUtil .datasetJson2ddi (dataProvider .getDatasetJson (), dataProvider .getDatasetFileDetails (),
5752 outputStream );
5853 } catch (XMLStreamException xse ) {
5954 throw new ExportException ("Caught XMLStreamException performing DDI export" , xse );
60- } finally {
61- if (xmlw != null ) {
62- try {
63- xmlw .close ();
64- } catch (XMLStreamException e ) {
65- // Log this exception, but don't rethrow as it's not the primary issue
66- e .printStackTrace ();
67- }
68- }
6955 }
7056 }
7157
You can’t perform that action at this time.
0 commit comments