Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Scripting Sightly Engine 1.0.2
-
None
-
None
Description
We have versioned resource types in folders concerning the release date. For example /apps/myapp/1702/components/mycomponent
Now when switching from jsp to HTL, we get following exception:
org.apache.sling.scripting.sightly.impl.compiler.CompilerException: org.apache.sling.scripting.sightly.impl.compiler.CompilerException: org.apache.sling.scripting.sightly.impl.compiler.CompilerException: Compilation errors in apps/myapp/1702/components/mycomponent/SightlyJava_main.java:
Line 19, column 971 : The declared package "apps.myapp" does not match the expected package "apps.myapp.1702.components.mycomponent"
Line 19, column 981 : Syntax error on token ".1702", delete this token
at org.apache.sling.scripting.sightly.impl.compiler.SightlyJavaCompilerService.compileSource(SightlyJavaCompilerService.java:143)
I guess this is because it translates the folders to package names, and 1702 is not a valid package identifier, but why isn’t it throwing this exception then in all the already existing jsp components?
Attachments
Issue Links
- is related to
-
SLING-6094 HTL can generate invalid Java code by using user-supplied input
- Closed
-
SLING-6146 SourceIdentifier should not mangle underscore characters
- Closed
-
SLING-5787 Modularise the Sightly script engine
- Closed