Skip to content

Commit

Permalink
release 3.26.2-b7
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed Jan 23, 2025
1 parent 870b5ce commit 54a11df
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 24 deletions.
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>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</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>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</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>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</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 @@ -3,7 +3,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</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 @@ -3,7 +3,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void testChangingModifiers(FieldDeclaration field) {
modifiers = field.getModifiers();
assertEquals(0, modifiers.size());

field.setModifiers(Keyword.PRIVATE, Keyword.SYNCHRONIZED);
field.setModifiers(Modifier.DefaultKeyword.PRIVATE, Modifier.DefaultKeyword.SYNCHRONIZED);
modifiers = field.getModifiers();
assertTrue(modifiers.contains(Modifier.privateModifier()));
assertTrue(modifiers.contains(Modifier.synchronizedModifier()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* GNU Lesser General Public License for more details.
*/

import com.github.javaparser.ast.Modifier;
import com.github.javaparser.ast.Modifier.Keyword;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
Expand All @@ -46,7 +47,7 @@ public void test() {
+ " throw new UnsupportedOperationException(\"Not supported yet.\");\n" + " }";
// add method declaration
MethodDeclaration decl =
cu.getChildNodesByType(ClassOrInterfaceDeclaration.class).get(0).addMethod("f", Keyword.PUBLIC);
cu.getChildNodesByType(ClassOrInterfaceDeclaration.class).get(0).addMethod("f", Modifier.DefaultKeyword.PUBLIC);
// create body
BlockStmt body = new BlockStmt();
NodeList<Statement> statements = new NodeList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void testArrayTypeWithBracketAfterTypeWithoutWhitespace() {
considerVariableDeclaration(def);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
assertTrue(LexicalPreservingPrinter.print(expression).equals("private int[] i"));
}

Expand All @@ -45,7 +45,7 @@ void testArrayTypeWithWhitespaceBeforeTypeAndBracket() {
considerVariableDeclaration(def);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
assertTrue(LexicalPreservingPrinter.print(expression).equals("private int [] i"));
}

Expand All @@ -55,7 +55,7 @@ void testArrayTypeWithWhitespaceBeforeEachToken() {
considerVariableDeclaration(def);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
assertTrue(LexicalPreservingPrinter.print(expression).equals("private int [ ] i"));
}

Expand All @@ -65,7 +65,7 @@ void testArrayTypeWithMultipleWhitespaces() {
considerVariableDeclaration(def);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
assertTrue(LexicalPreservingPrinter.print(expression).equals("private int [ ] i"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void test() {
List<Modifier.Keyword> kws =
field.getModifiers().stream().map(Modifier::getKeyword).collect(Collectors.toList());
kws.add(0, Modifier.DefaultKeyword.PROTECTED);
field.setModifiers(kws.toArray(new Modifier.Keyword[] {}));
field.setModifiers();

String expected = "class C { \r\n" + " protected static String S = \"s\";\r\n" + "}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void printingVariableDeclarationWithAddedModifier() {
considerVariableDeclaration(def2);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
}

@Test
Expand All @@ -44,7 +44,7 @@ void printingGenericVariableDeclarationWithAddedModifier() {
considerVariableDeclaration(def2);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
}

@Test
Expand All @@ -53,7 +53,7 @@ void printingGenericVariableDeclarationWithAddedModifierWithAnotherSyntaxe() {
considerVariableDeclaration(def2);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
}

@Test
Expand All @@ -62,7 +62,7 @@ void printingGeneric2VariableDeclarationWithAddedModifier() {
considerVariableDeclaration(def2);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
}

@Test
Expand All @@ -71,6 +71,6 @@ void printingGeneric2VariableDeclarationWithAddedModifierWithAnotherSyntaxe() {
considerVariableDeclaration(def2);
expression.asVariableDeclarationExpr().getModifiers().addFirst(Modifier.privateModifier());
assertTrue(LexicalPreservingPrinter.getOrCreateNodeText(expression).getElements().stream()
.anyMatch(elem -> elem.expand().equals(Keyword.PRIVATE.asString())));
.anyMatch(elem -> elem.expand().equals(Modifier.DefaultKeyword.PRIVATE.asString())));
}
}
2 changes: 1 addition & 1 deletion javaparser-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,4 +548,9 @@ private static <T extends Node> T handleResult(ParseResult<T> result) {

private StaticJavaParser() {
}

public static <T extends Expression> T parseJmlExpression(String expression) {
return (T) handleResult(newParser().parseJmlExpression(expression));
}

}
2 changes: 1 addition & 1 deletion javaparser-symbol-solver-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion javaparser-symbol-solver-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public abstract class AbstractClassDeclarationTest extends AbstractTypeDeclarati
implements ResolvedClassDeclarationTest, MethodResolutionCapabilityTest {

@Override
public abstractClassDeclaration createValue();
public abstract AbstractClassDeclaration createValue();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration;
import com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclarationTest;
import com.github.javaparser.symbolsolver.AbstractSymbolResolutionTest;
import org.junit.jupiter.api.Disabled;
Expand All @@ -32,7 +34,7 @@ public abstract class AbstractTypeDeclarationTest extends AbstractSymbolResoluti
implements ResolvedReferenceTypeDeclarationTest {

@Override
public abstractTypeDeclaration createValue();
public abstract AbstractTypeDeclaration createValue();

/**
* Should say if an {@link AbstractTypeDeclaration} is functional interface.
Expand Down
2 changes: 1 addition & 1 deletion jmlparser-jml-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>jmlparser-parent</artifactId>
<groupId>io.github.jmltoolkit</groupId>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<groupId>io.github.jmltoolkit</groupId>
<artifactId>jmlparser-parent</artifactId>
<packaging>pom</packaging>
<version>3.26.2-b6-SNAPSHOT</version>
<version>3.26.2-b7-SNAPSHOT</version>

<name>jmlparser-parent</name>
<url>https://github.com/wadoon/jmlparser</url>
Expand Down

0 comments on commit 54a11df

Please sign in to comment.