From owner-freebsd-java Fri Mar 23 6: 4:52 2001 Delivered-To: freebsd-java@freebsd.org Received: from firewall.ox.com (firewall.ox.com [129.77.1.1]) by hub.freebsd.org (Postfix) with ESMTP id 3EC1937B71A for ; Fri, 23 Mar 2001 06:04:48 -0800 (PST) (envelope-from rfurphy@ox.com) Received: from firewall.ox.com (root@localhost) by firewall.ox.com with ESMTP id JAA28701 for ; Fri, 23 Mar 2001 09:04:47 -0500 (EST) Received: from pur-sv-exchgw1.ny.ox.com (pur-sv-exchgw1.ny.ox.com [129.77.2.49]) by firewall.ox.com with ESMTP id JAA28697 for ; Fri, 23 Mar 2001 09:04:47 -0500 (EST) Received: from ox.com (rfurphy.ny.ox.com [129.77.2.97]) by pur-sv-exchgw1.ny.ox.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 17HPFYS6; Fri, 23 Mar 2001 09:04:47 -0500 Message-ID: <3ABB57F9.2090101@ox.com> Date: Fri, 23 Mar 2001 09:04:41 -0500 From: Rob Furphy User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.17-14smp i686; en-US; 0.8.1) Gecko/20010321 X-Accept-Language: en MIME-Version: 1.0 To: freebsd-java@freebsd.org Subject: possible bug in port of javac Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Some documentation may clear up what is supposed to happen. I started start here: http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#35962 and found http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html#10931 this even describes what a 'blank final' variable is and "It is a compile-time error if a blank final class variable is not definitely assigned....." Some more examples: Using Joe Shevland's example class (and Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit) public class test { private final int someint; public test() { someint = 5; } } This compiles without error (I think it should). However, if you make a change to thispublic class test { private static final int someint; public test() { someint = 5; } } this error pops out "Blank final variable 'someint' may not have been initialized. It must be assigned a value in an initializer, or in every constructor" Using the latest beta java for linux java version "1.3.1-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15) Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode) I do not see the error in question but I get "test.java:3: cannot assign a value to final variable someint" when someint is static but no error when it is not. Rob F. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message