Since version 6.0.0
of the Java analyzer (December 2019), the parsing of java source files is done using the Eclipse Compiler for Java (ECJ), itself shipped as part of the eclipse JDT Core project from the eclipse foundation.
Ultimately, this means that the java analyzer's capacity to parse a given version of Java depends merely on the capacity of the eclipse compiler itself to parse this version. In other words, the support of new versions of java depends on the release lifecycle of the JDT.
Embedding JDT into sonar-javaThe core part of Eclipse's Java Development Tools (JDT-core) is developed for its own purpose inside the eclipse IDE: compiling code and providing warnings in the IDE. In order to write the sonar-java static analyzer, independent from eclipse, we need to be able to access some parts of the eclipse compiler that are not exposed. Consequently, the sonar-java project contains a dedicated module whose responsibility is to shade a given version of JDT and embed it into the sonar-java project. See sonar-java/jdt/pom.xml.
4.25
of eclipse (2022-09) embeds JDT-core 3.31
.The Java release pace increased over the past years, reaching a state where a new version of the language is released every 6 months: in March and September. The release dates can be found here: java.com/releases/.
As a consequence, releases of eclipse happening in March and September are usually conflicting schedule with the release of a new Java version. The eclipse foundation releasing BEFORE java, causing a lag: They release a new version of eclipse WITHOUT support of the java version which has just been released. Consequently, only the next version of eclipse will embed the support of the new version of java. On the sonar-java analyzer side, this means that we can not offer our users the support of the new java version immediately after its release. We have to wait 3 months (minimum) for the next eclipse version.
Example of release lag:
From September 20th until December 7th, we wait for the official support for Java 19.
Supporting a new version of Java once supported by JDT-coreTODO
Support not yet released but already part of jdt-core code?https://github.com/eclipse-jdt/eclipse.jdt.core
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator
Extracting SNAPSHOT dependencies in a local repositorylibs
└── org
└── eclipse
├── eclipse-platform-parent
│ └── 4.26.0-SNAPSHOT
│ └── eclipse-platform-parent-4.26.0-SNAPSHOT.pom
├── jdt
│ ├── eclipse.jdt.core
│ │ └── 4.26.0-SNAPSHOT
│ │ └── eclipse.jdt.core-4.26.0-SNAPSHOT.pom
│ └── org.eclipse.jdt.core
│ └── 3.32.0-SNAPSHOT
│ ├── org.eclipse.jdt.core-3.32.0-SNAPSHOT-antadapter.jar
│ ├── org.eclipse.jdt.core-3.32.0-SNAPSHOT-batch-compiler.jar
│ ├── org.eclipse.jdt.core-3.32.0-SNAPSHOT-batch-compiler-src.jar
│ ├── org.eclipse.jdt.core-3.32.0-SNAPSHOT.jar
│ ├── org.eclipse.jdt.core-3.32.0-SNAPSHOT.pom
│ └── org.eclipse.jdt.core-3.32.0-SNAPSHOT-sources.jar
└── platform
├── eclipse.platform
│ └── 4.26.0-SNAPSHOT
│ └── eclipse.platform-4.26.0-SNAPSHOT.pom
├── eclipse.platform.resources
│ └── 4.26.0-SNAPSHOT
│ └── eclipse.platform.resources-4.26.0-SNAPSHOT.pom
├── eclipse.platform.runtime
│ └── 4.26.0-SNAPSHOT
│ └── eclipse.platform.runtime-4.26.0-SNAPSHOT.pom
├── eclipse.platform.text
│ └── 4.26.0-SNAPSHOT
│ └── eclipse.platform.text-4.26.0-SNAPSHOT.pom
├── org.eclipse.core.contenttype
│ └── 3.8.200-SNAPSHOT
│ ├── org.eclipse.core.contenttype-3.8.200-SNAPSHOT.jar
│ ├── org.eclipse.core.contenttype-3.8.200-SNAPSHOT.pom
│ └── org.eclipse.core.contenttype-3.8.200-SNAPSHOT-sources.jar
├── org.eclipse.core.jobs
│ └── 3.13.200-SNAPSHOT
│ ├── org.eclipse.core.jobs-3.13.200-SNAPSHOT.jar
│ ├── org.eclipse.core.jobs-3.13.200-SNAPSHOT.pom
│ └── org.eclipse.core.jobs-3.13.200-SNAPSHOT-sources.jar
├── org.eclipse.core.resources
│ └── 3.18.100-SNAPSHOT
│ ├── org.eclipse.core.resources-3.18.100-SNAPSHOT.jar
│ ├── org.eclipse.core.resources-3.18.100-SNAPSHOT.pom
│ └── org.eclipse.core.resources-3.18.100-SNAPSHOT-sources.jar
├── org.eclipse.core.runtime
│ └── 3.26.100-SNAPSHOT
│ ├── org.eclipse.core.runtime-3.26.100-SNAPSHOT.jar
│ ├── org.eclipse.core.runtime-3.26.100-SNAPSHOT.pom
│ └── org.eclipse.core.runtime-3.26.100-SNAPSHOT-sources.jar
├── org.eclipse.equinox.common
│ └── 3.16.200
│ ├── org.eclipse.equinox.common-3.16.200.jar
│ ├── org.eclipse.equinox.common-3.16.200.pom
│ └── org.eclipse.equinox.common-3.16.200-sources.jar
├── org.eclipse.equinox.preferences
│ └── 3.10.100
│ ├── org.eclipse.equinox.preferences-3.10.100.jar
│ ├── org.eclipse.equinox.preferences-3.10.100.pom
│ └── org.eclipse.equinox.preferences-3.10.100-sources.jar
├── org.eclipse.osgi
│ └── 3.18.100
│ ├── org.eclipse.osgi-3.18.100.jar
│ ├── org.eclipse.osgi-3.18.100.pom
│ └── org.eclipse.osgi-3.18.100-sources.jar
├── org.eclipse.text
│ └── 3.12.300-SNAPSHOT
│ ├── org.eclipse.text-3.12.300-SNAPSHOT.jar
│ ├── org.eclipse.text-3.12.300-SNAPSHOT.pom
│ └── org.eclipse.text-3.12.300-SNAPSHOT-sources.jar
├── resources-bundles
│ └── 4.26.0-SNAPSHOT
│ └── resources-bundles-4.26.0-SNAPSHOT.pom
└── runtime-bundles
└── 4.26.0-SNAPSHOT
└── runtime-bundles-4.26.0-SNAPSHOT.pom
Updating JParser, adding tests etc.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4