Discussion:
[Cucumber] Eclipse IDE compiler error, using io.cucumber.datatable.DataTableType
Martin Tržický
2018-08-22 06:50:30 UTC
Permalink
Hi,

I'm using 3.0.2 cucumber version and I cannot compile this particular code
in Eclipse (latest Neon, or Oxygen, Ubuntu):
DataTableType dtt = new DataTableType(Integer.class, (Map<String, String>
row) -> new Integer(0));

Stacktrace from Eclipse error log looks like:
java.lang.ArrayIndexOutOfBoundsException: 1
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.
isOnlyWildcardMismatch(LambdaExpression.java:465)
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(
LambdaExpression.java:360)
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.
cachedResolvedCopy(LambdaExpression.java:936)
at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.
resolveExpressionExpecting(LambdaExpression.java:966)
at org.eclipse.jdt.internal.compiler.lookup.ConstraintExpressionFormula.
reduce(ConstraintExpressionFormula.java:167)
at org.eclipse.jdt.internal.compiler.lookup.BoundSet.reduceOneConstraint
(BoundSet.java:866)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.reduce(
InferenceContext18.java:1037)
at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.solve(
InferenceContext18.java:988)
at org.eclipse.jdt.internal.compiler.lookup.
ParameterizedGenericMethodBinding.computeCompatibleMethod18(
ParameterizedGenericMethodBinding.java:245)
at org.eclipse.jdt.internal.compiler.lookup.
ParameterizedGenericMethodBinding.computeCompatibleMethod(
ParameterizedGenericMethodBinding.java:89)
at org.eclipse.jdt.internal.compiler.lookup.Scope.
computeCompatibleMethod(Scope.java:813)
at org.eclipse.jdt.internal.compiler.lookup.Scope.
computeCompatibleMethod(Scope.java:770)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor0(Scope.
java:2439)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.
java:2402)
at org.eclipse.jdt.internal.compiler.ast.Statement.
findConstructorBinding(Statement.java:451)
at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.
resolveType(AllocationExpression.java:486)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(
LocalDeclaration.java:371)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.
resolveStatements(AbstractMethodDeclaration.java:639)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.
resolveStatements(MethodDeclaration.java:313)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.
resolve(AbstractMethodDeclaration.java:549)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(
TypeDeclaration.java:1226)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(
TypeDeclaration.java:1340)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.
resolve(CompilationUnitDeclaration.java:643)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(
CompilationUnitResolver.java:1246)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(
CompilationUnitResolver.java:711)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:
1208)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:823)
at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(
CoreASTProvider.java:268)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(
CoreASTProvider.java:260)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(
CoreASTProvider.java:193)
at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:
135)
at org.eclipse.jdt.internal.ui.viewsupport.
SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(
SelectionListenerWithASTManager.java:173)
at org.eclipse.jdt.internal.ui.viewsupport.
SelectionListenerWithASTManager$PartListenerGroup$3.run(
SelectionListenerWithASTManager.java:158)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)

Has anyone struggled with this?

Thanks,
Martin
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...