Skip to content

Commit 7222478

Browse files
authored
Merge branch 'eclipse-jdt:master' into master
2 parents 14358e8 + 71b9865 commit 7222478

310 files changed

Lines changed: 11453 additions & 5047 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
build:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
with:
2525
submodules: recursive
2626
fetch-depth: 0

.github/workflows/rebase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout the latest code
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v5
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
1515
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

JCL/javax23api/src/javax/lang/model/util/Elements.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ boolean overrides(ExecutableElement overrider, ExecutableElement overridden,
177177
default boolean isAutomaticModule(ModuleElement module) {
178178
return false;
179179
}
180-
180+
default TypeElement getEnumConstantBody(VariableElement enumConstant) {
181+
switch(enumConstant.getKind()) {
182+
case ENUM_CONSTANT -> throw new UnsupportedOperationException();
183+
default -> throw new IllegalArgumentException("Argument not an enum constant");
184+
}
185+
}
181186
default RecordComponentElement recordComponentFor(ExecutableElement accessor) {
182187
if (accessor.getEnclosingElement().getKind() == ElementKind.RECORD) {
183188
for (RecordComponentElement rec : ElementFilter.recordComponentsIn(accessor.getEnclosingElement().getEnclosedElements())) {

Jenkinsfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ pipeline {
4949
// The following lines use the newest build on master that did not fail a reference
5050
// To not fail master build on failed test maven needs to be started with "-Dmaven.test.failure.ignore=true" it will then only marked unstable.
5151
// To not fail the build also "unstable: true" is used to only mark the build unstable instead of failing when qualityGates are missed
52-
// Also do not record mavenConsole() as failing tests are logged with ERROR duplicating the failure into the "Maven" plugin
5352
// To accept unstable builds (test errors or new warnings introduced by third party changes) as reference using "ignoreQualityGate:true"
5453
// To only show warnings related to the PR on a PR using "publishAllIssues:false"
55-
// The eclipse compiler name is changed because the logfile not only contains ECJ but also API warnings.
56-
// "pattern:" is used to collect warnings in dedicated files avoiding output of junit tests treated as warnings
57-
junit '**/target/surefire-reports/*.xml'
5854
discoverGitReferenceBuild referenceJob: 'eclipse.jdt.core-github/master'
59-
recordIssues publishAllIssues:false, ignoreQualityGate:true, tool: eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
55+
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/*.xml'
56+
recordIssues publishAllIssues: false, ignoreQualityGate: true, enabledForFailure: true, tools: [
57+
eclipse(name: 'Compiler', pattern: '**/target/compilelogs/*.xml'),
58+
issues(name: 'API Tools', id: 'apitools', pattern: '**/target/apianalysis/*.xml'),
59+
], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
60+
recordIssues tools: [javaDoc(), mavenConsole()]
6061
}
6162
}
6263
}

org.eclipse.jdt.annotation/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
33
Bundle-Name: %bundleName
44
Bundle-Localization: bundle
55
Bundle-SymbolicName: org.eclipse.jdt.annotation
6-
Bundle-Version: 2.3.100.qualifier
6+
Bundle-Version: 2.4.0.qualifier
77
Export-Package: org.eclipse.jdt.annotation
88
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
99
Bundle-Vendor: %providerName

org.eclipse.jdt.annotation/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<parent>
1515
<artifactId>eclipse.jdt.core</artifactId>
1616
<groupId>org.eclipse.jdt</groupId>
17-
<version>4.36.0-SNAPSHOT</version>
17+
<version>4.38.0-SNAPSHOT</version>
1818
</parent>
1919
<artifactId>org.eclipse.jdt.annotation</artifactId>
20-
<version>2.3.100-SNAPSHOT</version>
20+
<version>2.4.0-SNAPSHOT</version>
2121
<packaging>eclipse-plugin</packaging>
2222

2323
<build>

org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/DefaultLocation.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,21 @@ public enum DefaultLocation {
136136
* <code>null</code> (at any dimension).
137137
* </p>
138138
*/
139-
ARRAY_CONTENTS
139+
ARRAY_CONTENTS,
140+
141+
/**
142+
* Defines that a given {@link NonNullByDefault} annotation should affect all unannotated
143+
* record components within the scope of the annotated declaration.
144+
*
145+
* <h2>Example</h2>
146+
* <pre> @NonNullByDefault(RECORD_COMPONENT)
147+
* record Person(String name) {
148+
*
149+
* }</pre>
150+
* <p>
151+
* Here <code>String</code> will be interpreted as <code>@NonNull String</code>.
152+
* </p>
153+
* @since 2.4
154+
*/
155+
RECORD_COMPONENT,
140156
}

org.eclipse.jdt.annotation/src/org/eclipse/jdt/annotation/NonNullByDefault.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import static org.eclipse.jdt.annotation.DefaultLocation.FIELD;
1818
import static org.eclipse.jdt.annotation.DefaultLocation.PARAMETER;
19+
import static org.eclipse.jdt.annotation.DefaultLocation.RECORD_COMPONENT;
1920
import static org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPE;
2021
import static org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENT;
2122
import static org.eclipse.jdt.annotation.DefaultLocation.TYPE_BOUND;
@@ -69,5 +70,5 @@
6970
* @return the locations, or an empty array to cancel any null defaults from enclosing scopes
7071
* @since 2.0
7172
*/
72-
DefaultLocation[] value() default { PARAMETER, RETURN_TYPE, FIELD, TYPE_BOUND, TYPE_ARGUMENT };
73+
DefaultLocation[] value() default { PARAMETER, RETURN_TYPE, FIELD, TYPE_BOUND, TYPE_ARGUMENT, RECORD_COMPONENT };
7374
}

org.eclipse.jdt.apt.pluggable.tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<parent>
1616
<artifactId>tests-pom</artifactId>
1717
<groupId>org.eclipse.jdt</groupId>
18-
<version>4.36.0-SNAPSHOT</version>
18+
<version>4.38.0-SNAPSHOT</version>
1919
<relativePath>../tests-pom/</relativePath>
2020
</parent>
2121
<artifactId>org.eclipse.jdt.apt.pluggable.tests</artifactId>

org.eclipse.jdt.apt.tests/forceQualifierUpdate.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Bug 420446 - APT tests don't run
44
Bug 566471 - I20200828-0150 - Comparator Errors Found
55
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1184
66
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1659
7-
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1923
7+
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1923
8+
https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1090

0 commit comments

Comments
 (0)