🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19994

Re: Bug Report

#19994
From: Greg Hamer
Date: Tue, 11 Nov 1997 00:00
91 lines
2612 bytes
Our compiler will not let you do it if the definintion is local to a
method - class scope works fine.

Andrew Bennett wrote:

> On Fri, 07 Nov 1997 16:49:28 -0800, Lyle Thompson
> <lylet@heliosoft.com> wrote:
>
> >There seems to be no place on the Borland web page to report
> >bugs. Hope this is where they go.
> >
> >JBuilder erroneously reports:
> >
> >Error: (108) variable <name> might not have been initialized.
>
> I can't replicate this.  Can you provide a small, complete example?
>
> I created an application from the wizards.  Added your code after the
> frame.setVisible(true); in Application1.java.  Moved the declaration
> of MyObject o; to the beginning of the class.
>
> I recreated a class from the Class wizard called MyObject.  Gave it a
> dispose() method.
>
> Compiled cleanly.  My code is below.
>
> ?
>
> JBuilder Pro.  Which version do you have?
>
> Application1.java :::
>
> package Tests.bugs;
>
> public class Application1 {
>   boolean packFrame = false;
>   MyObject o;
>
>   //Construct the application
>   public Application1() {
>     Frame1 frame = new Frame1();
>     //Pack frames that have useful preferred size info, e.g. from
> their layout
>     //Validate frames that have preset sizes
>     if (packFrame)
>       frame.pack();
>     else
>       frame.validate();
>     frame.setVisible(true);
>
>     {
>
>       try {
>         o = new MyObject();
>       }
>       catch (Exception e) {
>       }
>       finally {
>         if (o != null)
>           o.dispose();
>       }
>     }
>   }
>
>   //Main method
>   public static void main(String[] args) {
>     new Application1();
>   }
> }
>
> MyObject.java ::::
>
> package Tests.bugs;
>
> public class MyObject {
>
>   public MyObject() {
>   }
>
>   public void dispose() {
>   }
> }
>
> Andrew
> --
>   Andrew Bennett            ->  abennett@borland.com
>   JBuilder info             ->  http://www.borland.com/jbuilder/
>   JBuilder newsgroups info  ->  http://www.borland.com/newsgroups/
> **** Please don't post a reply AND send email.  Do one.  I'll see it.
> ****
Technical Details
Message-ID: <3468A9B7.157A07BC@borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3463B717.E9631810@heliosoft.com> <3467708f.242532473@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5179013adb8558bb
X-Google-Attributes: gidf74b3,public
From: Greg Hamer <ghamer@borland.com>
Subject: Re: Bug Report
Date: 1997/11/11
Message-ID: <3468A9B7.157A07BC@borland.com>
X-Deja-AN: 288693017
References: <3463B717.E9631810@heliosoft.com> <3467708f.242532473@forums.borland.com>
X-Priority: 3 (Normal)
Organization: None
Newsgroups: borland.public.jbuilder.java.language