Community
Participate
Working Groups
Hi there! I encountered the following Errormessage: Errors occurred during the build. Errors running builder 'JavaScript Validator' on project 'XXXXX'. java.lang.String constant cannot be casted into int The problem was some code that was in my javascript file by mistake, it is reducable to the following: <code begins here> + +"" <code ends here> the problem does not occur, with ++"" , only if a space or a newline follows the first + Bye! Peter
Additional Info: Version: Eclipse Java EE IDE for Web Developers. Version: Kepler Release Build id: 20130614-0229 The same problem happened on a prior release, I deleted that version though and don't know its Build id. The following Info is displayed when hovering the mouse over the first line of the file containing + +"" Internal validation error org.eclipse.wst.jsdt.internal.compiler.problem.ShouldNotImplement: java.lang.String constant cannot be casted into int at org.eclipse.wst.jsdt.internal.compiler.impl.Constant.intValue(Constant.java: 1283) at org.eclipse.wst.jsdt.internal.compiler.impl.Constant.computeConstantOperationPLUS(Constant.java: 1005) at org.eclipse.wst.jsdt.internal.compiler.impl.Constant.computeConstantOperation(Constant.java:192) at org.eclipse.wst.jsdt.internal.compiler.ast.UnaryExpression.resolveType(UnaryExpression.java:139) at org.eclipse.wst.jsdt.internal.compiler.ast.Expression.resolve(Expression.java:477) at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java: 394) at org.eclipse.wst.jsdt.internal.compiler.Compiler.process(Compiler.java:607) at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:355) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:288) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:227) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:199) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Creating an empty project with a single file containing the single line: -+''; triggers the same bug.
I encountered the same problem on Eclipse Mars: JavaScript Development Tools 1.6.201.v201508262249 org.eclipse.wst.jsdt.feature.feature.group Eclipse Web Tools Platform