Name: laC46010 Date: 08/26/99
Javac (jdk1.1-jdk1.3beta) doesn't detect an unassigned local blank final variable.
Inner Classes Specification, section "Blank finals and final local variables", says:
"A blank final must be assigned an initial value, at most once."
See reduced JCK test source and logs below:
---------------------------------------------------------------dasg00110.java
public class dasg00110 {
public static void main(String args[]) {
final int j; // compile-time error
}
}
-----------------------------------------------------------------------------
Results of compilation:
> java -version
java version "1.3beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O-release, 1.3beta-O-release, interpreted mode)
> javac -d . dasg00110.java
> echo $?
0
>
-----------------------------------------------------------------------------
======================================================================