-- an Embedded JavaTM Compiler
 

Change Log

Version 2.5.15, June 18, 2008

Version 2.5.14, April 27, 2008

  • Switched from CVS to svn (http://svn.codehaus.org/janino).

Version 2.5.13, March 9, 2008

Version 2.5.12, December 20, 2007

Version 2.5.11, September 30, 2007

  • Resolved the following issues:
    • "CompileException" now extends "LocatedException", which extends "CausedException". This eliminates an asymmetry between "ScanException", "ParseException" and "CompileException".

Version 2.5.10, September 4, 2007

Version 2.5.9, July 22, 2007

Version 2.5.8, June 12, 2007

Version 2.5.7, May 19, 2007

Version 2.5.6, February 26, 2007

Version 2.5.5, February 3, 2007

Version 2.5.4, January 28, 2007

Version 2.5.3, January 17, 2007

  • Added single static import declarations for fields (e.g. import static java.util.Collections.EMPTY_MAP), types (e.g. import static java.util.Map.Entry) and methods (e.g. import static java.util.Arrays.asList)
  • Added static-import-on-demand declarations for fields (e.g. import static java.util.Collections.*), types (e.g. import static java.util.Map.*) and methods (e.g. import static java.util.Arrays.*)

Version 2.5.2, January 14, 2007

Version 2.5.1, November 6, 2006

Version 2.5.0, September 19, 2006

  • Extended ExpressionEvaluator and ScriptEvaluator with the capability to compile more than one expression/script in one evaluator. This greatly improves the runtime performance and reduces the JVM resource usage if you need to compile many expressions/scripts at the same time.
  • Introduced the concept of "auxiliary classes". This allows you to specify individual classes that the expression/script/class body/compilation unit may access although they are not loadable through the ClassLoader that was set with setParentClassLoader(). In other words: The expression/script/class body/compilation unit executes in a "sandbox", restricted by a ClassLoader with minimal peepholes to the classes you specify. This also resolves issue JANINO-66 Security: restrict package access

Version 2.4.7, September 11, 2006

Version 2.4.6, August 20, 2006

  • Added some very picky checks on character literals.
  • Check for float literal overflow and underflow.
  • ExpressionDemo was broken since the *Evaluator refactoring.
  • Some minor refactoring. Added more tests on float literals.
  • Refactoring of ClassBodyDemo and friends (more user friendly command line interface).
  • Resolved the following issues:

Version 2.4.5, June 26, 2006

  • Removed the misspelled "ResourceFinder.NO_RESOURCE_FINDER" (use "EMPTY_RESOURCE_FINDER" instead).
  • Simplified the self-compile test.
  • Cleaned up and simplified the local variables used by the TRY statement.
  • Resolved the following issues:

Version 2.4.4, June 18, 2006

Version 2.4.3, May 11, 2006

  • Added the "default imports" feature to all *Evaluators.
  • Scanner.close() and all file-related Scanner constructors are now deprecated, because (A) they sometimes left input files open and (B) the logic was confusing - it is now strictly the caller's responsibility to open and close input files.
  • Complete refactoring of the *Evaluator and the SimpleCompiler classes. Important notice: ScriptEvaluator.evaluate() had to be renamed to ScriptEvaluator.getClazz() due to a method signature clash with ExpressionEvaluator.evaluate().
  • Improved the JAVADOC of the *Evaluator and the SimpleComplier classes.
  • Resolved the following issues:

Version 2.4.2, April 24, 2006

Version 2.4.1, April 12, 2006

Version 2.4.0, March 13, 2006

  • Major redesign of the Java class hierarchy -- basically the "uplink" of the AST objects is no longer set by a constructor parameter, but by the constructor of the superordinate AST object. As a consequence, the creation order of AST objects is no longer top-down, but bottom-up. This makes code that creates an AST significantly shorter.
  • The UnitCompiler is now context-free, i.e. it can resolve types, constant values etc. without compiling the unit. This is necessary for the upcoming JGrep utility (see below).
  • Started work on the new JGrep utility -- a command line tool that analyses a set of source files in a highly configurable way.
  • Resolved the following issues:

Version 2.3.18, February 23, 2006

Version 2.3.17, January 18, 2006

Version 2.3.16, December 25, 2005

Version 2.3.15, November 9, 2005

Version 2.3.14, November 2, 2005

  • Added the CachingJavaSourceClassLoader.

Version 2.3.13, October 28, 2005

  • Added the missing Compiler.compile(Resource[]).

Version 2.3.12, October 25, 2005

  • The creation of class files by org.codehaus.janino.Compiler is now based on the new ResourceCreator class, so they can not only be stored in files but anywhere (e.g. in a database). (Requested by Andreas Schmidt 2005-10-19.)

Version 2.3.11, October 19, 2005

  • Added Traverser for static code analysis.
  • Removed some superfluous getters.
  • Renamed some productions from "*Declarator" to "*Declaration". (It is sometimes difficult to understand the difference between the two.)
  • Renamed visit(...) methods to accept(...) for conformance with GoF "Design Patterns".
  • Resolved the following issue:

Version 2.3.10, October 18, 2005

Version 2.3.9, October 11, 2005

Version 2.3.8, August 9, 2005

Version 2.3.7, July 24, 2005

Version 2.3.6, July 15, 2005

Version 2.3.5, July 06, 2005

Version 2.3.4, May 25, 2005

Version 2.3.3, May 05, 2005

Version 2.3.2, March 22, 2005

  • Made Scanner.Location a top-level class.
  • PackageDeclaration and ImportDeclaration are now AST objects.
  • ResourceFinder.findResource() no longer returns a URL object, but a more abstract ResourceFinder.Resource object (requested by Michael Orth 2005-03-22).

Version 2.3.1, February 20, 2005

Version 2.3.0, January 31, 2005

Version 2.2.0, January 02, 2005

Version 2.1.0, December 09, 2004

  • Switched from GNU "Lesser General Public License" (LGPL) to Apache License 2.0.
  • Added equals()code> methods to ByteArrayClassLoader and EvaluatorBase.

Version 2.0.17, December 06, 2004

Version 2.0.16, November 19, 2004

Version 2.0.15, November 9, 2004

Version 2.0.14, November 1, 2004

Version 2.0.13, October 27, 2004

  • More refactoring of the "IClassLoader" hierarchy. Added some nifty Iterators like NestedIterator, TransformingIterator, and the IteratorCollection (a Collection that reads its elements from a delegate Iterator while it is being iterated for the first time).
  • The net.janino.tools.Disassembler now has a verbose mode.

Version 2.0.12, October 17, 2004

  • Total rewrite of the "IClassLoader" hierarchy. This simplifies the lookup of IClasses.
  • Cache the return values of getConstantValue().
  • Eliminated a lot of compilation warnings.

Version 2.0.11, September 27, 2004

Version 2.0.10, September 14, 2004

  • SimpleCompiler, ClassBodyEvaluator and ScriptEvaluator now add SOURCE and LINES debugging info, so file name and line number appear in exceptions thrown by generated code. (Requested by Mike Hebert 2004-09-11.)
  • Allow for source code level debugging of the same by writing a temporary source code file if the optionalFileName parameter of net.janino.Scanner's constructors is null and system property net.janino.source_debugging.enable is "true". The source code file is written to net.janino.source_debugging.dir or the system's default temp directory. (You need to add that directory to your debugger's "source lookup path".)

Version 2.0.9, September 5, 2004

  • Unparsing classes generated by EvaluatorBase generated no output.
  • Optimized compilation of constantly-false IF statements.
  • Fixed the following bug:
  • Fixed up JLS2 15.12.2.2.BL2.

Version 2.0.8, August 29, 2004

  • Fixed several bugs in the net.janino.UnparseVisitor.
  • Decimal long literal tokens were misinterpreted as octal.

Version 2.0.7, August 25, 2004

  • Implemented the net.janino.UnparseVisitor that unparses a parsed construct, e.g. a compilation unit (requested by Mark Proctor).
  • Made all nested classes of net.janino.Java public to allow for generation of "synthetic" constructs (requested by Mark Proctor).

Version 2.0.6, July 23, 2004

  • Implemented the following feature request:
  • Introduced base class net.janino.Scanner.LocatedException for all JANINO-related exceptions.
  • Fixed some JDK 1.2.2 compatibility problems.

Version 2.0.5, July 12, 2004

  • Fixed the following bug:
  • Implemented the concept of "fast" expression evaluators and script evaluators, as proposed by Volker Augustin 2004-06-14.

Version 2.0.4, June 29, 2004

Version 2.0.3, May 31, 2004

  • net.janino.ExpressionEvaluator now supports null expression types; this auto-wraps primitive values as necessary. (Requested by Amir Bar-Or 2004-05-31).

Version 2.0.2, April 15, 2004

  • Janino now optionally creates warnings.
  • Added warnings about implicit access to fields
  • Added warnings about violations of SUN's naming conventions (JLS2 6.8)

Version 2.0.1, April 11, 2004

Version 2.0, April 4, 2004

A major milestone... Janino now supports member types, local classes and anonymous classes. Therefore you can legitimally call a fully implemented JavaTM compiler!

A good time to open a bottle of champagne...

Version 1.0.22, February 16, 2004

  • net.janino.Compiler now reports up to 20 compile errors before it gives up. (Notice that scanning, parsing and I/O exceptions are still fatal and terminate compilation.)

Version 1.0.21, February 03, 2004

  • Complicated array instantiations did not work.
  • Replaced Java's URLClassLoader with the custom PathClassLoader. This solves the problems with case-insensitive file names.
  • Fixed the following bug:

Version 1.0.20, January 27, 2004

  • Implemented line number tables ("-g:lines") and source file information ("-g:source").

Version 1.0.19, January 24, 2004

Version 1.0.18, January 24, 2004

  • Fixed up resolution of class names (JLS 6.5.5.2).

Version 1.0.17, January 21, 2004

  • Implemented non-primitive class literals.
  • Fixed up the "if statements and reachability" issue.
  • Fixed the following bug:

Version 1.0.16, January 17, 2004

  • Fixed one "Invocation of constructor/method ... is ambiguous" bug reported by Chris Cleveland 2004-01-14 03:26.
  • Fixed the following bug:

Version 1.0.15, January 17, 2004

Version 1.0.14, January 12, 2004

Version 1.0.13, January 8, 2004

Version 1.0.12, January 7, 2004

Version 1.0.11, January 6, 2004

Version 1.0.10, January 4, 2004

Version 1.0.9, January 3, 2004

Version 1.0.8, January 2, 2004

Version 1.0.7, December 25, 2003

Version 1.0.6, December 15, 2003

  • Added the "JavaSourceClassLoader" (requested by Richard Lewis 2003-11-14) and the "janino" utility that scans, parses, compiles, loads and executes classes on-the-fly.

Version 1.0.5, November 26, 2003

Version 1.0.4, November 18, 2003

Version 1.0.3, November 12, 2003

Version 1.0.2, October 30, 2003

Version 1.0.1, October 23, 2003

Version 1.0, October 20, 2003

  • Wow, version 1.0 finally made it. If you also feel that Janino 1.0 were a good reason to drink a glass of champagne, do not hesitate. (Maybe, as a sign of recognition, you could send me the open bottle and I'll drink it up ;-) My postal address is on janino.net)

Version 0.3.17, October 09, 2003 (not released)

  • Methods declared in interfaces of object were not found when invoked (reported by Fabrice Carnet 2003-10-07).
  • java.lang.VerifyError when loading a class compiled by Janino which invokes a method of an interface with more than zero parameters (reported by Fabrice Carnet 2003-10-07).
  • ExpressionEvaluator, ScriptEvaluator and ClassBodyEvaluator now have constructors that allow for the specification of class and/or method name (requested by Fabrice Carnet 2003-10-07).

Version 0.3.16, October 06, 2003 (not released)

  • Basically a complete rewrite of the IClass loading mechanism. This solves many problems related to using Janino with custom ClassLoaders (e.g. in J2EE environments). (Reported by Laurent Millet 2003-09-24.)

Version 0.3.15, September 12, 2003

  • "net.janino.*Evaluator" now have constructor variants that allow the specification of extended / implemented types. This allows for providing a base class that supplies static "helper functions" (e.g. "println()"). (Requested by Till Brychcy 2003-09-10.)

Version 0.3.14, July 27, 2003

  • "net.janino.Compiler" can now compile a set of source files with forward references (requested by Richard Lewis 2003-07-24).
  • Documented the "import" feature of ScriptEvaluator and ExpressionEvaluator.
  • "Outer.Inner" was not properly resolved within ambiguous names.

Version 0.3.13, July 6, 2003

  • Rewrote the "ClassBodyEvaluator"; can now be instantiated.
  • "ClassBodyEvaluator" can now generate a class that extends / implements classes / interfaces (Requested by Richard Lewis 2003-06-28).
  • Cleaned up "EvaluatorBase"; eliminating code duplicated between the various "*Evaluator" classes.

Version 0.3.12, June 4, 2003

  • Fixed up method invocation conversion (reported by Antony Miguel 2003-06-02).
  • Fixed a problem with for/while/do loops with constant true conditions. (Reported by Antony Miguel 2003-06-02).
  • Made tons of methods and classes PUBLIC, as proposed by Antony Miguel 2003-06-03.

Version 0.3.11, June 1, 2003

  • Implemented "synchronized" statement (requested by Antony Miguel 2003-05-22).
  • Moved common functionality from "ExpressionEvaluator", "ScriptEvaluator" and "ClassBodyEvaluator" into a common base class "EvaluatorBase".
  • The generated class files and the IClassLoader used to load classes defined outside the current compilation unit are now stored in thread-local globals. The IClassLoader also holds the formerly global IClass cache, which caused a memory leak (reported by Fabrice Carnet 2003-05-20).
  • IClass.isAssignableFrom(net.janino.IClass) did not handle primitive types (reported by Fabrice Carnet 2003-05-20).
  • Multiple expressions, scripts and class bodies can now be loaded into the same ClassLoader, if that is a ByteArrayClassLoader. This is necessary if the expressions, scripts and classes need to refer to each other. (Requested by Fabirce Carnet 2003-05-20.)
  • A "for" statement with an empty condition (e.g. "for(;;)") caused a java.lang.NullPointerException.
  • The net.janino.ClassLoaderIClassLoader.ReflectionIClass holds a map that guarantees that java.lang.Classes and IClasses map one-to-one. This posed a memory leak. (Reported by Fabrice Carnet 2003-05-20.)
  • Documented the ClassBodyEvaluator.

Version 0.3.10, April 22, 2003

  • Fixed up invocation of interface methods (reported by Reimond Bernstein 2003-04-14).
  • Added references to types in same package, but different compilation unit.
  • Fixed up C-style array variable declaration ("int a[] = ...") (reported by Reimond Bernstein 2003-04-14).

Version 0.3.9, April 02, 2003

  • Added the "ClassBodyEvaluator" and the "ClassBodyDemo" class. These allow you to compile a "class body", i.e. a series of methods, variable declarations etc. (requested by Fabrice Carnet 2003-03-18).
  • Fixed up "IClass.getArrayType()" which only worked for loaded classes, but not for classes in the current compilation unit.
  • The java.lang.ClassLoader used to load the just-compiled class now uses as its parent the current thread's context class loader (reported by Fabrice Carnet 2003-03-26).

Version 0.3.8, March 05, 2003

  • Fixed a bug in the flow analysis code (caused a compile-time error) (reported by Fu Li Chen 2003-02-21).
  • "IClass" now uses "Thread.currentThread().getContextClassLoader().loadClass()" instead of "Class.forName()" (feature requested by Dain Sundtrom 2002-02-16).

Version 0.3.7, November 26, 2002

  • Added "this" (reference to current instance). Added primitive class literals (e.g. "int.class"). Fixed several showstopper bugs. Added limited support for member classes.

Version 0.3.6, November 22, 2002

  • Added reference comparison. Added ScriptEvaluator constructors that read from InputStream, Reader or Scanner.

Version 0.3.5, November 14, 2002

  • Only the last import-on-demand directive in a compilation unit did work; using a class imported by an amport-on-demand directive other than the last one caused a compilation error. (Reported by Audrius Meskauskas 2002-11-14.)

Version 0.3.4, November 9, 2002

  • Updated the overview page.

Version 0.3.3, October 26, 2002

  • Renamed "ExpressionTest" and "ScriptTest" to "...Demo". Fixed up several JAVADOC bugs. "ExpressionEvaluator" now has a "thrownExceptions" parameter. Added support for "void" type expressions to "ExpressionEvaluator". Added JAVADOC comments. Clean up. Fixed a bug in "AmbiguousName.reclassify()".

Version 0.3.2, October 21, 2002

  • Fixed a few more bugs reported by Jimmy.

Version 0.3.1, October 13, 2002

  • Fixed an ArrayStoreException in ScriptEvaluator that was reported by Russell White 2002-06-25.
  • Added reclassification of fully qualified type names: E.g. cast operation "(HashMap) xyz" did work, but "(java.util.HashMap) xyz" didn't. Reported by Jimmy 2002-10-13.

Version 0.3, May 25, 2002

  • Added most missing language elements that I planned to add. The JLS is now almost completely implemented, except for nested classes and interfaces.
  • This is the first version of JANINO that I will "advertise". Let's see if anybody wants to use the tool... After all it's a 80 percent complete JavaTM compiler in only 11000+ (well-documented) lines of code!

Version 0.2, April 28, 2002

  • Almost a rewrite. Added several painfully missing language elements.
  • Added more JAVADOC.

Version 0.1.1, November 09, 2001

  • Added missing sample source files to the runtime package.
  • Added break and continue.
  • Added lots of JAVADOC comments.

Version 0.1, October 30, 2001

  • Initial release