[sip-comm-dev] [PATCH] Prevent NullPointerException in SIP FirstWizardPage#loadAccount


#1

The attached patched attempts to fix the problem described bellow.

Summary:
A NullPointerException is thrown in sipaccregwizz's
FirstWizardPage#loadAccount when attempting to view a
previously-created SIP account in Tools > Settings > Accounts.

Steps to reproduce:
1. Create a new SIP account which doesn't have text in the "Proxy
port" on the Advanced page of the SIP account registration wizard. I
do the following:
   1.1. go to "File > Add new account",
   1.2. select the SIP protocol from the table,
   1.3. click Next,
   1.4. type 1109@192.168.1.100 for the Username and the associated
password in the Password field,
   1.5. click the Advanced tab,
   1.6. check "Override server default options",
   1.7. delete 192.168.1.100 from the Proxy field,
   1.8. delete 5060 from the "Proxy port" field,
   1.9. click Next,
   1.10. click Add contact on the newly-displayed page.
2. Select Tools > Settings from the main menu.
3. Go on the Accounts page of the configuration dialog.
4. Click the Settings button of the account created in step #1.

What happens:
Nothing seems to happen in the UI and the log displays a stack trace
which begins with:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at net.java.sip.communicator.plugin.sipaccregwizz.FirstWizardPage.loadAccount(FirstWizardPage.java:573)
      at net.java.sip.communicator.plugin.sipaccregwizz.SIPAccountRegistrationWizard.loadAccount(SIPAccountRegistrationWizard.java:317)
      at net.java.sip.communicator.impl.gui.main.account.AccountRegWizardContainerImpl.modifyAccount(AccountRegWizardContainerImpl.java:194)
      at net.java.sip.communicator.impl.gui.main.account.AccountsConfigurationForm$AccountPanel.actionPerformed(AccountsConfigurationForm.java:335)

What is expected to happen:
The "Account Registration Wizard" dialog should appear and it should
be populated with the settings of the account created in step #1.

Prevent-NullPointerException-in-SIP-FirstWizardPage-loadAccount.patch (1.16 KB)


#2

Hey Lubo,

Applied committed and ack-ed!

Thanks
Emil

Lubomir Marinov написа:

···

The attached patched attempts to fix the problem described bellow.

Summary:
A NullPointerException is thrown in sipaccregwizz's
FirstWizardPage#loadAccount when attempting to view a
previously-created SIP account in Tools > Settings > Accounts.

Steps to reproduce:
1. Create a new SIP account which doesn't have text in the "Proxy
port" on the Advanced page of the SIP account registration wizard. I
do the following:
   1.1. go to "File > Add new account",
   1.2. select the SIP protocol from the table,
   1.3. click Next,
   1.4. type 1109@192.168.1.100 for the Username and the associated
password in the Password field,
   1.5. click the Advanced tab,
   1.6. check "Override server default options",
   1.7. delete 192.168.1.100 from the Proxy field,
   1.8. delete 5060 from the "Proxy port" field,
   1.9. click Next,
   1.10. click Add contact on the newly-displayed page.
2. Select Tools > Settings from the main menu.
3. Go on the Accounts page of the configuration dialog.
4. Click the Settings button of the account created in step #1.

What happens:
Nothing seems to happen in the UI and the log displays a stack trace
which begins with:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at net.java.sip.communicator.plugin.sipaccregwizz.FirstWizardPage.loadAccount(FirstWizardPage.java:573)
      at net.java.sip.communicator.plugin.sipaccregwizz.SIPAccountRegistrationWizard.loadAccount(SIPAccountRegistrationWizard.java:317)
      at net.java.sip.communicator.impl.gui.main.account.AccountRegWizardContainerImpl.modifyAccount(AccountRegWizardContainerImpl.java:194)
      at net.java.sip.communicator.impl.gui.main.account.AccountsConfigurationForm$AccountPanel.actionPerformed(AccountsConfigurationForm.java:335)

What is expected to happen:
The "Account Registration Wizard" dialog should appear and it should
be populated with the settings of the account created in step #1.

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net