Below is a list of inconsistencies we have found between Beanshell
(in strict Java mode) and Sun's Java compiler.
Given a class A with a subclass B which defines a method x,
Beanshell accepts code along the lines of
a = new B();
works just fine (it shouldn't) - the type information isn't acting as a
filter as to what messages are acceptable.
Under Java 1.5, sending capacity() and ensureCapacity() messages
to instances of StringBuilder results in method invocation errors.
Private instance variables can be directly accessed - Beanshell
silently uses the getters and setters (even in strict Java mode).
Literal Strings are treated as if they had been created with new
Hence "fred" == "fred" evaluates to false.
The use of the suffixes F and L for float and long literal values when
assigning to variables is not enforced.
Using the postfix operators ++ and -- with values of type double or
float results in the error: "bsh.InterpreterError: bad double
& and | are supported as bitwise operators but not as Boolean