Skip to content

Commit ef1e1a1

Browse files
authored
Merge pull request #109 from smillst/updating-javaparser-parent-3.25.1
Updating to JavaParser 3.25.1
2 parents 10d92da + 68f3857 commit ef1e1a1

File tree

57 files changed

+1443
-367
lines changed

Some content is hidden

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

57 files changed

+1443
-367
lines changed

.mvn/wrapper/maven-wrapper.jar

1.17 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

changelog.md

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

2-
Next Release (Version 3.25.1)
2+
Next Release (Version 3.25.2-snapshot)
33
------------------
4-
[issues resolved](https://github.com/javaparser/javaparser/milestone/197?closed=1)
4+
[issues resolved](https://github.com/javaparser/javaparser/milestone/198?closed=1)
55

66
### Added
77
### Changed
@@ -11,6 +11,50 @@ Next Release (Version 3.25.1)
1111
### Security
1212

1313

14+
15+
Version 3.25.1
16+
--------------
17+
[issues resolved](https://github.com/javaparser/javaparser/milestone/197?closed=1)
18+
19+
### API or Behaviour Change
20+
21+
* Fix: Issue 3045 Unexpected exception when solving type inside an Anonymous class (PR [#3896](https://github.com/javaparser/javaparser/pull/3896) by [@jlerbsc](https://github.com/jlerbsc))
22+
23+
### Added
24+
25+
* Improved search for functional interfaces (PR [#3894](https://github.com/javaparser/javaparser/pull/3894) by [@jlerbsc](https://github.com/jlerbsc))
26+
27+
### Changed
28+
29+
* chore(deps): bump maven-compiler-plugin from 3.10.1 to 3.11.0 (PR [#3928](https://github.com/javaparser/javaparser/pull/3928) by [@dependabot[bot]](https://github.com/apps/dependabot))
30+
* chore(deps): bump checkstyle from 10.7.0 to 10.8.0 (PR [#3927](https://github.com/javaparser/javaparser/pull/3927) by [@dependabot[bot]](https://github.com/apps/dependabot))
31+
* chore(deps): bump versions-maven-plugin from 2.14.2 to 2.15.0 (PR [#3914](https://github.com/javaparser/javaparser/pull/3914) by [@dependabot[bot]](https://github.com/apps/dependabot))
32+
* chore(deps): bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (PR [#3906](https://github.com/javaparser/javaparser/pull/3906) by [@dependabot[bot]](https://github.com/apps/dependabot))
33+
* Refactor: cleanup/refactor code after fixing #3859 (PR [#3886](https://github.com/javaparser/javaparser/pull/3886) by [@abego](https://github.com/abego))
34+
35+
### Fixed
36+
37+
* Fix: issue 3924 Removing ImportDeclaration with Annotated package thr… (PR [#3926](https://github.com/javaparser/javaparser/pull/3926) by [@jlerbsc](https://github.com/jlerbsc))
38+
* Fix: issue 3918 JavaParserTypeDeclarationAdapter resolving wrong Type via Ancestor (PR [#3921](https://github.com/javaparser/javaparser/pull/3921) by [@jlerbsc](https://github.com/jlerbsc))
39+
* Fix: issue 3919 ResolvedType::isAssignableBy(ResolvedType) is wrong f… (PR [#3920](https://github.com/javaparser/javaparser/pull/3920) by [@jlerbsc](https://github.com/jlerbsc))
40+
* Fix: issue 3911 java.lang.UnsupportedOperationException: T[] while resolving generic method with type parameter with arrays like List<T[]> (PR [#3917](https://github.com/javaparser/javaparser/pull/3917) by [@jlerbsc](https://github.com/jlerbsc))
41+
* Fix: \s escape gives lexical error but should be valid since Java 15 (PR [#3903](https://github.com/javaparser/javaparser/pull/3903) by [@jlerbsc](https://github.com/jlerbsc))
42+
* Fix: Issue 3045 Unexpected exception when solving type inside an Anonymous class (PR [#3896](https://github.com/javaparser/javaparser/pull/3896) by [@jlerbsc](https://github.com/jlerbsc))
43+
* Fix issue 1883 Finding lambda return type (PR [#3890](https://github.com/javaparser/javaparser/pull/3890) by [@jlerbsc](https://github.com/jlerbsc))
44+
* Fix: issue 1815 ArrayIndexOutOfBoundsException when resolving lambda parameter. This fix is offered by Blackgen (PR [#3888](https://github.com/javaparser/javaparser/pull/3888) by [@jlerbsc](https://github.com/jlerbsc))
45+
46+
### Developer Changes
47+
48+
* chore(deps): bump checkstyle from 10.6.0 to 10.7.0 (PR [#3885](https://github.com/javaparser/javaparser/pull/3885) by [@dependabot[bot]](https://github.com/apps/dependabot))
49+
50+
### :heart: Contributors
51+
52+
Thank You to all contributors who worked on this release!
53+
54+
* [@abego](https://github.com/abego)
55+
* [@jlerbsc](https://github.com/jlerbsc)
56+
57+
1458
Version 3.25.0
1559
--------------
1660

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.25.0</version>
6+
<version>3.25.1</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.25.0</version>
6+
<version>3.25.1</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

javaparser-core-serialization/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.25.0</version>
5+
<version>3.25.1</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

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.25.0</version>
5+
<version>3.25.1</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

javaparser-core-testing/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.25.0</version>
5+
<version>3.25.1</version>
66
</parent>
77
<modelVersion>4.0.0</modelVersion>
88

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (C) 2013-2023 The JavaParser Team.
3+
*
4+
* This file is part of JavaParser.
5+
*
6+
* JavaParser can be used either under the terms of
7+
* a) the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
* b) the terms of the Apache License
11+
*
12+
* You should have received a copy of both licenses in LICENCE.LGPL and
13+
* LICENCE.APACHE. Please refer to those files for details.
14+
*
15+
* JavaParser is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU Lesser General Public License for more details.
19+
*/
20+
21+
package com.github.javaparser;
22+
23+
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
24+
25+
import org.junit.jupiter.api.Test;
26+
27+
import com.github.javaparser.ParserConfiguration.LanguageLevel;
28+
29+
public class Issue3577Test {
30+
31+
@Test
32+
public void test() {
33+
String str = "public class MyClass {\n"
34+
+ " public static void main(String args[]) {\n"
35+
+ " System.out.println(\"Hello\\sWorld\");\n"
36+
+ " }\n"
37+
+ "}";
38+
39+
ParserConfiguration config = new ParserConfiguration().setLanguageLevel(LanguageLevel.JAVA_15);
40+
StaticJavaParser.setConfiguration(config);
41+
42+
assertDoesNotThrow(() -> StaticJavaParser.parse(str));
43+
// unitOpt.getProblems().stream().forEach(p -> System.err.println(p.toString()));
44+
}
45+
46+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
3+
* Copyright (C) 2011, 2013-2023 The JavaParser Team.
4+
*
5+
* This file is part of JavaParser.
6+
*
7+
* JavaParser can be used either under the terms of
8+
* a) the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
* b) the terms of the Apache License
12+
*
13+
* You should have received a copy of both licenses in LICENCE.LGPL and
14+
* LICENCE.APACHE. Please refer to those files for details.
15+
*
16+
* JavaParser is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*/
21+
22+
package com.github.javaparser.ast.nodeTypes;
23+
24+
import com.github.javaparser.ast.expr.Expression;
25+
import com.github.javaparser.ast.expr.MethodCallExpr;
26+
import com.github.javaparser.printer.lexicalpreservation.AbstractLexicalPreservingTest;
27+
import org.junit.jupiter.api.Test;
28+
29+
import static com.github.javaparser.ast.expr.Expression.EXCLUDE_ENCLOSED_EXPR;
30+
import static org.junit.jupiter.api.Assertions.assertEquals;
31+
32+
class NodeWithArgumentsTest extends AbstractLexicalPreservingTest {
33+
34+
@Test
35+
void testGetArgumentPosition() {
36+
considerCode("" +
37+
"class Foo {\n" +
38+
" Map<Integer,String> map = new HashMap<>();\n" +
39+
" public String bar(int i) {\n" +
40+
" return map.put(((i)),((\"baz\")));\n" +
41+
" } \n" +
42+
"}");
43+
MethodCallExpr mce = cu.findFirst(MethodCallExpr.class).get();
44+
Expression arg0 = mce.getArgument(0);
45+
Expression arg1 = mce.getArgument(1);
46+
Expression innerExpr0 = arg0.asEnclosedExpr().getInner()
47+
.asEnclosedExpr().getInner();
48+
Expression innerExpr1 = arg1.asEnclosedExpr().getInner()
49+
.asEnclosedExpr().getInner();
50+
51+
assertEquals(0, mce.getArgumentPosition(arg0)); // with no conversion
52+
assertEquals(0, mce.getArgumentPosition(innerExpr0, EXCLUDE_ENCLOSED_EXPR)); // with a conversion skipping EnclosedExprs
53+
assertEquals(1, mce.getArgumentPosition(arg1)); // with no conversion
54+
assertEquals(1, mce.getArgumentPosition(innerExpr1, EXCLUDE_ENCLOSED_EXPR)); // with a conversion skipping EnclosedExprs
55+
}
56+
}

0 commit comments

Comments
 (0)