Wednesday, October 30, 2024

Re: new GWT 2.12 release

This is a bug, which will be fixed in the next version (2.12.1). 

Add {} around the switch. This will fix the issue.  

blackh...@gmail.com schrieb am Mittwoch, 30. Oktober 2024 um 05:55:13 UTC+1:
Nice work. 
I have upgraded my project from 2.11 to 2.12 and now i am getting the follwoing exception:

[java] [ERROR] An internal compiler exception occurred

[java] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:4181)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1091)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:335)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:333)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:333)

[java] at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:154)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:331)

[java] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:437)

[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1699)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.processImpl(GwtAstBuilder.java:4117)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:4155)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:128)

[java] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:322)

[java] at org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:575)

[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:475)

[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)

[java] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1021)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:322)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)

[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:426)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:210)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:192)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:143)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:132)

[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:110)

[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)

[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)

[java] at com.google.gwt.dev.Compiler.main(Compiler.java:113)

[java] Caused by: java.lang.ClassCastException: class com.google.gwt.dev.jjs.ast.JSwitchStatement cannot be cast to class com.google.gwt.dev.jjs.ast.JExpression (com.google.gwt.dev.jjs.ast.JSwitchStatement and com.google.gwt.dev.jjs.ast.JExpression are in unnamed module of loader 'app')

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.pop(GwtAstBuilder.java:2816)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1086)

[java] ... 29 more

[java] [ERROR] at DoubleFormatter.java(90): if (((exponent >= (- 4)) && (exponent <= 2)))

[java] {

[java] value = DECIMALS3.format(theDouble);

[java] }

[java] else

[java] switch (exponent) {

[java] case 2 :

[java] value = DECIMALS3.format(theDouble);

[java] break;

[java] case 3 :

[java] case 4 :

[java] value = DECIMALS2.format(theDouble);

[java] break;

[java] case 5 :

[java] case 6 :

[java] value = DECIMALS0.format(theDouble);

[java] break;

[java] }


Any thoughts of what is going wrong?


Regards,


Jasper

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/03fe13c8-092d-4811-85ee-ab5af9f7f94cn%40googlegroups.com.

No comments:

Post a Comment