<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">
<div></div>
<div>
<div>Hello, sorry for being unpopular, but I just hate it to waste developer resources,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I realy think this deprecation message should be re-considered, it broke a lot of things, the amount of work to implement a caching solution feels like a waste of time and on top of it, there is no clear replacement strategy published yet.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I would restrict deprication (for removal if you really insist) to javadoc and not poison stdout/stderr.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I think we stirred up enough PR that a message was received by maintainers, no need to further damage java reputation by breaking perfectly working inter process interfaces. (This is btw true for all such warnings). And I also think top priority
 should be to publish a go-forward route which should not depend solely on MR-Jars,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Gruss</div>
<div dir="ltr">Bernd</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
<div style="direction: ltr">-- </div>
<div style="direction: ltr">http://bernd.eckenfels.net</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> security-dev <security-dev-retn@openjdk.java.net> im Auftrag von Daniel Fuchs <dfuchs@openjdk.java.net><br>
<b>Gesendet:</b> Tuesday, June 29, 2021 8:50:08 PM<br>
<b>An:</b> core-libs-dev@openjdk.java.net <core-libs-dev@openjdk.java.net>; security-dev@openjdk.java.net <security-dev@openjdk.java.net><br>
<b>Betreff:</b> Re: [jdk17] RFR: 8269543: The warning for System::setSecurityManager should only appear once for each caller</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, 28 Jun 2021 21:09:43 GMT, Weijun Wang <weijun@openjdk.org> wrote:<br>
<br>
> Add a cache to record which sources have called `System::setSecurityManager` and only print out warning lines once for each.<br>
<br>
src/java.base/share/classes/java/lang/System.java line 337:<br>
<br>
> 335:             = Collections.synchronizedMap(new WeakHashMap<>());<br>
> 336:     }<br>
> 337: <br>
<br>
I wonder about the use of a WeakHashMap here. That may work well when the source is an interned string (a class name) which will be strongly referenced elsewhere and may be garbage collected if the class is unloaded, but in the case where it contains the name
 of the source jar then that string will only be referenced by the weak hashmap, and therefore it could be garbage collected any time - which would cause the mapping to be removed. In that case you cannot guarantee that the warning will be emitted only once.<br>
<br>
-------------<br>
<br>
PR: <a href="https://git.openjdk.java.net/jdk17/pull/166">https://git.openjdk.java.net/jdk17/pull/166</a><br>
</div>
</span></font></div>
</body>
</html>