Skip to content

Commit 8030f00

Browse files
committed
Reverted JavaParser lib version due to a lexical printer bug
1 parent 66a8618 commit 8030f00

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

framework/codemodder-base/src/main/java/io/codemodder/ast/ASTs.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ public static Optional<MethodCallExpr> isScopeInMethodCall(final Expression expr
182182
}
183183

184184
/**
185-
* Test for this pattern: {@link TypePatternExpr} ({@code node}) -&gt; {@link SimpleName}
185+
* Test for this pattern: {@link PatternExpr} ({@code node}) -&gt; {@link SimpleName}
186186
*
187187
* @return A tuple with the above pattern in order sans the {@link SimpleName}.
188188
*/
189-
public static Optional<TypePatternExpr> isPatternExprDeclarationOf(
189+
public static Optional<PatternExpr> isPatternExprDeclarationOf(
190190
final Node node, final String name) {
191-
if (node instanceof TypePatternExpr) {
192-
var pexpr = (TypePatternExpr) node;
191+
if (node instanceof PatternExpr) {
192+
var pexpr = (PatternExpr) node;
193193
if (pexpr.getNameAsString().equals(name)) return Optional.of(pexpr);
194194
}
195195
return Optional.empty();

framework/codemodder-base/src/main/java/io/codemodder/javaparser/JavaParserCodemodRunner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public CodemodFileScanningResult run(final CodemodInvocationContext context) thr
5858
Path file = context.path();
5959
CompilationUnit cu = parser.parseJavaFile(file);
6060
CodemodFileScanningResult result = javaParserChanger.visit(context, cu);
61+
System.out.println(cu);
6162
List<CodemodChange> changes = result.changes();
6263
if (!changes.isEmpty()) {
6364
String encodingName = encodingDetector.detect(file).orElse("UTF-8");

framework/codemodder-base/src/main/java/io/codemodder/remediation/sqlinjection/SQLParameterizerWithCleanup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ private SQLParameterizerWithCleanup() {}
1010

1111
public static boolean checkAndFix(final MethodCallExpr methodCallExpr) {
1212
var maybeFixed = new SQLParameterizer(methodCallExpr).checkAndFix();
13-
maybeFixed.ifPresent(call -> cleanup(call));
13+
// maybeFixed.ifPresent(call -> cleanup(call));
1414
return maybeFixed.isPresent();
1515
}
1616

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
auto-value = "1.9"
33
jackson = "2.13.1"
4-
javaparser-core = "3.26.2"
4+
javaparser-core = "3.25.4"
55
javaparser-symbolsolver = "3.15.15"
66
java-security-toolkit = "1.2.0"
77
java-security-toolkit-xstream = "1.0.2"

0 commit comments

Comments
 (0)