[jira] [Updated] (SLING-7207) Get rid of runtime reflection in HTL expression evaluation
[ https://issues.apache.org/jira/browse/SLING-7207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Radu Cotescu updated SLING-7207: Affects Version/s: (was: Scripting HTL Engine 1.0.42) (was: Scripting HTL Java Compiler 1.0.14) (was: Scripting HTL Compiler 1.0.14) Scripting HTL Engine 1.0.20 Scripting HTL Compiler 1.0.0 Scripting HTL Java Compiler 1.0.0 > Get rid of runtime reflection in HTL expression evaluation > -- > > Key: SLING-7207 > URL: https://issues.apache.org/jira/browse/SLING-7207 > Project: Sling > Issue Type: Improvement > Components: Scripting >Affects Versions: Scripting HTL Engine 1.0.20, Scripting HTL Compiler > 1.0.0, Scripting HTL Java Compiler 1.0.0 >Reporter: Vlad Bailescu > > At the moment the following expression > {code} > ${obj.message} > {code} > generates this Java code: > {code} > Object _global_obj = null; > _global_obj = renderContext.call("use", "com.my.Obj", obj()); > { > Object var_0 = renderContext.call("xss", > renderContext.getObjectModel().resolveProperty(_global_obj, "message"), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} > Resolving the property is done via reflection at runtime. Given the fact that > for most use providers (JS is an exception) we know the type of > {{_global_obj}} we could determine the right method to call at compile time. > Resulting code might look something like: > {code} > com.my.Obj _global_obj = renderContext.call("use", com.my.Obj.class, obj()); > { > Object var_0 = renderContext.call("xss", _global_obj.getMessage()), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-7207) Get rid of runtime reflection in HTL expression evaluation
[ https://issues.apache.org/jira/browse/SLING-7207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Radu Cotescu updated SLING-7207: Fix Version/s: (was: Scripting HTL Engine 1.0.44) (was: Scripting HTL Java Compiler 1.0.16) > Get rid of runtime reflection in HTL expression evaluation > -- > > Key: SLING-7207 > URL: https://issues.apache.org/jira/browse/SLING-7207 > Project: Sling > Issue Type: Improvement > Components: Scripting >Affects Versions: Scripting HTL Engine 1.0.20, Scripting HTL Compiler > 1.0.0, Scripting HTL Java Compiler 1.0.0 >Reporter: Vlad Bailescu > > At the moment the following expression > {code} > ${obj.message} > {code} > generates this Java code: > {code} > Object _global_obj = null; > _global_obj = renderContext.call("use", "com.my.Obj", obj()); > { > Object var_0 = renderContext.call("xss", > renderContext.getObjectModel().resolveProperty(_global_obj, "message"), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} > Resolving the property is done via reflection at runtime. Given the fact that > for most use providers (JS is an exception) we know the type of > {{_global_obj}} we could determine the right method to call at compile time. > Resulting code might look something like: > {code} > com.my.Obj _global_obj = renderContext.call("use", com.my.Obj.class, obj()); > { > Object var_0 = renderContext.call("xss", _global_obj.getMessage()), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-7207) Get rid of runtime reflection in HTL expression evaluation
[ https://issues.apache.org/jira/browse/SLING-7207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vlad Bailescu updated SLING-7207: - Description: At the moment the following expression {code} ${obj.message} {code} generates this Java code: {code} Object _global_obj = null; _global_obj = renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", renderContext.getObjectModel().resolveProperty(_global_obj, "message"), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} Resolving the property is done via reflection at runtime. Given the fact that for most use providers (JS is an exception) we know the type of {{_global_obj}} we could determine the right method to call at compile time. Resulting code might look something like: {code} com.my.Obj _global_obj = renderContext.call("use", com.my.Obj.class, obj()); { Object var_0 = renderContext.call("xss", _global_obj.getMessage()), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} was: At the moment the following expression {code} ${obj.message} {code} generates this Java code: {code} Object _global_obj = null; _global_obj = renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", renderContext.getObjectModel().resolveProperty(_global_obj, "message"), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} Resolving the property is done via reflection at runtime. Given the fact that for most use providers (JS is an exception) we know the type of {{_global_obj}} we could determine the right method to call at compile time. Resulting code might look something like: {code} com.my.Obj _global_obj = (com.my.Obj) renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", _global_obj.getMessage()), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} > Get rid of runtime reflection in HTL expression evaluation > -- > > Key: SLING-7207 > URL: https://issues.apache.org/jira/browse/SLING-7207 > Project: Sling > Issue Type: Improvement > Components: Scripting >Affects Versions: Scripting HTL Compiler 1.0.14, Scripting HTL Java > Compiler 1.0.14, Scripting HTL Engine 1.0.42 >Reporter: Vlad Bailescu > Fix For: Scripting HTL Java Compiler 1.0.16, Scripting HTL Engine > 1.0.44 > > > At the moment the following expression > {code} > ${obj.message} > {code} > generates this Java code: > {code} > Object _global_obj = null; > _global_obj = renderContext.call("use", "com.my.Obj", obj()); > { > Object var_0 = renderContext.call("xss", > renderContext.getObjectModel().resolveProperty(_global_obj, "message"), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} > Resolving the property is done via reflection at runtime. Given the fact that > for most use providers (JS is an exception) we know the type of > {{_global_obj}} we could determine the right method to call at compile time. > Resulting code might look something like: > {code} > com.my.Obj _global_obj = renderContext.call("use", com.my.Obj.class, obj()); > { > Object var_0 = renderContext.call("xss", _global_obj.getMessage()), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-7207) Get rid of runtime reflection in HTL expression evaluation
[ https://issues.apache.org/jira/browse/SLING-7207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vlad Bailescu updated SLING-7207: - Description: At the moment the following expression {code} ${obj.message} {code} generates this Java code: {code} Object _global_obj = null; _global_obj = renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", renderContext.getObjectModel().resolveProperty(_global_obj, "message"), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} Resolving the property is done via reflection at runtime. Given the fact that for most use providers (JS is an exception) we know the type of {{_global_obj}} we could determine the right method to call at compile time. Resulting code might look something like: {code} com.my.Obj _global_obj = (com.my.Obj) renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", _global_obj.getMessage()), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} was: At the moment the following expression {code} ${obj.message} {code} generates this Java code: {code} Object _global_obj = null; _global_obj = renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", renderContext.getObjectModel().resolveProperty(_global_obj, "message"), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} Resolving the property is done via reflection at runtime. Given the fact that for most use providers (JS is an exception) we know the type of {{_global_obj}} we could determine the right method to call at compile time. Resulting code might look something like: {code} com.my.Obj _global_obj = renderContext.call("use", "com.my.Obj", obj()); { Object var_0 = renderContext.call("xss", _global_obj.getMessage()), "text"); out.write(renderContext.getObjectModel().toString(var_0)); } {code} > Get rid of runtime reflection in HTL expression evaluation > -- > > Key: SLING-7207 > URL: https://issues.apache.org/jira/browse/SLING-7207 > Project: Sling > Issue Type: Improvement > Components: Scripting >Affects Versions: Scripting HTL Compiler 1.0.14, Scripting HTL Java > Compiler 1.0.14, Scripting HTL Engine 1.0.42 >Reporter: Vlad Bailescu > Fix For: Scripting HTL Java Compiler 1.0.16, Scripting HTL Engine > 1.0.44 > > > At the moment the following expression > {code} > ${obj.message} > {code} > generates this Java code: > {code} > Object _global_obj = null; > _global_obj = renderContext.call("use", "com.my.Obj", obj()); > { > Object var_0 = renderContext.call("xss", > renderContext.getObjectModel().resolveProperty(_global_obj, "message"), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} > Resolving the property is done via reflection at runtime. Given the fact that > for most use providers (JS is an exception) we know the type of > {{_global_obj}} we could determine the right method to call at compile time. > Resulting code might look something like: > {code} > com.my.Obj _global_obj = (com.my.Obj) renderContext.call("use", "com.my.Obj", > obj()); > { > Object var_0 = renderContext.call("xss", _global_obj.getMessage()), > "text"); > out.write(renderContext.getObjectModel().toString(var_0)); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)