From owner-freebsd-java Thu Mar 22 18:34: 2 2001 Delivered-To: freebsd-java@freebsd.org Received: from veldy.net (w028.z064001117.msp-mn.dsl.cnc.net [64.1.117.28]) by hub.freebsd.org (Postfix) with ESMTP id C183E37B71B for ; Thu, 22 Mar 2001 18:33:48 -0800 (PST) (envelope-from veldy@veldy.net) Received: from cascade (cascade.veldy.net [64.1.117.29]) by veldy.net (Postfix) with SMTP id ABDD6BA33; Thu, 22 Mar 2001 20:33:01 -0600 (CST) Message-ID: <005d01c0b341$5cedac20$1d750140@cascade> From: "Thomas T. Veldhouse" To: "Todd Enersen" Cc: References: <3ABA5AC3.CA8F09DD@fireclick.com> Subject: Re: possible bug in port of javac Date: Thu, 22 Mar 2001 20:31:27 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005A_01C0B30F.12363E40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_005A_01C0B30F.12363E40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable When you declare something final, aren't you supposed to supply an = initializer? I believe this is analgous to const int m_maxValuesPerName = =3D 10 in C++. private final int m_maxValuesPerName =3D 10;=20 I believe this is analgous to const int m_maxValuesPerName =3D 10; in = C++. Tom Veldhouse veldy@veldy.net ----- Original Message -----=20 From: Todd Enersen=20 To: freebsd-java@freebsd.org=20 Sent: Thursday, March 22, 2001 2:04 PM Subject: possible bug in port of javac Hello,=20 I'm trying to port one of our software packages to the FreeBSD = platform. It currently works on Win32, Solaris and Linux, and we have = customer who'd like to see it run on FreeBSD.=20 So, I've downloaded an built a version of the jdk from your = installation instructions. I believe that I have followed the = instructions to a "t". However the java compiler is choking on the = following code segment=20 private final int m_maxValuesPerName;=20 The compiler is complaining about:=20 Blank final variable 'm_maxValuesPerName' may not have been initialized. = It must be assigned a value in an initializer, or in every constructor. Even though the constructor assigns a value to the final variable.=20 I've tried adding a default constructor but that didn't fix the = problem.=20 The only solution so far has been to remove the "final" keyword from = the declaration.=20 Have you heard of this issue? Is there a solution?=20 Todd Enersen=20 =20 =20 ------=_NextPart_000_005A_01C0B30F.12363E40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
When you declare something final, = aren't you=20 supposed to supply an initializer? I believe this is analgous to const = int=20 m_maxValuesPerName =3D 10 in C++.
 
private final int m_maxValuesPerName =3D 10; =
 
I believe this is analgous to = const int=20 m_maxValuesPerName =3D 10; in C++.
 
Tom Veldhouse
veldy@veldy.net
----- Original Message -----
From:=20 Todd = Enersen=20
Sent: Thursday, March 22, 2001 = 2:04=20 PM
Subject: possible bug in port = of=20 javac

Hello,=20

I'm trying to port one of our software packages to the FreeBSD = platform. It=20 currently works on Win32, Solaris and Linux, and we have customer = who'd like=20 to see it run on FreeBSD.=20

So, I've downloaded an built a version of the jdk from your = installation=20 instructions. I believe that I have followed the instructions to a = "t". =20 However the java compiler is choking on the following code segment=20

private final int m_maxValuesPerName;=20

The compiler is complaining about:=20

Blank final variable =
'm_maxValuesPerName' may not have been initialized. It must  be =
assigned a value in an initializer, or in every =
constructor.


Even though the constructor assigns a value to the final = variable.=20

I've tried adding a default constructor but that didn't fix the = problem.=20

The only solution so far has been to remove the "final" keyword = from the=20 declaration.=20

Have you heard of this issue?  Is there a solution?=20

Todd Enersen
 
 

------=_NextPart_000_005A_01C0B30F.12363E40-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message