Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7
-
None
-
latest 2.7-snapshot
Description
It seems to have a problem with the * operator...
The problematic expression:
offsetAttribute + ": " + (((contentProvider.hasChildren(value) ? 0 : 1) + treeIterator.depth) * offset) + "px;"
The compiled expression:
{ return (($Tree_117)$2).getOffsetAttribute() + ": " + (((ognl.OgnlOps.booleanValue(((net.sf.tacos.model.ITreeContentProvider)(($Tree_117)$2).getContentProvider()).hasChildren((($Tree_117)$2).getValue())) ? ($w) 0 : ($w) 1) + (($Tree_117)$2).getTreeIterator().getDepth()) * ((java.lang.Integer)(($Tree_117)$2).getOffset()).intValue()) + "px;";}The exception:
2007.06.16. 16:14:30 org.apache.tapestry.services.impl.HiveMindExpressionCompiler compileExpression
SEVERE: Error generating OGNL getter for expression offsetAttribute + ": " + (((contentProvider.hasChildren(value) ? 0 : 1) + treeIterator.depth) * offset) + "px;" with root $Tree_117@c0d0618f[Home/tree.tree.tree] and body:
{ return (($Tree_117)$2).getOffsetAttribute() + ": " + (((ognl.OgnlOps.booleanValue(((net.sf.tacos.model.ITreeContentProvider)(($Tree_117)$2).getContentProvider()).hasChildren((($Tree_117)$2).getValue())) ? ($w) 0 : ($w) 1) + (($Tree_117)$2).getTreeIterator().getDepth()) * ((java.lang.Integer)(($Tree_117)$2).getOffset()).intValue()) + "px;";}org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTAdd_11334ded964: [source error] invalid types for *
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:440)
at ognl.Ognl.compileExpression(Ognl.java:141)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:126)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:89)
...
Caused by: javassist.CannotCompileException: [source error] invalid types for *
at javassist.CtBehavior.setBody(CtBehavior.java:347)
at javassist.CtBehavior.setBody(CtBehavior.java:316)
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
... 111 more
Caused by: compile error: invalid types for *
at javassist.compiler.CodeGen.badTypes(CodeGen.java:1242)
at javassist.compiler.CodeGen.convertOprandTypes(CodeGen.java:1303)
at javassist.compiler.CodeGen.atArithBinExpr(CodeGen.java:998)
at javassist.compiler.CodeGen.atBinExpr(CodeGen.java:966)
at javassist.compiler.ast.BinExpr.accept(BinExpr.java:40)
at javassist.compiler.JvstCodeGen.atMethodArgs(JvstCodeGen.java:357)
at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:486)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:454)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:427)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:427)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.CodeGen.atBinExpr(CodeGen.java:950)
at javassist.compiler.ast.BinExpr.accept(BinExpr.java:40)
at javassist.compiler.CodeGen.compileExpr(CodeGen.java:223)
at javassist.compiler.CodeGen.atReturnStmnt2(CodeGen.java:591)
at javassist.compiler.JvstCodeGen.atReturnStmnt(JvstCodeGen.java:424)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:356)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:285)
at javassist.compiler.Javac.compileBody(Javac.java:212)
at javassist.CtBehavior.setBody(CtBehavior.java:341)
... 113 more