Closed Bug 300464 Opened 19 years ago Closed 19 years ago

If no servers are register, a NullPointerException prevents normal operation

Categories

(Grendel Graveyard :: User Interface, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: himicos, Assigned: rjkeller)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: 

If a user deletes all servers from the Servers dialog (Tools->Servers), then a
NullPointerException occurs:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at grendel.view.ViewedStoreBase.<init>(ViewedStoreBase.java:80)
        at grendel.ui.StoreFactory.createStore(StoreFactory.java:145)
        at grendel.ui.StoreFactory.updateStores(StoreFactory.java:174)
        at grendel.ui.StoreFactory.refreshStores(StoreFactory.java:179)
...

If the application is forced to exit (killed, since the dialog does not exit),
then it won't restart, unless the preferences directory is unlinked (~/.grendel)
If executed as-is (without deleting the dir), the exception thrown is:

Exception in thread "main" java.lang.NullPointerException
        at grendel.view.ViewedStoreBase.<init>(ViewedStoreBase.java:80)
        at grendel.ui.StoreFactory.createStore(StoreFactory.java:145)
        at grendel.ui.StoreFactory.updateStores(StoreFactory.java:174)
        at grendel.ui.StoreFactory.getStores(StoreFactory.java:90)
        at grendel.ui.MasterPanel.<init>(MasterPanel.java:203)
...

Reproducible: Always

Steps to Reproduce:
1. Start Grendel
2. Delete all servers from the Tools->Servers dialog, with the Delete button
3. Press OK. If launched from a console, the exception will be visible. In the
GUI, the dialog won't exit, unless the window is closed. After exiting, the
application will hang at the splash screen



Expected Results:  
Normally, the app should close the dialog and inform the user if she tries to
use a server, if none exists. In code, the line where the exception happens
should be checked for nulls.
Attached patch patch β€” β€” Splinter Review
Fix checked in. Also checked in the ant fix you emailed me.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: