Downloads and change log
Back to the JANINO home page
Version 3.1.13 (only available as source code)
Version 3.1.12 2024-02-06
- Fixed issue #212 "Assignment conversion not possible from type
- Fixed issue #209: Use Java's ServiceLoader instead of org.codehaus.commons.compiler.properties
- Added test case for issue #169 "Problems with varargs and inheritance".
- Fixed issue #210 "CompilerException with static inner classes".
Version 3.1.11 2023-11-27
- Implemented the Java 15 feature "text blocks".
- Fixed issue #209 "Use Java's ServiceLoader instead of org.codehaus.commons.compiler.properties".
- Bug fixed: Unlabeled BREAK did break a labeled statement, which is wrong (it breaks the loop enclosing the labeled statement).
- Fixed issue #208 "spark compilation failed with ArrayIndexOutOfBoundsException"
Version 3.1.10 2023-07-04
- Fixed issue #205: Classpath: Class archive file naming: Removed the file name check for class file archives; previously: *.jar and *.zip
- Fixed issue #201: A Stack overflow error: Catch StackOverflowError in all relevant API methods 8e.g. "cook()" and "guessParameterNames()") and convert it into a CompileException.
- Fixed issue #204: Evaluate method is ambiguous: Changed method "evaluate(Object...)" back to "evaluate(Object[])", and added a method "evaluate()" for convenience.
- Fixed issue #202: Gracefully degradation if loading system properties throws an SecurityException
- Fixed issue #182: Incompatible return types, when there are multiple methods with different return type
- Fixed issue #188: Some expressions are failing without explicit cast of null
- C++-style comment before EOI caused an internal compiler error.
- Fixed issue #195: "Redefinition of constructors and methods allowed".
-
AutoIndentWriter: flush() / close(): The "tabulatorBuffer" and the "lineBuffer" were flushed in the wrong
order, leaving the tabulatorBuffer unflushed under some conditions.
- Fixed issue #196: "First type argument in ReferenceType lose its type arguments".
- Fixed issue #183: "Add Automatic-Module-Name to MANIFEST.MF".
Version 3.1.9 2022-11-16
- Merged pr #189 "Implement implicit conversions to Arrays with Annotations".
- Reproduce issue #188 "Some expressions are failing without explicit cast of null".
- Fixed issue #187 "Compilation of vars initialized in different if/else branches is failing".
- Fixed issue #185 "InternalCompilerException while compiling variables initialized in while condition".
- Added the "-benchmark" command line option.
- Fixed issue #182 "Incompatible return types, when there are multiple methods with different return type".
- Eliminated generation of empty StackMapTable attributes.
Version 3.1.8 2022-09-01
- Generation of the StackMapTable is finally correct! However, the default tar version is still 6.
- Regression tests finally pass for target version 8!
- Fixed an AccessControlException with JRE 7.
- Fixed issue #172 "SimpleCompiler Variable Bug", and also for VOID return type. Added test cases for issue 172 "SimpleCompiler Variable Bug".
- Added more test cases for the "ConstantValue" attribute.
- Added fix and regression test case for issue #177 "ClassFormatError when assigning integer to constant double". Added test cases.
- Fixed issue #174: "Byte code is 350 times larger due to StackMapTable, JVM crashes when loading the class". Added test cases.
- Implementing nested types didn't work (dollar signs in class name).
- Added code for debugging the loading of .class file and source files.
- Added fix and regression test case for issue #178 "Janino incorrectly thinks variables are uninitialized". Added regression test cases.
- Issue #176: "String s = System.out.println();" throws an InternalCompilerException
- Implemented a system property "org.codehaus.janino.CodeContext.suppressStackMapTable" (boolean).
- Fixed Issue #168 "commons-compiler-jdk: Unable to load class".
- Added JDISASM with scope "test" because some test cases now need JDISASM.
- Fixed GITHUB PR #10: Replace if condition with literal if possible to simplify if statement
- Allow variable declarators between the LV declaration and the IF statement iff none of the VDs modify the LV.
- Added "-Xverify:all" to all run configuration to enforce the strictest bytecode verification possible.
- Test case "JlsTest.test_9_7_1__Normal_Annotations2()" choked because of annotation-type element value (annotation type is described by an UTF8 CPE, not a CLASS CPE).
- Fixed issue #167 "After a successful compilation, compiling identical (or similar) code fails with an assignment conversion error".
- Moved the "getArrayIClass(...)" methods from "IClass" to "IClassLoader", and keep the array classes per-class-loader (which is important because arrays refer to java.lang.Object). Also added a test case.
- Removed JUnit launch configurations for Java 12, 15 and 16, which are no longer supported.
Version 3.1.7 2022-04-19
- Merged PR #148 "Correct the logic to truncate Stack map in CodeContext.restoreLocalVariables".
- Merged PR #163 "Add SUPER flag for package member types only (#163)".
- Fixed issue #166 "Get generate method bytecode size".
- Added a test case for issue #165.
- Fixed issue #165 "Compilation failure when a class and package name match case insensitively".
- Replaced "new (Byte|Short|Integer|Long|Float|Double|Character|Boolean)(...)" with "valueOf(...)".
- Replaced types "Visitor.*Visitor" with "*Visitor".
- Fixed issue #135 again; this time right.
- Fixed Issue #155 "Enhanced FOR statement does not work with primitive variable".
- Verified compatibility with Java 17.
- Began to extend IClass and ClassFile for generics; specifically added IType and ITypeVariable. However generics are not yet supported; work in progress (although regression tested).
- Implemented private interface methods (a Java 9 feature).
- Further simplified the org.codehaus.commons.compiler.jdk.SimpleCompiler: It now uses a delegate o.c.c.c.j.Compiler, which saves a lot of duplicate code.
- Major refactoring of org.codehaus.commons.compiler.jdk to get rid of duplicate code.
- Fixed the error handling of the o.c.c.c.jdk.(Compiler|SimpleCompiler); added respective test cases.
- Marking the SimpleCompiler as "cooked" was not reliable.
- Static and default interface methods were still declared as "not implemented" on the home page, while they are already implemented! Updated the home page, added some test cases and fixed a minor bug.
- Added a test for the "diamond operator".
- Removed all "redundant type arguments", i.e. made use of the "diamond operator". This became possible because support was dropped for Java 6.
- Also dropped support for "funny" intermediate Java versions 9 and 10.
- Dropped support for Java 6. Thus, Janino is now compiled against the JRE 7 runtime.
Version 3.1.6 2021-07-28
- Fixed issue #151: Calcite tests fail with compiler error
- Added a test case that reproduces issue #151.
- #141 Class loader workaround so that Calcite doesn't need to change. (#150)
Version 3.1.4 2021-05-06
- Fixed issue #146: Local variables are wrongly trimmed in a stack
- Fixed issue #145: NaN comparisons are handled incorrectly
-
Fixed issue #144: Can't parse a < b in some case: Made the parser modal: "a < b, c > d" is an expression list
in some contexts (array initializer, method invocation), and a variable declaration in others (block
statement).
-
Fixed issue #141: Unable to find org.codehaus.commons.compiler.properties in java 11: ICompilerFactories were
loaded through the current thread's "context class loader", which is a bad choice in some environments. Thus,
the methods "getDefaultCompilerFactory()", "getAllCompilerFactories()" and "getCompilerFactory(className)"
were duplicated and augmented with a "classLoader" parameter.
Version 3.1.3 2021-01-25
-
Issue #136: New BSD License?
janino-parent/pom.xml:
- Changed license name from "New BSD License" to "BSD-3-Clause", because https://maven.apache.org/pom.html#Licenses recommends "... Using an SPDX identifier as the license name...".
- Changed license URL from "https://raw.githubusercontent.com/janino-compiler/janino/master/LICENSE.txt" to "https://spdx.org.licenses/BSD-3-Clause.html", because the latter is probably the most reliable and stable copy. (We are already using the SPDX identifier, see above, so it appears reasonable to link to the SPDX web site.)
-
Generating MethodInfos:
Don't include thrown exceptions that are parameterized, e.g.
"void meth() throws EX {...}",
because we don't generate "Signature" attributes for methods, and "throws Throwable"
would cause compilation problems when the class is loaded later, e.g. by ClassFileIClass.
- Fixed one StackMap-related NPE.
- Issue #135: AssertionError for SimpleCompiler.cook when using DeepCopier
- More StackMap-related fixes.
-
Fixed issue #129:
Script evaluating does not work for java 11 when there is annotation processor (#130)
-
Bump junit from 4.12 to 4.13.1 in /janino-parent (#134)
Bump ant from 1.7.1 to 1.9.15 in /janino (#132)
-
Integrated Pull request #130:
Fixed issue #129:
Script evaluating does not work for java 11 when there is annotation processor
- Janino's default source version is now 11, and the default target version is 6.
-
Fixed issue #131: Janino 3.1.2 is 10x slower than 3.0.11:
The Compiler's IClassLoader was initialized way too eagerly,
thus lots of classes were loaded from the class path, which is very slow.
-
The default source version was not processed correctly; now it is derived from the system property
"java.specification.version" ("Java Runtime Environment specification version").
-
Fixed "org.codehaus.commons.compiler.tests.EvaluatorTest.testAnonymousFieldInitializedByCapture()"
test case.
- Fixed issue #69: Invocation of static interface method.
-
Stack map computation is now complete, but the generated StackMapTable attributes is still buggy.
Thus the default target version is still 6, so that the attribute is *not* written.
The test case for issue now succeeds, thanks to this new feature.
-
Stack map generation is now working; however the saved StackMapTable attribute is still buggy.
-
Changed the return type of "IScriptEvaluator.createFastEvaluator()" from "Object" to "T".
(This does not break binary compatibility, because "T" eventually compiles to "Object".)
- Issue #124: Janino Sandbox, JVisualVM cannot connect to the application
-
Added "ICookable.setSourceVersion()" and "ICookable.setTargetVersion()" in order to implement JAVAC's "-source"
and "-target" command line options.
Version 3.1.2, 2020-03-18
- Fixed Issue #119 -- there was an ASSERT statement with a side effect.
- Merged PR #117 which successfully fixes issue #116.
- Reproduced issue #116 with new test "JlsTest.test_15_25__Conditional_operator__2()".
- Upgraded TXT2HTML version from 0.0.1-SNAPSHOT to 1.0.0.
-
Improved the encoding of stack map frames according to JVMS11 4.7.4: Previously, only "full_frame"s were
generated.
Version 3.1.1, 2020-03-09
- Merged pull request #114 "Grow the code for relocatables, and do fixup, and relocate".
-
FINALLY is no longer implemented with JSR-RET. (Java 6+ .class files forbid JSR and RET). Another step towards
Java 7+ .class files!
-
Got rid of "CodeContext.flowAnalysis()" (approx. 500 LOC!), who's sole purpose was to compute the .class files'
"maxStack" attribute - we now get that through the computed stack maps.
- Added support for JDISASM option "printAllOffsets".
- Enable generation of "StackMapTable" attribute by default.
- Major rewrite of UnitCompiler and CodeContext to implement the generation of the StackMapTable attribute.
- Upgraded JANINO JAVADOC from 8 to 11. Beautified the ASCII art in "overview.html".
-
Fixed issue #107: Janino requires "org.codehaus.commons.compiler.io", but commons-compiler does not export this
package
Yes, that package was missing from the exports list, plus several more.
-
Added the concept of the "LocatableResource" declaring "getResource()", which simplifies the interfacing with
"ClassLoader".
-
Minor refactoring: Moved the methods "setParentClassLoader()", "setDebuggingInformation()" and
"set(Error|Warning)Handler()" from "ICookable" to "ISimpleCompiler", "IClassBodyEvaluator", "IScriptEvaluator"
and "IExpressionEvaluator", where they belong.
- Throw an NYI CompileException when a static interface method is invoked.
- Fixed "testIssue69_IncompatibleClassChangeError_when_evaluating_against_janino9plus()".
- Make DISASSEMBLER options configurable through system properties.
- When a method was compiled and then stored in a ClassFile, then the "variableArity" flag was lost.
- Renamed all "@Nullable optionalXyz" variables, fields and parameters to "@Nullable xyz" for consistency.
-
Big rewrite of the ExpressionEvaluator - ScriptEvaluator - ClassBodyEvaluator - SimpleCompiler - Cookable
hierarchy:
Previously, these classes EXTENDED from left to right, which was always a bit awkward: Actually an
ExpressionEvaluator IS NOT a ScriptEvaluator (asf.).
To clean up that mess, the classes now DELEGATE instead of EXTENDING: ExpressionEvaluator now HAS a
ScriptEvaluator (asf.). This works much better than the old model, and is so much cleaner.
Strictly speaking, this is an INCOMPATIBLE CHANGE. However I am very sure that nobody ever (intentionally)
RELIES on the old class hierarchy, e.g. assigns an ExpressionEvaluator object to a ScriptEvaluator variable.
Also, the "trick" to NOT load the generated classes immediately, but process them differently (the
"ExpressionCompiler") now works differently... need to update the documentation to accomodate for this.
The methods "org.codehaus.commons.compiler.ISimpleCompiler.setPermissions(Permissions permissions)" and
"...setNoPermissions()" were removed and replaced with the "org.codehaus.commons.compiler.Sandbox".
-
The concept of the "ExpressionCompiler" was completely refactored: Instead of EXTENDING the
"ExpressionEvaluater" in order to keep it from loading the generated bytecode, the ExpressionEvaluator now has
a "getBytecodes()" method, and there is no more for an "ExpressionCompiler" class.
- Bug in "testAnyType()": An ExpressionvEvaluator must be cooked at most ONCE.
- Fixed the promotion of the array access index expression (see JLS7 15.13 Array Access Expressions).
- Fixed issue #108: Improve Sandbox
- Fixed issue #104: ClassLoaderIClassLoader 's ClassNotFoundException handle mechanism enhancement
- Refactored class "TeeReader" to method "Readers.teeReader()".
- Path to JAVAC executable is no longer hard-coded in "janino-parent/pom.xml".
- Added test case for issue #102.
- Eliminated the mis-named package "org.codehaus.commons.io".
- Moved the two remaining classes of package "org.codehaus.commons.io" to "org.codehaus.commons.compiler.io" resp. ".util" for consistency.
-
Fixed issue #101: Using ResourceBundles with Java Class in SQL Database
Removed the support for "ClassLoader.getResourceAsStream(String)" again - delegation is better than inheritance.
Added "setResourceFinder(ResourceFinder)" to support "ClassLoader.getResourceAsStream(String)".
Added test cases.
-
Renamed "setEncoding(Charset)" to "setSourceCharset(Charset)", and leave the old method delegating to the new.
Version 3.1.0, 2019-08-14
In this release, many classes were moved from module janino
to module commons-compiler
,
thus their package declarations changed.
The "important" APIs, however, remain unchanged. All in all, it was decided to release this as a "minor" release.
-
Moved some test which are implementation-independent from "org.codehaus.janino" to "org.codehaus.commons-tests".
-
Continued work on "jdk.Compiler". Thus moved lots of code from "janino" to "commons-compiler", and also the
CompilerTests.
-
Removed the (previously deprecated) "JaninoRuntimeException"; moved the "InternalCompilerException" from
"janino" to "commons-compiler".
-
Added a test that illustrates issue #98 "Is there a convenient way to compile multi class form different
package?".
Version 3.0.16, 2020-03-18 (the 3.0.x line is deprecated)
-
Fixed Issue #119 -- there was an ASSERT statement with a side effect.
Version 3.0.15, 2019-07-28
Version 3.0.14, 2019-07-05
Version 3.0.13, 2019-06-23
- Added compile error handler and warning handler to ICompiler.
- Added "parsePackageDeclaration()" for better backwards compatibility.
- Static single imports did not work for top-level class declaration annotations.
- Added test cases for the ternary operator.
-
Issue #91: Read and modify line number table
during compilation
-
Test case that reproduces the "NotNullByDefault.java, Line 49, Column 11: Expression TYPE is not an rvalue"
bug.
-
Issue #90: "Incompatible expression types" or
verification errors when using ternary expressions with null in one branch
-
Issue #88: Support for JDK 9/10 in Full
Compiler
-
Issue #86: OSGi Manifest: optional Ant
dependencies in OSGi metadata
-
Issue #85: "Ternary expression resolves to
strange supertype"
-
The syntax elements that can have modifiers now all have sets of "is...()" methods that check for each
modifier. Some also have methods "getAccess()" and/or "getAnnotations()".
-
Issue #83: Implement "type annotations"
(JLS8 9.7.4)
- Implemented parsing (but not compilation) of "modular compilation units" (JLS11 7.3).
-
Simplified the debug configuration; instead of "-D disasm=true" use "-D
UnitCompiler.disassembleClassFilesToStdout=true".
- Allow space in empty method/constructor body (for "}" alignment).
-
CheckStyle clean-up with cs-contrib 1.2.19: Now not only the "{" of method declarations must be aligned, but
also the "}".
- Added test cases for Java modifiers.
-
Replaced all "assert...Uncookable(..., Pattern messageRegex)" and "assert...Uncookable(..., String
messageInfix)" method pairs with a single "assert...Uncookable(..., String messageRegex)" method.
-
Minor refactoring: Allowed modifiers are now checked in the Parser, not in Java.*. This saves a lot of THROWS
clauses.
-
Major refactoring: Access modifiers (public, static, ...) and annotations now exist in a proper type hierarchy;
the parser no longer uses the (.class file-related) "Mod" class.
- Added "allowMultipleArgsPerLine=true", because that makes sense with VARARGS arguments.
-
Issue #78: Parse Type inference syntax:
Type inference for generic instance creation implemented, test cases added.
-
Issue #77: Parse MethodReference,
ClassInstanceCreationReference and ArrayCreationReference
Version 3.0.12, 2019-01-18
Version 3.0.11, 2018-11-13
Version 3.0.10, 2018-09-16
Version 3.0.9, 2018-08-23
Version 3.0.8, 2017-12-04
Version 3.0.7, 2017-03-22
Version 3.0.6, 2016-09-20
- Replaced the ANT-based deployment to oss.sonatype.org with MAVEN.
Version 3.0.5, 2016-09-15
- Module "commons-compiler" had the wrong packaging.
Version 3.0.4, 2016-09-15
- Module "janino-parent" was not staged.
Version 3.0.3, 2016-09-15
- Maven module dependencies didn't work.
Version 3.0.2, 2016-09-15
Version 3.0.1, August 22, 2016 - Download
- Implemented enum declarations.
- Implemented underscores in integer and floating-point literals.
- Implemented hexadecimal floating-point literals.
- Implemented binary integer literals.
-
Merged pull request #3: When adding an entry into
constant pool, it's index should be <= 65534, or <= 65533 if it's wide.
-
Major refactoring and simplification of the scanner; the "doc comment" and "expect greater" features were moved
to the parser (where they actually belong).
- Implemented the enum switch statement.
- Class literals in interface field initializers caused errors in the "flow analysis" phase.
-
IExpressionEvaluator: Marked the "ANY_TYPE" feature as deprecated.
It implements sort of an "autoboxing" mechanism, which is unnecessary since Java 5.
-
JSH: Added the "interactive mode", and thus moved the tool from project "commons-compiler" to project "janino",
because the specific parsing for interactive mode is only possible with a JANINO-dependent "StatementEvaluator"
class.
-
Added "
enum.values()
" and "enum.valueOf(String)
".
Version 3.0.0, July 7, 2016 - Download
After a relative long period of little development, new features appear on the horizon! Enums and annotations
finally made it into JANINO...
- JANINO-186: Code size error message should include method name: Also report when the constant pool size limit is exceeded.
- JANINO-185: Improve logging: Replaced good ol' "if (DEBUG) System.err.println(...)" with "java.util.logging".
- "org.codehaus.janino.ScriptEvaluator" now supports the concept of "local methods".
- Implemented annotations (declarations and uses)
- Implemented enums (uses only)
- Added (limited) support for method type parameters.
- Added support for annotations on package declarations.
- Added an "architectural overview" in the JAVADOC.
Version 2.7.8, January 30, 2015 - Download
- JANINO-186: Code size error message should include method name
Version 2.7.7, December 6, 2014 - Download
- JANINO-182: Reference types "java.lang.Double" and "java.lang.Float" don't match
- JANINO-184: "Operand stack incosistent..." exception while compiling legal (but dead) code
Version 2.7.6, August 16, 2014 - Download
-
'IClass.findIMethod(name, parameterTypes)' now ignores synthetic bridge methods by picking the method with the
most significant return type.
- JANINO-180: NullPointerException with JDK8
-
Reclassification of 'empty package types' was forgotten (JLS7: 6.5.2.BL1.B3.1 and .2). This caused
'EvaluatorTests.testWideInstructions()' to fail.
- JANINO-178: ConcurrentModificationException while compiling anonymous class
- JANINO-179: ClassCastException: ReflectionIClass
- JANINO-174: MethodDescriptors should be cached in IMethod.getDescriptor
- JANINO-172: qualified-name reclassifcations broken
- JANINO-181: Add OSGi info in manifest.
Version 2.7.5, Jul 13, 2014 - Download
- JANINO-173: [janino-user] Dynamically loading from source + AST walk & transforms
- JANINO-176: push latest version to maven central
- JANINO-156: Tagged releases should contain parent pom and correct versions
- Made JANINO available on MAVEN CENTRAL.
Version 2.7.4, Feb 3, 2014 - Download
- Simple implementation of type variables.
- JANINO-170: NullPointerExceptions on Google AppEngine
Version 2.7.3, Jan 19, 2014 - Download
- Implemented 'enhanced FOR statement on Iterable' (with type inference).
- Added parsing of type parameters.
Version 2.7.2, Jan 13, 2014 - Download
- JANINO-167: include Mod.is*() convenience methods
- Allow an 'ArrayType' as a 'TypeArgument'.
- Local variable declaration statement with parameterized type didn't work.
- Added the 'enhanced FOR statement' (except for Iterable, which doesn't make much sense without generics).
Version 2.7.1, Nov 13, 2013 - Download
- "Missing @Override" is no longer an error, just a warning
-
'ErrorHandler' and 'WarningHandler' moved from JANINO to COMMONS-COMPILER and can now be installed on
ICookable - useful for testing.
- JANINO-161: Operand stack underrun
- Added 'SimpleConstant'.
- JANINO-163: JANINO complains about "unreachable code"
- JANINO-164: Add VARARGS support
- Added tons of JAVADOC (thanks CheckStyle)
- Last CheckStyle clean-up corrections -- all clean now!!
- JANINO-165: Please expose Unparser's states to its subclasses
Version 2.7.0, Aug 10, 2013 - Download
- Added he 'assert' statement (simplified, ASSERTions are ALWAYS enabled, as if '-ea' were given)
- Added annotations (but not yet annotation declarations)
- Implemented '@Override'
- Dropped support for Java 1.4 and 5
Version 2.6.2, May 30, 2013 - Download
- JANINO-148: Support Java 6 class file format
- JANINO-147: JaninoRuntimeException: Cannot "set()" Offset more than once
- JANINO-149: Janino incorrectly accepts String literals with invalid escape characters
- JANINO-150: Special-value Float and Double literals don't unparse correctly
- JANINO-152: Janino does not throw exception when compiling code with exceptions listed in wrong order
- JANINO-155: Compound assignment does not implement boxing conversion
- JANINO-157: Fail to "return x": Assignment conversion not possible from type "java.lang.Object" to type "java.lang.Long"
- JANINO-153: Unable to cast from primitives to classes like Comparable
- Various enhancements to JDISASM
Version 2.6.1, June 24, 2010 - Download
- Added version information to the
META-INF/MANIFEST.MF
file of the JANINO JARs.
-
Added
CompilerFactoryFactory.getSpecificationVersion()
and
ICompilerFactory.getImplementationVersion()
.
- Fixed up the handling of debug options - added "ICookable.setDebuggingInfo(source, lines, vars)".
- Gave up on "EnumeratorSet" and "DebuggingInfo" - these mimic Java 5 ENUMs and were ugly.
Version 2.6.0, May 30, 2010 - Download
This version implements a number of incompatible changes:
-
CompileException
was moved from package org.codehaus.janino
to package
org.codehaus.commons.compiler
(and so were its buddies Location
,
LocatedException
and CausedException
).
-
ParseException
and ScanException
were removed; all methods that previously threw
one or more of CompileException
, ParseException
and ScanException
now
throw only CompileException
. (This is an API simplification honoring the fact that applications
rarely want to differentiate between scan, parse and compilation problems).
The core functionality of JANINO (expression evaluator, script evaluator, class body evaluator, simple compiler
and Java source class loader) was extracted to new interfaces declared in the new package
org.codehaus.commons.compiler
, while the original API remains unchanged.
A second implementation of the org.codehaus.commons.compiler
interfaces was added, based on the
javax.tools.JavaCompiler
API that exists since JDK 1.6. This implementation is available in the
commons-compiler-jdk.jar
file.
Rather than instantiating e.g. org.codehaus.janino.ExpressionEvaluator
directly, applications can now
alternatively call
org.codehaus.commons.compiler.CompilerFactoryFactory.getDefaultCompilerFactory().newExpressionEvaluator()
,
which will use the first implementation of IExpressionEvaluator
on the class path (be it
janino.jar
or commons-compiler-jdk.jar
, or yet another implementation).
The JUNIT regression test suite was restructured so that if differentiates between implementation-independent tests,
which are automatically executed against every implementation on the class path, and implementation-specific tests.
Also, the following bugs were fixed:
- JANINO-143: java.lang.ClassFormatError: Duplicate method name&signature in class file Transformer1$1$1
- JANINO-146: Cannot compile on Java 1.6/6 if extended class does not implement an existing bridge method
Version 2.5.16, January 26, 2010 - Download
- JANINO-128: java.lang.IllegalAccessError when trying to use function from package-protected superclass.
- JANINO-139: Importing non-existent class does not cause an error
- JANINO-122: static field access through instance variables fails
- JANINO-140: LocatedException (and subclasses such as CompileException) is not serializable
- JANINO-117: UnparseVisitor does not handle Byte or Short Literals
- JANINO-132: Inaccessible methods should be ignored for method resolution
- JANINO-133: Janino failed compiling with ClassCastException when the source code's size is too large
- JANINO-136: Covariant return types for abstract methods fail to compile
- JANINO-127: LocalVariableTable code attribute not created, giving debuggers problems with classfiles
- JANINO-126: ExpressionEvaluator isn't handling NaN correctly
- JANINO-31: IncompatibleClassChangeError when loading nested classes
- JANINO-131: instanceof returns true for null values, instead of false
- JANINO-137: Assignment conversion not possible from type "double[]" to type "double[]"
- JANINO-130: wide versions of IINC and RET are broken
- JANINO-129: incorrect max stack size
- JANINO-62: Support JSR-223 when it is finalized
- JANINO-123: SimpleCompiler throws Exception when using full-qualified Type in Signature
Version 2.5.15, June 18, 2008 - Download
- JANINO-110: Fully Qualified .class access fails to compile
- JANINO-111: UnparseVisitor does not handle precedence of operators
- JANINO-112: Access to protected members can fail across package boundaries
- JANINO-114: ArithmeticException in UnitCompiler.getConstantValue
- JANINO-115: Methods that compile to more than 32 KB of bytecode cannot be compiled
- JANINO-117: UnparseVisitor does not handle Byte or Short Literals
- JANINO-118: Contant Pool does not support >32K entries
- JANINO-119: flowAnalysis fails with GOTO_W
- JANINO-120: Janino Compiler Needs Optimizing
- JANINO-121: Some performance optimizations
Version 2.5.14, April 27, 2008 - Download
- Switched from CVS to svn (http://svn.codehaus.org/janino).
Version 2.5.13, March 9, 2008 - Download
- JANINO-106: Static imports of private fields can cause compiler to throw NPE
Version 2.5.12, December 20, 2007 - Download
- JANINO-104: AccessControlException thrown with Janino compiled code under Java Webstart
- JANINO-105: Possible to call a method of an enclosing class as if it was a member of an inner class
- JANINO-96: Feature Request: Obtain parameter information for an evaluated expression
Version 2.5.11, September 30, 2007 - Download
-
"CompileException" now extends "LocatedException", which extends "CausedException". This eliminates an
asymmetry between "ScanException", "ParseException" and "CompileException".
Version 2.5.10, September 4, 2007 - Download
- JANINO-98: compilation of overridden static methods done as invokevirtual
- JANINO-101: JCI-53: Stack overflow on cross imports in commons-jci-janino
- JANINO-99: ConcurrentModificationException due to instance variable of Class type initialized using a class literal
Version 2.5.9, July 22, 2007 - Download
- JANINO-95: ClassBodyEvaluator base class can be abstract and compile fine although it shouldn't compile
- JANINO-97: ExpressionEvaluator.createFastExpressionEvaluator calls setReturnType
Version 2.5.8, June 12, 2007 - Download
- JANINO-79: Overridden method resolution thru the inheritance chain is not correct
- Throw a
RuntimeException
if cook()
is called more than once.
Version 2.5.7, May 19, 2007 - Download
janino.jar
is now signed with a dummy certificate.
-
janino.jar
is now published as http://www.janino.net/lib/janino.jar,
so remote systems can always download the latest version from a fixed URL.
- JANINO-78: Implement Superclass field access
- JANINO-81: IncompatibleClassChangeError when invoking getClass() on interface references
- JANINO-82: Make Compiler.storeClassFile public
- JANINO-83: Code reuse in PathResourceFinder
- JANINO-84: Filter out non-existant directories in JarDirectoriesResourceFinder
- JANINO-85: Build system improvements
- JANINO-86: Make more classes/constructors public
- JANINO-92: Make(Class,Interface)DeclarationContext public
Version 2.5.6, February 26, 2007 - Download
- JANINO-72: Add Autoboxing
Version 2.5.5, February 3, 2007 - Download
- JANINO-76: Suboptimal compilation strategy for the string concatenation operator
-
Optimized the handling of string concatenation: For sequences of 4 and more operands,
the "new StringBuffer(a).append(b).append(c).append(d).toString()" is now used. (For
two or three operands, "a.concat(b).concat(c)" is used as before.) Also, if
"java.lang.StringBuilder" (the unsynchronized brother of "StringBuffer") is available
(since JDK 1.5), it is used. See Tom Gibara's excellent
article
on his "String Concatenation Benchmark".
Version 2.5.4, January 28, 2007 - Download
- JANINO-75: Duplicate Single-Type-Imports and Single-Static-Imports cause compilation errors
Version 2.5.3, January 17, 2007 - Download
-
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 - Download
- JANINO-71: Explicit constructor invocation in inner classes leads to compilation error
- JANINO-73: Compiler can't find classes anymore (since 2.5.0)
Version 2.5.1, November 6, 2006 - Download
- JANINO-68: SimpleCompiler.main run with -help isn't very helpful
- JANINO-69: Unable to resolve reference to var name from within catch block of anon inner class
- JANINO-70: Setting attributes in catch() block causes NullPointerException in UnitCompiler.reclassifyName
Version 2.5.0, September 19, 2006 - Download
-
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 - Download
- JANINO-67: classes that cause a LinkageError (duplicate class definition) when loaded
Version 2.4.6, August 20, 2006 - Download
- 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).
- JANINO-64: continue statement not enclosed bug
- JANINO-65: Janino 2.4.5 does not compile with JDK 1.5
Version 2.4.5, June 26, 2006 - Download
- 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.
- JANINO-56: VerifyError in the context of a FINALLY caluse
Version 2.4.4, June 18, 2006 - Download
-
Replaced
TunnelException
with ClassNotFoundException(Throwable ex)
, which makes
exception handling much clearer. In retrospect, TunnelExeption
has proven to be a bad concept.
- Made the last missing fields of
Java.Xxx
PUBLIC for AST manipulation.
- JANINO-57: Switch statment compiles space inefficiently for a large case span.
- JANINO-58: Janino issues "Error: For update is unreachable" where JAVAC keeps compiling
- JANINO-59: Patch to stop reporting extra errors
- JANINO-60: StackOverflowError when a local class is used
- JANINO-63: Combination of interface declaration with method that declares a thrown exception cannot be parsed
Version 2.4.3, May 11, 2006 - Download
- Added the "default imports" feature to all
*Evaluator
s.
-
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.
- JANINO-53: Java.NewClassInstance.toString() does not include arguments
- JANINO-54: Code missed out after "if (true) return;"
- JANINO-55: Nested array initializers no longer work in 2.4.2
Version 2.4.2, April 24, 2006 - Download
- Fixed some bugs in the access checking (PUBLIC, PROTECTED, PRIVATE).
- Added some tests to
JaninoTests
for class instance creation (basically JLS2 section 15.9.1).
-
The
Scanner
now warns about misplaced DOC comments -- hence we need to have a
WarningHandler
installed also on the Scanner
.
- Inner classes loaded from
.class
files could not be instantiated.
- JANINO-45: Add Parser.getScanner()
- JANINO-48: can't use arrays of inner classes, or secondary type declarations
- JANINO-50: Branch offset out of range exception
Version 2.4.1, April 12, 2006 - Download
- JANINO eventually supports access to PRIVATE methods of enclosing/enclosed instances.
- JANINO-46: Add support for setting the warning and error handlings to the ClassLoaders
- JANINO-49: access to public inner class no longer works with 2.3.17+(does with 2.3.16)
- JANINO-50: Branch offset out of range exception
- JANINO-51: Janino cannot handle array types in combination with the Java .class function
Version 2.4.0, March 13, 2006 - Download
-
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.
- JANINO-43: RuntimeException "Cannot relocate branch to unset destination offset" during compilation
- JANINO-50: Branch offset out of range exception
Version 2.3.18, February 23, 2006 - Download
- Made the members of
FormalParameter
PUBLIC.
- Empty TRY body generated invalid bytecode.
- Made "throwParseException()" PROTECTED.
- JANINO-41: Janino unreachable error with block statements
- JANINO-42: Invalid bytecode generated when invoking public method of inaccessible base class
Version 2.3.17, January 18, 2006 - Download
- Modified the
Enumerator
and EnumeratorSet
classes, inspired by "Effective Java".
- Implemented access checking (PUBLIC, PROTECTED, PRIVATE).
- JANINO-38: Compiled Code Produces "java.lang.VerifyError: ... Illegal use of nonvirtual function call" at runtime
Version 2.3.16, December 25, 2005 - Download
- JANINO-37: NullPointerException Thrown While Compiling Code w/ inner Class
Version 2.3.15, November 9, 2005 - Download
- JANINO-36: RuntimeException in CodeContext.flowAnalysis
Version 2.3.14, November 2, 2005 - Download
- Added the
CachingJavaSourceClassLoader
.
Version 2.3.13, October 28, 2005 - Download
- Added the missing
Compiler.compile(Resource[])
.
Version 2.3.12, October 25, 2005 - Download
-
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 - Download
- 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".
- JANINO-34: Propose changes to visitor to make it easier to implement
Version 2.3.10, October 18, 2005 - Download
- JANINO now works in a JDK 1.5 environment.
- JANINO-28: extending a base method that throws an exception can lead to a compile error
Version 2.3.9, October 11, 2005 - Download
- JANINO-29: Non-statement allowed by ScriptEvaluator
- JANINO-31: IncompatibleClassChangeError when loading nested classes
- JANINO-32: Multiplication error
Version 2.3.8, August 9, 2005 - Download
- JANINO-27: duplicate variable definitions are allowed
- JANINO-30: Excessive exception declared in some ExpressionEvaluator expressions
Version 2.3.7, July 24, 2005 - Download
- Added "build.xml" to "build.properties" to "janino.jar" (requested by Mark Proctor 2005-07-15).
- "janino.jar" is now uploaded to IBIBLIO (requested by Mark Proctor 2005-07-10).
- JANINO-21: Incorrect evaluation of an "if" statement
- JANINO-18: difference in generated classfiles
- JANINO-3: Split janino jar into runtime and utilities; put to ibiblio
Version 2.3.6, July 15, 2005 - Download
- Implemented
@deprecated
.
- Implemented warnings on impliclit method invocations.
- Implemented warnings on missing doc (a.k.a. JAVADOC) comments.
- JANINO-20: Add AST nodes for JavaDoc comments
- JANINO-26: exception on interface methods are not returned thru reflection
Version 2.3.5, July 06, 2005 - Download
- Added the "AstGenerator", contributed by Eugene Kuleshov.
- JANINO-24: Add support for setting ProtectionDomain on defined classes
- JANINO-22: implicit invocation thru 'this' does not work
- JANINO-23: constant propagation with final not accurate
- JANINO-25: UnitCompile.compile() calls flowAnalysis with wrong string
Version 2.3.4, May 25, 2005 - Download
-
Extracted the compilation functionality from
Java
to UnitCompiler
.
This involved some minor incompatible changes:
- Renamed
Java.CompileException
to CompileException
.
- Renamed
Visitor
to Visitor.ComprehensiveVisitor
.
-
Removed
CompilationUnit
, VariableDeclarator
and FormalParameter
from the visitors, because they are not virtual.
- JANINO-16: Invalid float/double constants
- JANINO-2: SF [ 1032563 ] "Invalid opcode 196" exception
- JANINO-17: Class Variables defined without trailing ; compile fine, probably shouldn't
Version 2.3.3, May 05, 2005 - Download
- JANINO-11: ExtendsType using ClassBodyEvaluator throws java.lang.NullPointerException
- JANINO-15: Huge performance issues on compiling large classes
- JANINO-14: org.codehaus.janino.util.enum is conflicting with Java 5 compiler
Version 2.3.2, March 22, 2005 - Download
- 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 - Download
- JANINO-5: cannot compile try-catch blocks that reference local classes
- JANINO-8: Source-level debugging of JANINO scripts doesn't work
- JANINO-9: Ancient syntax for array return type
- #1105688 undetected uninitialized variable
Version 2.3.0, January 31, 2005 - Download
Version 2.2.0, January 02, 2005 - Download
Version 2.1.0, December 09, 2004 - Download
- 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 - Download
Version 2.0.16, November 19, 2004 - Download
Version 2.0.15, November 9, 2004 - Download
Version 2.0.14, November 1, 2004 - Download
Version 2.0.13, October 27, 2004 - Download
-
More refactoring of the "IClassLoader" hierarchy. Added some nifty
Iterator
s 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 - Download
- Total rewrite of the "IClassLoader" hierarchy. This simplifies the lookup of
IClass
es.
- Cache the return values of
getConstantValue()
.
- Eliminated a lot of compilation warnings.
Version 2.0.11, September 27, 2004 - Download
Version 2.0.10, September 14, 2004 - Download
-
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 - Download
- Unparsing classes generated by
EvaluatorBase
generated no output.
- Optimized compilation of constantly-false IF statements.
- #1001362 null in expression with conditional
- Fixed up JLS2 15.12.2.2.BL2.
Version 2.0.8, August 29, 2004 - Download
- Fixed several bugs in the
net.janino.UnparseVisitor
.
- Decimal long literal tokens were misinterpreted as octal.
Version 2.0.7, August 25, 2004 - Download
-
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 - Download
- #995198 Make info public in exceptions
- 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 - Download
Version 2.0.4, June 29, 2004 - Download
Version 2.0.3, May 31, 2004 - Download
-
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 - Download
- 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 - Download
Version 2.0, April 4, 2004 - Download
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
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
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.
- #879380 Missing class
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
- #845459 Use Janino with Jasper
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.Class
es and IClass
es 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
import-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