<div dir="ltr">Thanks for the answers.<div>I've created an issue in <a href="http://bugreport.java.com">bugreport.java.com</a> with internal review ID : 9076287</div><div><br></div><div>Hope that helps,</div><div>Anthony</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 29 nov. 2023 à 21:55, Roger Riggs <<a href="mailto:roger.riggs@oracle.com">roger.riggs@oracle.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Anthony,<br>
<br>
Go ahead a file a single bug (for the two cases).<br>
That code may have been written before Arrays.fill(...).<br>
<br>
Regards, Roger<br>
<br>
<div>On 11/29/23 7:54 AM, Anthony Goubard
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,<br>
<br>
Last Friday, I decided to look if there were some classes that
did unneeded array assignments (e.g. to 0 / 0.0f / null / false)
in the JDK.<br>
<br>
I've found a few places and in particular 2 places where it's
done in big for loops (looping more than 500 times). So I
thought you might be interested to know about them.<br>
<br>
<a href="https://github.com/openjdk/jdk/blob/6871a2ff1207d3ee70973b1c4ee9bd09969c185b/src/java.base/share/classes/java/text/MergeCollation.java#L72" target="_blank">https://github.com/openjdk/jdk/blob/6871a2ff1207d3ee70973b1c4ee9bd09969c185b/src/java.base/share/classes/java/text/MergeCollation.java#L72</a><br>
<a href="https://github.com/openjdk/jdk/blob/6871a2ff1207d3ee70973b1c4ee9bd09969c185b/src/java.base/share/classes/sun/text/CompactByteArray.java#L85" target="_blank">https://github.com/openjdk/jdk/blob/6871a2ff1207d3ee70973b1c4ee9bd09969c185b/src/java.base/share/classes/sun/text/CompactByteArray.java#L85</a><br>
Also for CompactByteArray, maybe it's worth checking that
defaultValue is different than 0 before entering the for loop
(Line 80)<br>
<br>
Let me know if you're interested in fixing them and if you want
me to fill 2 bugs for them in the JBS or in <a href="http://bugreport.java.com" target="_blank">bugreport.java.com</a>.<br>
<br>
Best regards,<br>
Anthony Goubard<br>
</div>
</blockquote>
<br>
</div>
</blockquote></div>