confluentinc / ide-sidecar

Sidecar application used by Confluent for VS Code, as a local proxy for Confluent Cloud, Confluent Platform and local Kafka clusters, to help users build streaming applications.
Apache License 2.0
3 stars 3 forks source link

Migrate from `javax` to `jakarta` packages #118

Open rhauch opened 2 weeks ago

rhauch commented 2 weeks ago

The primary reason to transition to Jakarta APIs from javax is due to the transfer of Java EE to the Eclipse Foundation, where it became Jakarta EE. The older javax packages within Java EE have been deprecated. Jakarta EE uses the jakarta namespace, which is incompatible with the legacy javax namespace. Mixing the two can cause issues. Several projects and frameworks… have already adopted Jakarta. Additionally, upgrading to Jakarta allows you to keep up with the latest changes and modernize your applications.

https://github.com/jakartaee/platform/blob/main/namespace/mappings.adoc#mapping-javax-to-jakarta

rhauch commented 2 weeks ago

I don't think we can do this yet because of these:

[INFO] Starting audit...
[ERROR] /Users/me/ide-sidecar/src/main/java/io/confluent/idesidecar/restapi/util/WebClientFactory.java:28:1: Illegal import - javax.net.ssl.TrustManagerFactory. [IllegalImport]
[ERROR] /Users/me/ide-sidecar/src/main/java/io/confluent/idesidecar/restapi/util/WebClientFactory.java:29:1: Illegal import - javax.net.ssl.X509TrustManager. [IllegalImport]
[ERROR] /Users/me/ide-sidecar/src/main/java/io/confluent/idesidecar/restapi/resources/OAuthCallbackResource.java:19:1: Illegal import - javax.net.ssl.SSLHandshakeException. [IllegalImport]
rhauch commented 2 weeks ago

We can do this by updating our checkstyle.xml file to contain:

<module name="Checker">
    <module name="TreeWalker">
        ...
        <module name="IllegalImport">
            <property name="illegalPkgs" value="javax"/>
        </module>
    </module>
</module>