Skip to content

Commit 035113d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
# By jlerbsc (10) and Udo Borkowski (1) # Via GitHub (12) and jlerbsc (1) * upstream/master: Minor refactoring for example to get all parameter types feat: Improved support for calculating the type of an object creation expression in MethodReferenceExpr Add header and footer methods in comments instead of using literal strings in multiple places in the code Fix: Method hasScope must return true on NodeWithOptionalScope and NodeWithOptionalScope if scope is present Solve checkstyle issues In the context of lexical preservation, the CSM token must be added manually only for new comments fix javaparser#3859 UnsupportedOperationException when trying to resolve a type in an argument Fix: checkstyle unused import Refactoring: remove useless code that is already implemented Fix: issue 3866 Symbol solver is unable to resolve inner classes of ancestors when they are prefixed with a subclass Fix: issue 3703 Allow removing empty parentheses after removing all pairs from an annotation # Conflicts: # javaparser-core/src/main/java/com/github/javaparser/ast/comments/Comment.java # javaparser-core/src/main/java/com/github/javaparser/printer/DefaultPrettyPrinterVisitor.java # javaparser-core/src/main/java/com/github/javaparser/printer/PrettyPrintVisitor.java # javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/JavaParserFacade.java # javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/TypeExtractor.java
2 parents 5bb3de8 + 3c7be13 commit 035113d

File tree

3,808 files changed

+250477
-227520
lines changed

Some content is hidden

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

3,808 files changed

+250477
-227520
lines changed

.github/renovate.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
],
55
"packageRules": [
66
{
7-
"updateTypes": ["minor", "patch", "pin", "digest"],
7+
"updateTypes": [
8+
"minor",
9+
"patch",
10+
"pin",
11+
"digest"
12+
],
813
"automerge": true
914
}
1015
],
@@ -13,5 +18,7 @@
1318
"semanticCommits": true,
1419
"dependencyDashboard": true,
1520
"configWarningReuseIssue": false,
16-
"labels": ["dependencies"]
21+
"labels": [
22+
"dependencies"
23+
]
1724
}

.github/workflows/create_github_release.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
tag_name: ${{ github.ref }}
2727
release_name: Release ${{ github.ref }}
2828
## Body content doesn't yet seem to appear in the Github UI
29-
# body: |
30-
# Bug Fixes:
31-
# - TODO: Describe any bug fixes
32-
#
33-
# Enhancements:
34-
# - TODO: Describe any new features or enhancements
29+
# body: |
30+
# Bug Fixes:
31+
# - TODO: Describe any bug fixes
32+
#
33+
# Enhancements:
34+
# - TODO: Describe any new features or enhancements
3535
## Option -- trigger as a draft release, followed by the addition of any key release notes and manual approval?
3636
## Alternative -- replace the above body with a link to the changelog? We can always edit release after the fact to add in e.g. notes about breaking changes.
3737
draft: true

.github/workflows/prepare_release_changelog.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build Snapshot
22
on:
33
workflow_dispatch:
44

5-
#on:
6-
# push:
7-
# branches: [] #[ master ]
5+
#on:
6+
# push:
7+
# branches: [] #[ master ]
88
## (testing only) Trigger the workflow on any pull request
99
#pull_request:
1010

.mvn/wrapper/MavenWrapperDownloader.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
import java.net.*;
1718
import java.io.*;
1819
import java.nio.channels.*;
@@ -25,7 +26,7 @@ public class MavenWrapperDownloader {
2526
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
2627
*/
2728
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
28-
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
29+
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
2930

3031
/**
3132
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
@@ -54,7 +55,7 @@ public static void main(String args[]) {
5455
// wrapperUrl parameter.
5556
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
5657
String url = DEFAULT_DOWNLOAD_URL;
57-
if(mavenWrapperPropertyFile.exists()) {
58+
if (mavenWrapperPropertyFile.exists()) {
5859
FileInputStream mavenWrapperPropertyFileInputStream = null;
5960
try {
6061
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
@@ -65,7 +66,7 @@ public static void main(String args[]) {
6566
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
6667
} finally {
6768
try {
68-
if(mavenWrapperPropertyFileInputStream != null) {
69+
if (mavenWrapperPropertyFileInputStream != null) {
6970
mavenWrapperPropertyFileInputStream.close();
7071
}
7172
} catch (IOException e) {
@@ -76,8 +77,8 @@ public static void main(String args[]) {
7677
System.out.println("- Downloading from: " + url);
7778

7879
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
79-
if(!outputFile.getParentFile().exists()) {
80-
if(!outputFile.getParentFile().mkdirs()) {
80+
if (!outputFile.getParentFile().exists()) {
81+
if (!outputFile.getParentFile().mkdirs()) {
8182
System.out.println(
8283
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
8384
}

.run/CoreGenerator.run.xml

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="CoreGenerator" type="Application" factoryName="Application" nameIsGenerated="true">
3-
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.generator.core.CoreGenerator" />
4-
<module name="jmlparser-core-generators" />
5-
<option name="PROGRAM_PARAMETERS" value="$ContentRoot$" />
6-
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/javaparser-core-metamodel-generator" />
7-
<extension name="coverage">
8-
<pattern>
9-
<option name="PATTERN" value="com.github.javaparser.generator.metamodel.*" />
10-
<option name="ENABLED" value="true" />
11-
</pattern>
12-
</extension>
13-
<method v="2">
14-
<option name="Make" enabled="true" />
15-
</method>
16-
</configuration>
2+
<configuration default="false" name="CoreGenerator" type="Application" factoryName="Application"
3+
nameIsGenerated="true">
4+
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.generator.core.CoreGenerator"/>
5+
<module name="jmlparser-core-generators"/>
6+
<option name="PROGRAM_PARAMETERS" value="$ContentRoot$"/>
7+
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/javaparser-core-metamodel-generator"/>
8+
<extension name="coverage">
9+
<pattern>
10+
<option name="PATTERN" value="com.github.javaparser.generator.metamodel.*"/>
11+
<option name="ENABLED" value="true"/>
12+
</pattern>
13+
</extension>
14+
<method v="2">
15+
<option name="Make" enabled="true"/>
16+
</method>
17+
</configuration>
1718
</component>

.run/Example.run.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="Example" type="Application" factoryName="Application" nameIsGenerated="true">
3-
<option name="ALTERNATIVE_JRE_PATH" value="15"/>
4-
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.jml.Example"/>
5-
<module name="jmlparser-core"/>
6-
<method v="2">
7-
<option name="Make" enabled="true"/>
8-
</method>
9-
</configuration>
2+
<configuration default="false" name="Example" type="Application" factoryName="Application" nameIsGenerated="true">
3+
<option name="ALTERNATIVE_JRE_PATH" value="15"/>
4+
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.jml.Example"/>
5+
<module name="jmlparser-core"/>
6+
<method v="2">
7+
<option name="Make" enabled="true"/>
8+
</method>
9+
</configuration>
1010
</component>

.run/MetaModelGenerator.run.xml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="MetaModelGenerator" type="Application" factoryName="Application"
3-
nameIsGenerated="true">
4-
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.generator.metamodel.MetaModelGenerator"/>
5-
<module name="jmlparser-core-metamodel-generator"/>
6-
<option name="PROGRAM_PARAMETERS" value="$PROJECT_DIR$/javaparser-core-metamodel-generator"/>
7-
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/javaparser-core-metamodel-generator"/>
8-
<method v="2">
9-
<option name="Make" enabled="true"/>
10-
</method>
11-
</configuration>
2+
<configuration default="false" name="MetaModelGenerator" type="Application" factoryName="Application"
3+
nameIsGenerated="true">
4+
<option name="MAIN_CLASS_NAME" value="com.github.javaparser.generator.metamodel.MetaModelGenerator"/>
5+
<module name="jmlparser-core-metamodel-generator"/>
6+
<option name="PROGRAM_PARAMETERS" value="$PROJECT_DIR$/javaparser-core-metamodel-generator"/>
7+
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/javaparser-core-metamodel-generator"/>
8+
<method v="2">
9+
<option name="Make" enabled="true"/>
10+
</method>
11+
</configuration>
1212
</component>

CONTRIBUTING.md

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
11
## Getting started
2+
23
Here is some information that's good to know when contributing to JavaParser:
34

45
- There is some interesting information on the [wiki](https://github.com/javaparser/javaparser/wiki).
5-
- We work on JavaParser because we like to, not because it earns us money. Please remember that we try to run a professional project in our spare time, on a budget of zero.
6-
- Be sure to check [the coding guidelines](https://github.com/javaparser/javaparser/wiki/Coding-Guidelines) which are easily used by installing the formatting rules as described there.
7-
- If you're new and like to casually contribute something, check out the [easy issues](https://github.com/javaparser/javaparser/labels/Easy).
6+
- We work on JavaParser because we like to, not because it earns us money. Please remember that we try to run a
7+
professional project in our spare time, on a budget of zero.
8+
- Be sure to check [the coding guidelines](https://github.com/javaparser/javaparser/wiki/Coding-Guidelines) which are
9+
easily used by installing the formatting rules as described there.
10+
- If you're new and like to casually contribute something, check out
11+
the [easy issues](https://github.com/javaparser/javaparser/labels/Easy).
812
- If you're new and would like to become a member, start your own project that uses JavaParser.
9-
We noticed we get the best feedback from those.
10-
Here are [some fun project ideas](https://github.com/javaparser/javaparser/labels/fun%20project%20idea).
13+
We noticed we get the best feedback from those.
14+
Here are [some fun project ideas](https://github.com/javaparser/javaparser/labels/fun%20project%20idea).
1115
- If you start working on an issue, please say so with a comment in the issue.
1216
- If you know how to fix a problem, please fix it and open a pull request instead of opening an issue.
1317

1418
Thanks for helping!
1519

1620
## Contribution Workflow
1721

18-
Our development workflow is based on Pull Request. If you are not familiar with the Pull Requests, we suggest you to checkout the [Github Documentation](https://help.github.com/articles/creating-a-pull-request/) for more information.
22+
Our development workflow is based on Pull Request. If you are not familiar with the Pull Requests, we suggest you to
23+
checkout the [Github Documentation](https://help.github.com/articles/creating-a-pull-request/) for more information.
1924

2025
1. **Fork** the JavaParser project. If you already have a fork, ensure to fetch the latest commits.
21-
2. In your forked project, **create a branch** related to the issue you are working on. This is important to ensure that your pull request will not contain unrelated work.
26+
2. In your forked project, **create a branch** related to the issue you are working on. This is important to ensure that
27+
your pull request will not contain unrelated work.
2228
3. When your work in your branch is done, **push your branch to your forked repository**.
23-
4. Go back to the [javaparser project site](https://github.com/javaparser/javaparser) and it should have a message offering to **create a pull request**. If it doesn't you can [create one manually](https://github.com/javaparser/javaparser/compare).
29+
4. Go back to the [javaparser project site](https://github.com/javaparser/javaparser) and it should have a message
30+
offering to **create a pull request**. If it doesn't you
31+
can [create one manually](https://github.com/javaparser/javaparser/compare).
2432

2533
### Remember:
34+
2635
- A pull request should include tests. You can either use BDD or JUnit.
2736
- Every pull request will automatically be checked by a few tools. Make sure AppVeyor and Travis are green.
2837
- Pull requests often stay open for at least a few days to give people a chance to review it.

0 commit comments

Comments
 (0)