Netbeans debugger goes to wrong line on else

From: Kyle Blaney (abbomb_at_hotmail.com)
Date: 11/10/04


Date: 10 Nov 2004 06:56:30 -0800

I am having a problem with Netbeans 3.6 on Windows 2000 machines. I
am using Netbeans to debug the following code:

156: LdapStatus ldapStatus = LdapUtils.loginAsAdministrator(
password );
157: if (ldapStatus == LdapStatus.LDAP_SUCCESS)
158: {
159: isPasswordCorrect = true;
160: }
161: else if (ldapStatus == LdapStatus.LDAP_BAD_CREDENTIALS)
162: {
163: isPasswordCorrect = false;
164: resourceKeyIfPasswordIncorrect = "BAD_CREDENTIALS_MESSAGE";
165: }
166: else
167: {
168: isPasswordCorrect = false;
169: resourceKeyIfPasswordIncorrect =
"FAILED_AUTHENTICATION_MESSAGE";
170: }

At line 157, ldapStatus is equal to LdapStatus.LDAP_SUCCESS so the
debugger jumps to line 159. After stepping over that line, the
debugger jumps to line 169, which makes no sense. I know line 169
does not actually execute based on running the code outside the
Netbeans debugger. The problem is specific to the Netbeans debugger.

This problem has been reproduced on two machines in my group. I have
even seen it on other if ... else if ... else blocks of code.

What is going on? Is this a known problem with the Netbeans debugger?

Kyle Blaney