Skip to content

Commit b1e90b5

Browse files
authored
Updating to javaparser parent 3.26.2
2 parents 5206fc9 + d2ad731 commit b1e90b5

File tree

102 files changed

+6574
-844
lines changed

Some content is hidden

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

102 files changed

+6574
-844
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Check codegen and formatting
2+
3+
#on: [push, pull_request]
4+
#on: [pull_request]
5+
on:
6+
# Trigger the workflow on push to master (ignoring .md only changes)
7+
push:
8+
branches:
9+
- master
10+
paths-ignore:
11+
- '**.md'
12+
13+
# Trigger the workflow on any pull_request (ignoring .md only changes)
14+
pull_request:
15+
paths-ignore:
16+
- '**.md'
17+
18+
# Enable manual triggering (important for contributors to enable a check on their fork)
19+
workflow_dispatch:
20+
21+
# If a build is running in the current branch, and the branch is updated, we cancel the previous build and start
22+
# a new one with the updated changes.
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
# Run checkstyle validations for pipeline
29+
checkstyle_check:
30+
name: Validate checkstyle
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout latest code
34+
uses: actions/[email protected]
35+
with:
36+
fetch-depth: "0"
37+
- name: Set up JDK 11
38+
uses: actions/setup-java@v4
39+
with:
40+
java-version: '11'
41+
distribution: 'zulu'
42+
- name: Validate Project Checkstyle
43+
run: ./mvnw -B checkstyle:check
44+
45+
spotless_check:
46+
name: Spotless check
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout latest code
50+
uses: actions/[email protected]
51+
with:
52+
fetch-depth: "0"
53+
- name: Set up JDK 11
54+
uses: actions/setup-java@v4
55+
with:
56+
java-version: '11'
57+
distribution: 'zulu'
58+
- name: Generate code and format
59+
run: |
60+
./run_core_metamodel_generator.sh
61+
# ./run_core_generators.sh automatically runs ./mvnw spotless:apply
62+
./run_core_generators.sh
63+
git diff --exit-code

.github/workflows/maven_tests.yml

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ jobs:
3535
## Different JDK versions have different implementations etc. -- test on all combinations (ideally 8 to latest).
3636
### exclude pre-8 (min development version jdk8)
3737
# typetools: Exclude 10 because of crashes in the compiler, exclude others because they aren't found
38-
jdk: [ 8,11,13,15,16,17 ]
38+
jdk: [ 8,11,13,15,16,17,18 ]
39+
# The below configurations are no longer available on github runners and is not supported by the
40+
# setup-java action, nor are they available from the supported distributions.
41+
# See https://github.com/actions/setup-java for details
42+
exclude:
43+
- os: macos-latest
44+
jdk: 9
45+
- os: macos-latest
46+
jdk: 10
47+
- os: macos-latest
48+
jdk: 12
49+
- os: macos-latest
50+
jdk: 14
51+
52+
>>>>>>> 0ed19322f8efcf13ca541673cbe3f60a605af32c
3953
env:
4054
OS: ${{ matrix.os }}
4155
JDK: ${{ matrix.jdk }}
@@ -102,40 +116,3 @@ jobs:
102116
verbose: false # optional (default = false):
103117
flags: javaparser-symbol-solver,AlsoSlowTests,${{ matrix.os }},jdk-${{ matrix.jdk }}
104118
env_vars: OS,JDK
105-
106-
# Run checkstyle validations for pipeline
107-
checkstyle_check:
108-
name: Validate checkstyle
109-
runs-on: ubuntu-latest
110-
steps:
111-
- name: Checkout latest code
112-
uses: actions/[email protected]
113-
with:
114-
fetch-depth: "0"
115-
- name: Set up JDK 11
116-
uses: actions/setup-java@v4
117-
with:
118-
java-version: '11'
119-
distribution: 'zulu'
120-
- name: Validate Project Checkstyle
121-
run: ./mvnw -B checkstyle:check
122-
123-
spotless_check:
124-
name: Validate code generation and formatting
125-
runs-on: ubuntu-latest
126-
steps:
127-
- name: Checkout latest code
128-
uses: actions/[email protected]
129-
with:
130-
fetch-depth: "0"
131-
- name: Set up JDK 11
132-
uses: actions/setup-java@v4
133-
with:
134-
java-version: '11'
135-
distribution: 'zulu'
136-
- name: Generate code and format
137-
run: |
138-
./run_core_metamodel_generator.sh
139-
# ./run_core_generators.sh automatically runs ./mvnw spotless:apply
140-
./run_core_generators.sh
141-
git diff --exit-code

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717
wrapperVersion=3.3.2
1818
distributionType=only-script
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

CONTRIBUTING.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,51 @@ Our development workflow is based on Pull Request. If you are not familiar with
2929
- Pull requests often stay open for at least a few days to give people a chance to review it.
3030
- A pull request is merged when all comments on it have been resolved.
3131
- If you create a pull request for an issue, mention the issue in the format #123 to make github link it automatically.
32-
- Before submitting a pull request, please run `./mvnw spotless:apply` to format your code to avoid any formatting related issues during review.
32+
- Before creating a commit (or at least before submitting a pull request), please reformat the project with the instructions given below
33+
to avoid any formatting-related issues during the review.
34+
35+
### Note on formatting the project:
36+
37+
- If you are developing on a machine with bash installed, execute `./run_core_metamodel_generator.sh && ./run_core_generators.sh`. This
38+
will re-run all of the code generators and then re-format the entire project as a final step. This ensures that:
39+
- All the code that needs to be generated has been generated correctly.
40+
- None of the changes you've added will be overwritten by code generation in the future.
41+
- All of your changes are correctly formatted (including changes made during code generation, for example whitespace changes).
42+
43+
The PR check for style runs these generators and checks that the diff after doing so is empty, so if you've run this on your machine,
44+
then that check should not fail.
45+
46+
- If you are developing on a machine without bash, execute `./mvnw spotless:apply`. This will re-format the project, but without
47+
running the code generators. This will be sufficient in many cases, but it's still possible that changes are introduced during
48+
code generation which would cause the PR style check to fail. If this happens, some manual changes are required.
49+
50+
To fix this:
51+
1. Go to the job output for the failed `Spotless check` job by clicking the red cross next to the job.
52+
2. Scroll to the bottom of the `Generate code and format` output tab.
53+
3. There, you will see output from the diff command showing what failed. For example, in https://github.com/javaparser/javaparser/actions/runs/10389076737/job/28766249645,
54+
that output is:
55+
```
56+
[INFO] ------------------------------------------------------------------------
57+
diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
58+
index 7bc7f46b9..429889e35 100644
59+
--- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
60+
+++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/RecordPatternExpr.java
61+
@@ -17,7 +17,6 @@
62+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63+
* GNU Lesser General Public License for more details.
64+
*/
65+
-
66+
package com.github.javaparser.ast.expr;
67+
68+
import static com.github.javaparser.utils.Utils.assertNotNull;
69+
Error: Process completed with exit code 1.
70+
```
71+
72+
4. Verify that this output does not overwrite any code you wrote which would change the behaviour. If it does, you probably implemented
73+
something manually when it should've been generated and this will be overwritten next time the code generators are run. This requires
74+
a manual fix to your code to prevent issues in the future.
75+
5. If no major issues are found, copy this output, excluding the `[INFO] --...` line and the `Error: Process complete with exit code 1.`
76+
line and paste that into a patch file (for example, `/tmp/style.patch`, but the name and location aren't important).
77+
6. From the javaparser project directory, run `git apply /tmp/style.patch` (substituting `/tmp/style.patch` for the path of your
78+
patch file). `git status` should now show that all the files mentioned in the patch are modified.
79+
7. Add and commit the changes and push to update the PR.

changelog.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
Next Release (Version 3.26.2-snapshot)
2+
Next Release (Version 3.26.3-snapshot)
33
--------------------------------------
4-
[issues resolved](https://github.com/javaparser/javaparser/milestone/209?closed=1)
4+
[issues resolved](https://github.com/javaparser/javaparser/milestone/210?closed=1)
55

66
### Added
77
### Changed
@@ -10,6 +10,53 @@ Next Release (Version 3.26.2-snapshot)
1010
### Fixed
1111
### Security
1212

13+
Version 3.26.2
14+
--------------
15+
[issues resolved](https://github.com/javaparser/javaparser/milestone/209?closed=1)
16+
17+
18+
### Changed
19+
20+
* Move formatting workflows into separate file (PR [#4480](https://github.com/javaparser/javaparser/pull/4480) by [@johannescoetzee](https://github.com/johannescoetzee))
21+
* Exclude unavailable macos <-> java version combinations from github tests (PR [#4479](https://github.com/javaparser/javaparser/pull/4479) by [@johannescoetzee](https://github.com/johannescoetzee))
22+
23+
### Fixed
24+
25+
* Fixes #4526. Fix Node.PostOrderIterator for roots without children (PR [#4538](https://github.com/javaparser/javaparser/pull/4538) by [@ktul](https://github.com/ktul))
26+
* Add missing copyright notice to RecordPatternExpr.java (PR [#4527](https://github.com/javaparser/javaparser/pull/4527) by [@johannescoetzee](https://github.com/johannescoetzee))
27+
* Add missing type erasure in ClassOrInterfaceType.toDescriptor (PR [#4522](https://github.com/javaparser/javaparser/pull/4522) by [@johanneskloos](https://github.com/johanneskloos))
28+
* Allow primitive types for patterns (PR [#4506](https://github.com/javaparser/javaparser/pull/4506) by [@johannescoetzee](https://github.com/johannescoetzee))
29+
* Fix project formatting (PR [#4499](https://github.com/javaparser/javaparser/pull/4499) by [@johannescoetzee](https://github.com/johannescoetzee))
30+
* Fix: issue 4492 resolve LambdaExpr has NullPointException (PR [#4497](https://github.com/javaparser/javaparser/pull/4497) by [@jlerbsc](https://github.com/jlerbsc))
31+
* Fix: issue 2738 UnsolvedSymbolException while trying to ResolvedMethodDeclaration from MethodCallExpr (PR [#4482](https://github.com/javaparser/javaparser/pull/4482) by [@jlerbsc](https://github.com/jlerbsc))
32+
33+
### Developer Changes
34+
35+
* fix(deps): update byte-buddy.version to v1.15.1 (PR [#4547](https://github.com/javaparser/javaparser/pull/4547) by [@renovate[bot]](https://github.com/apps/renovate))
36+
* fix(deps): update byte-buddy.version to v1.15.0 (PR [#4543](https://github.com/javaparser/javaparser/pull/4543) by [@renovate[bot]](https://github.com/apps/renovate))
37+
* fix(deps): update dependency com.google.guava:guava to v33.3.0-jre (PR [#4532](https://github.com/javaparser/javaparser/pull/4532) by [@renovate[bot]](https://github.com/apps/renovate))
38+
* fix(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.14.19 (PR [#4531](https://github.com/javaparser/javaparser/pull/4531) by [@renovate[bot]](https://github.com/apps/renovate))
39+
* chore(deps): update junit5 monorepo to v5.11.0 (PR [#4528](https://github.com/javaparser/javaparser/pull/4528) by [@renovate[bot]](https://github.com/apps/renovate))
40+
* fix(deps): update byte-buddy.version to v1.14.18 (PR [#4493](https://github.com/javaparser/javaparser/pull/4493) by [@renovate[bot]](https://github.com/apps/renovate))
41+
* chore(deps): update actions/checkout action to v4.1.7 (PR [#4486](https://github.com/javaparser/javaparser/pull/4486) by [@renovate[bot]](https://github.com/apps/renovate))
42+
* chore(deps): update actions/checkout action to v4.0.0 (PR [#4485](https://github.com/javaparser/javaparser/pull/4485) by [@renovate[bot]](https://github.com/apps/renovate))
43+
* chore(deps): update junit5 monorepo to v5.10.3 (PR [#4483](https://github.com/javaparser/javaparser/pull/4483) by [@renovate[bot]](https://github.com/apps/renovate))
44+
45+
### Uncategorised
46+
47+
* Add better instructions for re-formatting the project (PR [#4540](https://github.com/javaparser/javaparser/pull/4540) by [@johannescoetzee](https://github.com/johannescoetzee))
48+
49+
### :heart: Contributors
50+
51+
Thank You to all contributors who worked on this release!
52+
53+
* [@johanneskloos](https://github.com/johanneskloos)
54+
* [@ktul](https://github.com/ktul)
55+
* [@johannescoetzee](https://github.com/johannescoetzee)
56+
* [@kamilkrzywanski](https://github.com/kamilkrzywanski)
57+
* [@jlerbsc](https://github.com/jlerbsc)
58+
59+
1360
Version 3.26.1
1461
--------------
1562
[issues resolved](https://github.com/javaparser/javaparser/milestone/208?closed=1)

javaparser-core-generators/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>javaparser-parent</artifactId>
55
<groupId>com.github.javaparser</groupId>
6-
<version>3.26.1</version>
6+
<version>3.26.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

javaparser-core-metamodel-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>javaparser-parent</artifactId>
55
<groupId>com.github.javaparser</groupId>
6-
<version>3.26.1</version>
6+
<version>3.26.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

javaparser-core-serialization/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<artifactId>javaparser-parent</artifactId>
44
<groupId>com.github.javaparser</groupId>
5-
<version>3.26.1</version>
5+
<version>3.26.2</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>org.eclipse.parsson</groupId>
6565
<artifactId>parsson</artifactId>
66-
<version>1.1.6</version>
66+
<version>1.1.7</version>
6767
<scope>test</scope>
6868
</dependency>
6969
</dependencies>

javaparser-core-testing-bdd/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<artifactId>javaparser-parent</artifactId>
44
<groupId>com.github.javaparser</groupId>
5-
<version>3.26.1</version>
5+
<version>3.26.2</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

javaparser-core-testing/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<artifactId>javaparser-parent</artifactId>
44
<groupId>com.github.javaparser</groupId>
5-
<version>3.26.1</version>
5+
<version>3.26.2</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

@@ -125,7 +125,7 @@
125125
<dependency>
126126
<groupId>org.assertj</groupId>
127127
<artifactId>assertj-core</artifactId>
128-
<version>3.26.0</version>
128+
<version>3.26.3</version>
129129
<scope>test</scope>
130130
</dependency>
131131
<dependency>

0 commit comments

Comments
 (0)