Skip to content

Commit

Permalink
Update to EISOP 3.34-eisop1 from 3.32-eisop1 (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Mar 28, 2024
2 parents c482683 + c9ad3db commit 20475c5
Show file tree
Hide file tree
Showing 50 changed files with 818 additions and 373 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.0

- name: Create Release
id: create_release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
## Checkout the current version of the code from the repo.
- name: Checkout latest code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.0
with:
fetch-depth: "0"

Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.0
with:
fetch-depth: "0"
- name: Set up JDK 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare_release_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.0

# Setup Java 11 environment for the next steps
- name: Setup Java
Expand Down
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
Expand All @@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
37 changes: 34 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Next Release (Version 3.25.2-snapshot)
------------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/198?closed=1)
Next Release (Version 3.25.3-snapshot)
--------------------------------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/199?closed=1)

### Added
### Changed
Expand All @@ -10,6 +10,37 @@ Next Release (Version 3.25.2-snapshot)
### Fixed
### Security

Version 3.25.2
--------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/198?closed=1)

### Changed

* chore(deps): bump maven-scm-plugin from 1.13.0 to 2.0.0 (PR [#3961](https://github.com/javaparser/javaparser/pull/3961) by [@dependabot[bot]](https://github.com/apps/dependabot))
* chore(deps): bump checkstyle from 10.8.1 to 10.9.1 (PR [#3958](https://github.com/javaparser/javaparser/pull/3958) by [@dependabot[bot]](https://github.com/apps/dependabot))
* chore(deps): bump actions/checkout from 3.3.0 to 3.4.0 (PR [#3954](https://github.com/javaparser/javaparser/pull/3954) by [@dependabot[bot]](https://github.com/apps/dependabot))

### Fixed

* Fix: issue 3947 MANIFEST.MF points to non-existent URL (PR [#3966](https://github.com/javaparser/javaparser/pull/3966) by [@jlerbsc](https://github.com/jlerbsc))
* Fix: issue 3951 ConfilictingGenericTypesException is thrown when an Object type is expected as a parameter and an interface is provided as the actual parameter (PR [#3963](https://github.com/javaparser/javaparser/pull/3963) by [@jlerbsc](https://github.com/jlerbsc))
* Fix: issue 3949 LexicalPreservingPrinter Ignores Changes to LambdaExp… (PR [#3959](https://github.com/javaparser/javaparser/pull/3959) by [@jlerbsc](https://github.com/jlerbsc))
* Fix: Unit test since Return-Type-Substituable is fully implemented on reference type (PR [#3943](https://github.com/javaparser/javaparser/pull/3943) by [@jlerbsc](https://github.com/jlerbsc))
* Fix: issue on FunctionalInterfaceLogic but waiting for Return-Type-Su… (PR [#3941](https://github.com/javaparser/javaparser/pull/3941) by [@jlerbsc](https://github.com/jlerbsc))
* Suggested fix: hardcoded specific LambdaExpr case in LexicalDifferenc… (PR [#3938](https://github.com/javaparser/javaparser/pull/3938) by [@blacelle](https://github.com/blacelle))
* Fix TextBlockLiteralExpr in LexicalDifferenceCalculator (PR [#3937](https://github.com/javaparser/javaparser/pull/3937) by [@blacelle](https://github.com/blacelle))
* Fix: issue 3919 An array of primitive type cannot be assigned to an array of object (PR [#3933](https://github.com/javaparser/javaparser/pull/3933) by [@jlerbsc](https://github.com/jlerbsc))

### Developer Changes

* chore(deps): update actions/checkout action to v3.5.0 (PR [#3953](https://github.com/javaparser/javaparser/pull/3953) by [@renovate[bot]](https://github.com/apps/renovate))

### :heart: Contributors

Thank You to all contributors who worked on this release!

* [@blacelle](https://github.com/blacelle)
* [@jlerbsc](https://github.com/jlerbsc)


Version 3.25.1
Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-generators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.25.1</version>
<version>3.25.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-metamodel-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.25.1</version>
<version>3.25.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-serialization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.25.1</version>
<version>3.25.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-testing-bdd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.25.1</version>
<version>3.25.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-core-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>javaparser-parent</artifactId>
<groupId>com.github.javaparser</groupId>
<version>3.25.1</version>
<version>3.25.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2023 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/

package com.github.javaparser.printer.lexicalpreservation;

import static com.github.javaparser.utils.TestUtils.assertEqualsStringIgnoringEol;

import com.github.javaparser.ast.body.VariableDeclarator;
import com.github.javaparser.ast.expr.TextBlockLiteralExpr;
import org.junit.jupiter.api.Test;

public class Issue3936Test extends AbstractLexicalPreservingTest {
static final String given = "package some.project;\n"
+ "\n"
+ "import java.util.Optional;\n"
+ "\n"
+ "public class SomeClass {\n"
+ "\n"
+ " String html = \"\" + \"<html>\\n\"\n"
+ " + \"\\t<head>\\n\"\n"
+ " + \"\\t\\t<meta charset=\\\"utf-8\\\">\\n\"\n"
+ " + \"\\t</head>\\n\"\n"
+ " + \"\\t<body class=\\\"default-view\\\" style=\\\"word-wrap: break-word;\\\">\\n\"\n"
+ " + \"\\t\\t<p>Hello, world</p>\\n\"\n"
+ " + \"\\t</body>\\n\"\n"
+ " + \"</html>\\n\";\n"
+ "}";

@Test
void test() {
considerCode(given);

String newText = "\tfirstRow\n\tsecondRow\n\tthirdRow";

LexicalPreservingPrinter.setup(cu);

VariableDeclarator expr = cu.findFirst(VariableDeclarator.class).get();
expr.setInitializer(new TextBlockLiteralExpr(newText));

String actual = LexicalPreservingPrinter.print(cu);
String expected ="package some.project;\n"
+ "\n"
+ "import java.util.Optional;\n"
+ "\n"
+ "public class SomeClass {\n"
+ "\n"
+ " String html = \"\"\"\n"
+ "\tfirstRow\n"
+ "\tsecondRow\n"
+ "\tthirdRow\"\"\";\n"
+ "}";
assertEqualsStringIgnoringEol(expected, actual);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2023 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/

package com.github.javaparser.printer.lexicalpreservation;

import static com.github.javaparser.utils.TestUtils.assertEqualsStringIgnoringEol;

import org.junit.jupiter.api.Test;

import com.github.javaparser.ast.expr.LambdaExpr;
import com.github.javaparser.ast.expr.MethodCallExpr;
import com.github.javaparser.ast.expr.NameExpr;
import com.github.javaparser.ast.stmt.ExpressionStmt;

public class Issue3937Test extends AbstractLexicalPreservingTest {
static final String given = "package custom.project;\n" + "\n"
+ "import java.util.stream.Stream;\n"
+ "\n"
+ "class TestFileSystemCodeProvider {\n"
+ " void testInMemoryFileSystem() {\n"
+ "\n"
+ " Stream.of(\"\").listFilesForContent(file -> {\n"
+ " System.out.println(s);\n"
+ " });\n"
+ " }\n"
+ "}\n"
+ "";

@Test
void test() {
considerCode(given);

LexicalPreservingPrinter.setup(cu);

LambdaExpr lambdaExpr = cu.findFirst(LambdaExpr.class).get();
lambdaExpr.setBody(new ExpressionStmt(new MethodCallExpr(new NameExpr("SomeClass"), "someMethod")));

String actual = LexicalPreservingPrinter.print(cu);
String expected = "package custom.project;\n"
+ "\n"
+ "import java.util.stream.Stream;\n"
+ "\n"
+ "class TestFileSystemCodeProvider {\n"
+ " void testInMemoryFileSystem() {\n"
+ "\n"
+ " Stream.of(\"\").listFilesForContent(file -> SomeClass.someMethod());\n"
+ " }\n"
+ "}\n"
+ "";
assertEqualsStringIgnoringEol(expected, actual);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.github.javaparser.printer.lexicalpreservation;

import static com.github.javaparser.utils.TestUtils.assertEqualsStringIgnoringEol;

import org.junit.jupiter.api.Test;

import com.github.javaparser.ast.expr.LambdaExpr;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.BreakStmt;
import com.github.javaparser.ast.stmt.ExpressionStmt;

class Issue3949Test extends AbstractLexicalPreservingTest {

@Test
public void test() {
considerCode(
"class A {\n"
+ "\n"
+ " void foo() {\n"
+ " Consumer<Integer> lambda = a -> System.out.println(a);\n"
+ " }\n"
+ "}");

ExpressionStmt estmt = cu.findAll(ExpressionStmt.class).get(1).clone();
LambdaExpr lexpr = cu.findAll(LambdaExpr.class).get(0);
LexicalPreservingPrinter.setup(cu);

BlockStmt block = new BlockStmt();
BreakStmt bstmt = new BreakStmt();
block.addStatement(new ExpressionStmt(estmt.getExpression()));
block.addStatement(bstmt);
lexpr.setBody(block);

String expected =
"class A {\n"
+ "\n"
+ " void foo() {\n"
+ " Consumer<Integer> lambda = a -> {\n"
+ " System.out.println(a);\n"
+ " break;\n"
+ " };\n"
+ " }\n"
+ "}";

assertEqualsStringIgnoringEol(expected, LexicalPreservingPrinter.print(cu));
}

}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class X {
}
class X {
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module M.N {
}
module M.N {
}
Loading

0 comments on commit 20475c5

Please sign in to comment.