Merge pull request #3912 from oowekyala:pmd7-lambda-wrong-form-bug
[java] Fix IndexOutOfBoundsException with lambda that has wrong shape #3912
This commit is contained in:
10 files changed
+83
-43
No files matched your search
@@ -110,6 +110,13 @@ public final class ASTLambdaExpression extends AbstractJavaExpr implements Funct
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of formal parameters of this lambda.
|
||||
*/
|
||||
public int getArity() {
|
||||
return getParameters().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <P, R> R acceptVisitor(JavaVisitor<? super P, ? extends R> visitor, P data) {
|
||||
return visitor.visit(this, data);
|
||||
|
||||
@@ -41,6 +41,12 @@ public final class ASTLambdaParameter extends AbstractJavaTypeNode
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the lambda that owns this parameter.
|
||||
*/
|
||||
public ASTLambdaExpression getOwner() {
|
||||
return (ASTLambdaExpression) getParent().getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the declarator ID of this formal parameter.
|
||||
|
||||
@@ -559,6 +559,9 @@ public final class LazyTypeResolver extends JavaVisitorBase<TypingContext, @NonN
|
||||
|
||||
JMethodSig m = lambda.getFunctionalMethod(); // this forces resolution of the lambda
|
||||
if (!isUnresolved(m)) {
|
||||
if (m.getArity() != node.getOwner().getArity()) {
|
||||
return ts.ERROR;
|
||||
}
|
||||
return m.getFormalParameters().get(node.getIndexInParent());
|
||||
}
|
||||
return ts.UNKNOWN;
|
||||
|
||||
+24
@@ -629,4 +629,28 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
parserTest("Lambda with wrong form") {
|
||||
|
||||
val (acu, _) = parser.parseWithTypeInferenceSpy("""
|
||||
interface Lambda {
|
||||
void call();
|
||||
}
|
||||
class Foo {
|
||||
{
|
||||
Lambda l = () -> {}; // ok
|
||||
Lambda l = x -> {}; // wrong form!
|
||||
}
|
||||
}
|
||||
""")
|
||||
|
||||
val (ok, wrong) = acu.descendants(ASTLambdaExpression::class.java).toList()
|
||||
val t_Lambda = acu.typeDeclarations.firstOrThrow().typeMirror
|
||||
|
||||
acu.withTypeDsl {
|
||||
ok shouldHaveType t_Lambda
|
||||
wrong shouldHaveType t_Lambda
|
||||
wrong.parameters[0] shouldHaveType ts.ERROR
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
@@ -20,7 +20,7 @@
|
||||
| +- ExpressionStatement[]
|
||||
| +- MethodCall[@CompileTimeConstant = "false", @Image = "delete", @MethodName = "delete", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
| | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Observable"]
|
||||
| | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "1", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -39,7 +39,7 @@
|
||||
| | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "stuff", @Name = "stuff", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- BooleanLiteral[@CompileTimeConstant = "true", @ParenthesisDepth = "0", @Parenthesized = "false", @True = "true"]
|
||||
| +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -58,7 +58,7 @@
|
||||
| +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Observable"]
|
||||
| +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaExpression[@Arity = "1", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -69,7 +69,7 @@
|
||||
| +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "stuff", @Name = "stuff", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- BooleanLiteral[@CompileTimeConstant = "true", @ParenthesisDepth = "0", @Parenthesized = "false", @True = "true"]
|
||||
+- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
+- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
+- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
+- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
|
||||
+33
-33
@@ -22,7 +22,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "java"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "java", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -39,7 +39,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "java2"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "java2", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -55,7 +55,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "java3"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "java3", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -71,7 +71,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "java4"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "java4", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -93,7 +93,7 @@
|
||||
| | | | | +- AmbiguousName[@CompileTimeConstant = "false", @Image = "array", @Name = "array", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -122,7 +122,7 @@
|
||||
| | | | +- ArrayDimensions[@Empty = "false", @Size = "1"]
|
||||
| | | | +- ArrayTypeDim[@Varargs = "false"]
|
||||
| | | +- ArrayInitializer[@CompileTimeConstant = "false", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -130,7 +130,7 @@
|
||||
| | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "exists", @MethodName = "exists", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -138,7 +138,7 @@
|
||||
| | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "canRead", @MethodName = "canRead", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -158,7 +158,7 @@
|
||||
| | | | +- ArrayDimensions[@Empty = "false", @Size = "1"]
|
||||
| | | | +- ArrayTypeDim[@Varargs = "false"]
|
||||
| | | +- ArrayInitializer[@CompileTimeConstant = "false", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -166,7 +166,7 @@
|
||||
| | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "exists", @MethodName = "exists", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -174,7 +174,7 @@
|
||||
| | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "canRead", @MethodName = "canRead", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -192,7 +192,7 @@
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "user", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- MethodCall[@CompileTimeConstant = "false", @Image = "doPrivileged", @MethodName = "doPrivileged", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- MethodCall[@CompileTimeConstant = "false", @Image = "getProperty", @MethodName = "getProperty", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
@@ -206,7 +206,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "c"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "c", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "done", @Empty = "false", @Image = "\"done\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"]
|
||||
| | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
@@ -214,7 +214,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Runnable"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "r"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "r", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | | +- ExpressionStatement[]
|
||||
@@ -231,9 +231,9 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Runnable"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "sup"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "sup", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | | +- ExpressionStatement[]
|
||||
@@ -260,10 +260,10 @@
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "c2", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- ConditionalExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "flag", @Name = "flag", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "23", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "23.0", @ValueAsFloat = "23.0", @ValueAsInt = "23", @ValueAsLong = "23"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "1", @Parenthesized = "true"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "42", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "42.0", @ValueAsFloat = "42.0", @ValueAsInt = "42", @ValueAsLong = "42"]
|
||||
| | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
@@ -273,7 +273,7 @@
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "o", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- CastExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Runnable"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | | +- ExpressionStatement[]
|
||||
@@ -297,7 +297,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "comparer"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "comparer", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "2", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -312,7 +312,7 @@
|
||||
| | +- ExpressionStatement[]
|
||||
| | | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "comparer", @Name = "comparer", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "2", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -336,7 +336,7 @@
|
||||
| | | +- MethodCall[@CompileTimeConstant = "false", @Image = "addActionListener", @MethodName = "addActionListener", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "button", @Name = "button", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -371,7 +371,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Integer"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "lambda2"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "lambda2", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "2", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -393,7 +393,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Integer"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "lambda2a"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "lambda2a", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "2", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -414,7 +414,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Double"]
|
||||
| | | +- VariableDeclarator[@Initializer = "true", @Name = "lambda3"]
|
||||
| | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "lambda3", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "3", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "3"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -442,7 +442,7 @@
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Double"]
|
||||
| | +- VariableDeclarator[@Initializer = "true", @Name = "lambda3a"]
|
||||
| | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "lambda3a", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
| | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "3", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "false", @Size = "3"]
|
||||
| | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -488,7 +488,7 @@
|
||||
| | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Runnable"]
|
||||
| | +- VariableDeclarator[@Initializer = "true", @Name = "r1"]
|
||||
| | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "package", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "true", @Final = "false", @ForLoopVariable = "false", @ForeachVariable = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "false", @Name = "r1", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | +- ExpressionStatement[]
|
||||
@@ -504,7 +504,7 @@
|
||||
| | +- FormalParameters[@Empty = "true", @Size = "0"]
|
||||
| | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | +- ReturnStatement[]
|
||||
| | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | +- ExpressionStatement[]
|
||||
@@ -568,7 +568,7 @@
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "K"]
|
||||
| | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "V"]
|
||||
| | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Serializable"]
|
||||
| | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "2", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -702,7 +702,7 @@
|
||||
| | +- FormalParameters[@Empty = "true", @Size = "0"]
|
||||
| | +- Block[@Empty = "false", @Size = "1", @containsComment = "false"]
|
||||
| | +- ReturnStatement[]
|
||||
| | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "0", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
@@ -776,7 +776,7 @@
|
||||
| | | | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "2", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "2.0", @ValueAsFloat = "2.0", @ValueAsInt = "2", @ValueAsLong = "2"]
|
||||
| | | | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "3", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "3.0", @ValueAsFloat = "3.0", @ValueAsInt = "3", @ValueAsLong = "3"]
|
||||
| | | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaExpression[@Arity = "2", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -827,7 +827,7 @@
|
||||
| | | | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "2", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "2.0", @ValueAsFloat = "2.0", @ValueAsInt = "2", @ValueAsLong = "2"]
|
||||
| | | | | +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "3", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "0", @Parenthesized = "false", @ValueAsDouble = "3.0", @ValueAsFloat = "3.0", @ValueAsInt = "3", @ValueAsLong = "3"]
|
||||
| | | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaExpression[@Arity = "2", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "false", @Visibility = "package"]
|
||||
| | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -873,7 +873,7 @@
|
||||
| | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- FieldAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "event", @Name = "event", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- AmbiguousName[@CompileTimeConstant = "false", @Image = "object", @Name = "object", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| | +- Block[@Empty = "false", @Size = "2", @containsComment = "true"]
|
||||
| | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"]
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@
|
||||
| +- YieldStatement[]
|
||||
| +- NumericLiteral[@Base = "10", @CompileTimeConstant = "true", @DoubleLiteral = "false", @FloatLiteral = "false", @Image = "5", @IntLiteral = "true", @Integral = "true", @LongLiteral = "false", @ParenthesisDepth = "1", @Parenthesized = "true", @ValueAsDouble = "5.0", @ValueAsFloat = "5.0", @ValueAsInt = "5", @ValueAsLong = "5"]
|
||||
+- YieldStatement[]
|
||||
| +- LambdaExpression[@BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaExpression[@Arity = "0", @BlockBody = "true", @CompileTimeConstant = "false", @ExpressionBody = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| +- LambdaParameterList[@Empty = "true", @Size = "0"]
|
||||
| +- Block[@Empty = "true", @Size = "0", @containsComment = "false"]
|
||||
+- ExpressionStatement[]
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@
|
||||
| | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "merchants", @Name = "merchants", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | | +- ArgumentList[@Empty = "true", @Size = "0"]
|
||||
| | | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaExpression[@Arity = "1", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- LambdaParameterList[@Empty = "false", @Size = "1"]
|
||||
| | | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
@@ -75,7 +75,7 @@
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "merchant", @Name = "merchant", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "month", @Name = "month", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- ArgumentList[@Empty = "false", @Size = "1"]
|
||||
| | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaExpression[@Arity = "2", @BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"]
|
||||
| | | +- LambdaParameterList[@Empty = "false", @Size = "2"]
|
||||
| | | | +- LambdaParameter[@EffectiveVisibility = "package", @Final = "false", @TypeInferred = "true", @Visibility = "package"]
|
||||
| | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
|
||||
|
||||
+2
-2
@@ -191,7 +191,7 @@ import java.util.concurrent.*;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class Foo {
|
||||
private Map<Path, List<String>> joinFutures(Map<String, List<Future<String>>> map) {
|
||||
private Map<String, List<String>> joinFutures(Map<String, List<Future<String>>> map) {
|
||||
Map<String, List<String>> joined = new HashMap<>();
|
||||
|
||||
for (String p : map.keySet()) {
|
||||
@@ -214,7 +214,7 @@ public class Foo {
|
||||
}
|
||||
|
||||
// checking basic lambdas and anonymous classes as well
|
||||
Callable<Object> c = a -> { return null; }; // <----- false positive here
|
||||
Callable<Object> c = () -> { return null; }; // <----- false positive here
|
||||
Callable<Object> c2 = new Callable<Object>() {
|
||||
public Object call() {
|
||||
return null; // <----- false positive here
|
||||
|
||||
Reference in new issue
Block a user