You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2007/07/18 23:10:04 UTC
[jira] Created: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Serialize methods fail to close locally created XMLStreamWriters
----------------------------------------------------------------
Key: WSCOMMONS-222
URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Reporter: Rich Scheuerle
Assignee: Rich Scheuerle
Example from NodeImpl.java:
Here is the current code:
public void serialize(OutputStream output) throws XMLStreamException {
serialize(StAXUtils.createXMLStreamWriter(output));
}
Here is the suggested change that correctly closes the locally created XMLStreamWriter:
public void serialize(OutputStream output) throws XMLStreamException {
XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
try {
serialize(xmlStreamWriter);
} finally {
xmlStreamWriter.close();
}
}
Failure to close the XMLStreamWriter prevents resources from being freed.
I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Reopened: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rich Scheuerle reopened WSCOMMONS-222:
--------------------------------------
Fixing the commit
> Serialize methods fail to close locally created XMLStreamWriters
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-222
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Example from NodeImpl.java:
> Here is the current code:
> public void serialize(OutputStream output) throws XMLStreamException {
> serialize(StAXUtils.createXMLStreamWriter(output));
> }
> Here is the suggested change that correctly closes the locally created XMLStreamWriter:
> public void serialize(OutputStream output) throws XMLStreamException {
> XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
> try {
> serialize(xmlStreamWriter);
> } finally {
> xmlStreamWriter.close();
> }
> }
> Failure to close the XMLStreamWriter prevents resources from being freed.
> I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Resolved: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rich Scheuerle resolved WSCOMMONS-222.
--------------------------------------
Resolution: Fixed
Fixed in revision 564731
> Serialize methods fail to close locally created XMLStreamWriters
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-222
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Example from NodeImpl.java:
> Here is the current code:
> public void serialize(OutputStream output) throws XMLStreamException {
> serialize(StAXUtils.createXMLStreamWriter(output));
> }
> Here is the suggested change that correctly closes the locally created XMLStreamWriter:
> public void serialize(OutputStream output) throws XMLStreamException {
> XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
> try {
> serialize(xmlStreamWriter);
> } finally {
> xmlStreamWriter.close();
> }
> }
> Failure to close the XMLStreamWriter prevents resources from being freed.
> I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Commented: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513719 ]
Rich Scheuerle commented on WSCOMMONS-222:
------------------------------------------
I will provide a fix later this week. This fix is not required for the 1.2.5 version of Axiom.
> Serialize methods fail to close locally created XMLStreamWriters
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-222
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Example from NodeImpl.java:
> Here is the current code:
> public void serialize(OutputStream output) throws XMLStreamException {
> serialize(StAXUtils.createXMLStreamWriter(output));
> }
> Here is the suggested change that correctly closes the locally created XMLStreamWriter:
> public void serialize(OutputStream output) throws XMLStreamException {
> XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
> try {
> serialize(xmlStreamWriter);
> } finally {
> xmlStreamWriter.close();
> }
> }
> Failure to close the XMLStreamWriter prevents resources from being freed.
> I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Commented: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522383 ]
Amila Chinthaka Suriarachchi commented on WSCOMMONS-222:
--------------------------------------------------------
what is the fix you made
in ADBDataSource class serialize method has implemented in this way
public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException {
XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
serialize(xmlStreamWriter);
xmlStreamWriter.flush();
}
do I have to close the xmlStreamWriter in the ADBDataSource class?
> Serialize methods fail to close locally created XMLStreamWriters
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-222
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Example from NodeImpl.java:
> Here is the current code:
> public void serialize(OutputStream output) throws XMLStreamException {
> serialize(StAXUtils.createXMLStreamWriter(output));
> }
> Here is the suggested change that correctly closes the locally created XMLStreamWriter:
> public void serialize(OutputStream output) throws XMLStreamException {
> XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
> try {
> serialize(xmlStreamWriter);
> } finally {
> xmlStreamWriter.close();
> }
> }
> Failure to close the XMLStreamWriter prevents resources from being freed.
> I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Resolved: (WSCOMMONS-222) Serialize methods fail to close
locally created XMLStreamWriters
Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rich Scheuerle resolved WSCOMMONS-222.
--------------------------------------
Resolution: Fixed
> Serialize methods fail to close locally created XMLStreamWriters
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-222
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-222
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> Example from NodeImpl.java:
> Here is the current code:
> public void serialize(OutputStream output) throws XMLStreamException {
> serialize(StAXUtils.createXMLStreamWriter(output));
> }
> Here is the suggested change that correctly closes the locally created XMLStreamWriter:
> public void serialize(OutputStream output) throws XMLStreamException {
> XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output);
> try {
> serialize(xmlStreamWriter);
> } finally {
> xmlStreamWriter.close();
> }
> }
> Failure to close the XMLStreamWriter prevents resources from being freed.
> I scrubbed the Axiom code and corrected all of the occurrences of this pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org