| Summary: | Writer is never closed when using URIConverter.Writeable | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Bryan Hunt <bhunt> |
| Component: | XML/XMI | Assignee: | Ed Merks <Ed.Merks> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.6.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Bryan Hunt
I found a better workaround by extending XMIResourceImpl and closing the writer in doSave(). WritableOutputStream has
public void close() throws IOException
{
super.close();
writer.close();
}
so I think the writer is closed when the stream is closed.
Note that when you call Resource.save(OutputStream, Map<Object, Object>) you created the stream and you're responsible for closing it. Only when the Resource itself opens a stream does it close the stream. After all, you may passing System.out and you'd not want that closed...
Or did I miss something?
|