<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
We did a few of these sort of cleanup fixes a year or so ago.<br>
<br>
In general, this sort of cleanup *might* be useful, but also causes
some code churn and takes review cycles to ensure that there is no
unintentional side effect.<br>
<br>
The last two might be OK cleanup tasks, but I wouldn't make them a
high priority. Worth noting is that a seemingly redundant null check
or instanceof check is not always a bad thing, so I wouldn't clean
up all of them.<br>
<br>
The first group is the more interesting one. In some cases a
potential null access can highlight actual bugs. However, I oppose
any automated solution for these, since adding a null check where
you don't expect a null (even if you IDE thinks it might be
possible) can hide the root cause of a problem.<br>
<br>
We aren't going to enforce these, though, so you'll likely need to
configure your IDE to be less picky.<br>
<br>
-- Kevin<br>
<br>
<br>
<div class="moz-cite-prefix">On 12/4/2023 8:34 AM, Andy Goryachev
wrote:<br>
</div>
<blockquote type="cite" cite="mid:DM5PR1001MB2172665A727D66F56703E7CCE586A@DM5PR1001MB2172.namprd10.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Iosevka Fixed SS16";
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}div.WordSection1
{page:WordSection1;}ol
{margin-bottom:0in;}ul
{margin-bottom:0in;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">Dear
colleagues:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">Imported
the openjfx project into another workspace with a more
stringent error checking and discovered a few issues:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-family:"Iosevka Fixed SS16"">potential
null pointer access: 295<o:p></o:p></span></li>
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-family:"Iosevka Fixed SS16"">unnecessary
cast or instanceof: 190<o:p></o:p></span></li>
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-family:"Iosevka Fixed SS16"">redundant
null check: 61<o:p></o:p></span></li>
</ul>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">Do we
want to clean these up?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>