I should probably chime in here as the Netbeans Rust Remover.

Netbeans has gone through some changes over the years. A big part of that
is "the code just works". So this means, it can largely be "left alone". It
might not be optimal and in some places prevents moving to newer JDKs. But,
it's something that needs to be fixed and/or improved on. So it's become my
little way to help the project.

I have personally cleaned up over thousands of these "warnings".. The
rawtype warning is a favorite place that I've done a LOT of cleanup. The
deprecation warning, I've cleaned up some. There are still a lot of those.

I continue to do this work going forward and would welcome any help.

FYI.

-brad w.


On Wed, Jul 14, 2021 at 4:34 PM Kenneth Fogel <[email protected]>
wrote:

> For my own amusement I tried to compile the NetBeans 12.5 beta using Java
> 16 and 17 on my new Windows system. In both cases there was an issue with
> not finding the JavaScript engine. JS support in Java was deprecated in
> Java 11 but it was not removed until Java 15 This is not new information. I
> assume a replacement is being determined
>
> Next, I compiled NB 12.5 with jdk-11.0.11.9-hotspot. I sent all output to
> a file for a simple analysis.
>
> Here is the report when I searched for "rawtypes":
> Search "rawtypes" (5400 hits in 1 file of 1 searched)
>
> Second most common is deprecation:
> Search "deprecation" (5128 hits in 1 file of 1 searched)
>
> I was surprised to discover these issues. Generics have been in Java since
> 2004 but it appears that much of the NB code remains pre-generic, hence the
> rawtypes warning. Technically this is just an annoyance because generics
> are a compile time trick so failing to use generic-style syntax likely has
> little effect on the compiled code. It can obscure code that calls on a
> data structure with different arguments when it should not. Use <Object> if
> you need this functionality otherwise declare the types and get rid of
> these warnings.
>
> The deprecation messages are more worrisome. Sure, much of Date was
> deprecated probably 20 years ago but it is still around. JavaScript support
> was deprecated in 11 and gone in 15 hence being unable to compile NB with
> 16 or 17. Is there a 'deprecation' team that is tracking each of these 5128
> issues and a 'rawtypes' team cleaning up the generics issue? There may be
> more issues lurking in the compiler output.
>
>

Reply via email to