<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 7/14/22 4:07 PM, Bernd Eckenfels
wrote:<br>
</div>
<blockquote type="cite" cite="mid:AM9P193MB11422E4AB2DF7361BF4D33DCFF889@AM9P193MB1142.EURP193.PROD.OUTLOOK.COM">
<div dir="ltr">
<div style="">
<div dir="ltr">The XMLOutputFactoryImpl does not allow to
share the writer instances:</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><a rel="noreferrer noopener" href="https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java#L167" style="" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java#L167</a><br>
</div>
</div>
</div>
</blockquote>
<br>
Sounds like a bug.<br>
<blockquote type="cite" cite="mid:AM9P193MB11422E4AB2DF7361BF4D33DCFF889@AM9P193MB1142.EURP193.PROD.OUTLOOK.COM">
<div dir="ltr">
<div style="">
<div dir="ltr">
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">So this is initialized and set to false:</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><a rel="noreferrer noopener" href="https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java#L62" style="" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java#L62</a><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">However when you query the property from the
PropertyManager it’s default seems to be true:</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><a rel="noreferrer noopener" href="https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java#L154" style="" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java#L154</a><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Should this be aligned to Boolean.FALSE? Or
maybe complete remove the shared instance code?</div>
</div>
</div>
</blockquote>
<br>
Agree, needs to be aligned. <br>
<blockquote type="cite" cite="mid:AM9P193MB11422E4AB2DF7361BF4D33DCFF889@AM9P193MB1142.EURP193.PROD.OUTLOOK.COM">
<div dir="ltr">
<div style="">
<div dir="ltr"><br>
</div>
<div dir="ltr">I also wonder is it expected to instantiate the
Impl directly: there is no programmatic api way to request
the default impl unless you define global config or system
property (and this also required the impl class name so you
can as well create a instance reflectively).</div>
</div>
</div>
</blockquote>
<br>
To get the default impl directly, use
XMLOutputFactory::newDefaultFactory().<br>
<br>
Best,<br>
Joe<br>
<br>
<blockquote type="cite" cite="mid:AM9P193MB11422E4AB2DF7361BF4D33DCFF889@AM9P193MB1142.EURP193.PROD.OUTLOOK.COM">
<div dir="ltr">
<div style="">
<div dir="ltr"><br>
</div>
<div dir="ltr">Gruss</div>
<div dir="ltr">Bernd</div>
<div id="ms-outlook-mobile-signature">
<div style="direction:ltr">-- </div>
<div style="direction:ltr"><a class="moz-txt-link-freetext" href="http://bernd.eckenfels.net">http://bernd.eckenfels.net</a></div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>