today I came across an issue with the Janino version 2.3.3 in use in JCI. It does not find static methods in classes. After an update to 2.3.8 (which unfortunately needs adaptions in JaninoJavaCompiler the compilation of my classes work again. Is there any interest in this update to JCI codebase?
Of course! ...what a question ;)
Next issue is triggered by this update to 2.3.8. We also use Janino for XSPcompilation in Cocoon,
..as well as the eclipse compiler - I know ;)
which also did no longer work after the update to 2.3.8.I made the changes and now please let me point out the issues mentioned in the subject. The class is actually an implementation of Cocoon's LanguageCompilerinterface and a wrapper around JaninoJavaCompiler.
Why not create a JciCompiler implementation of the LanguageCompiler interface? It could act as a factory. The implementation could be passed in through the component configuration.
1. The LanguageCompiler interface has a method setEncoding(String).Unfortunately I can not propagate the param to JaninoJavaCompiler, because thevalue is not parameterizable there, but hard-coded.
Ok ...already came across this too
2. The CompilationProblem class has nice field storing e.g. locationinformation. Unfortunately there is no access to these fields, just a toString()method. But the class CompilerError in Cocoon would like to see theseinformations. Would it be possible to add public getters to CompilationProblem?
Make sense
3. The CompilationProblem is a nice abstraction, but isn't it somewhat limited? Both Eclipse and Janino provide more information than CompilationProblem can accept. Wouldn't it be better to convert CompilationProblem to an interface and create class like EclipseCompilationProblem and JaninoCompilationProblem being wrappers for the original problem/exception classes? So like in my case where Iknow that the CompilationProblem should be an instance of aJaninoCompilationProblem I can react more specifically (e.g. accessing thecolumn number of the problem).
Sounds like a good idea! Will look into it tonight cheers -- Torsten
PGP.sig
Description: This is a digitally signed message part