This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 58034 - Line breakpoint customized after end of file does not work correctly
Summary: Line breakpoint customized after end of file does not work correctly
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 50656 66127 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-19 13:36 UTC by _ lcincura
Modified: 2005-12-20 13:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The NPE thrown when the breakpoint is customized after EOF. (3.49 KB, text/plain)
2005-11-11 13:44 UTC, Martin Entlicher
Details
The IOOBE thrown when the breakpoint is customized after EOF. (3.49 KB, text/plain)
2005-11-11 13:44 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ lcincura 2005-04-19 13:36:20 UTC
NetBeans IDE 4.2 [200504181800 on jdk 1.5.0_03

1, Create line breakpoint
2, Customize the breakpoint, set the line number to line bigger than file length
3, Debug the file => after debugger start the breakpoint line number is reverted to original line 
number, debugger stops on the original line, but the annotations are not correct (missing line 
brakpoint annotation)

IMHO correct behaviour would be to check the line number right after closing the customize dialog. If 
the line number would be bigger than length, breakpoint should not be customized and warning 
message in statur bar should be displayed.
Comment 1 _ lcincura 2005-04-21 13:49:27 UTC
*** Issue 50656 has been marked as a duplicate of this issue. ***
Comment 2 Martin Entlicher 2005-05-16 17:14:03 UTC
There's missing verification of whether the break point has sense or not.
Comment 3 _ lcincura 2005-10-06 14:26:30 UTC
*** Issue 66127 has been marked as a duplicate of this issue. ***
Comment 4 _ lcincura 2005-10-06 14:26:44 UTC
When negative value is entered, a warning message is shown with text: 'Line
number should be specified' which apparently is not the correct message.
Comment 5 Martin Entlicher 2005-11-11 13:37:27 UTC
Why it's not correct? Negative value is not a line number. Or you do have a
negative line number in your source file? :-)
Comment 6 Martin Entlicher 2005-11-11 13:41:21 UTC
I've got java.lang.IndexOutOfBoundsException while reproducing this...
Comment 7 Martin Entlicher 2005-11-11 13:44:39 UTC
Created attachment 26861 [details]
The NPE thrown when the breakpoint is customized after EOF.
Comment 8 Martin Entlicher 2005-11-11 13:44:51 UTC
Created attachment 26862 [details]
The IOOBE thrown when the breakpoint is customized after EOF.
Comment 9 Martin Entlicher 2005-11-11 16:11:15 UTC
The validation logic in the line breakpoint customizer improved.
Also the message is displayed *before* the customizer is closed.

/cvs/debuggerjpda/ui/nbproject/project.xml,v  <--  project.xml
new revision: 1.12; previous revision: 1.11

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.15; previous revision: 1.14

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.java,v
 <--  LineBreakpointPanel.java
new revision: 1.9; previous revision: 1.8

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsActionsProvider.java,v
 <--  BreakpointsActionsProvider.java
new revision: 1.14; previous revision: 1.13

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.28; previous revision: 1.27

/cvs/debuggerjpda/ant/src/org/netbeans/modules/debugger/projects/EditorContextImpl.java,v
 <--  EditorContextImpl.java
new revision: 1.21; previous revision: 1.20
Comment 10 _ lcincura 2005-12-20 13:07:14 UTC
Verified in 200512181900