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 6568 - PropertyEditor doesn`t work properly with JavaDoc comment in guarded blocks.
Summary: PropertyEditor doesn`t work properly with JavaDoc comment in guarded blocks.
Status: CLOSED DUPLICATE of bug 7700
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-05-09 17:25 UTC by Jan Becicka
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2000-05-09 17:25:04 UTC
1. Create JFrame
2. Modify code this way (stupid way.This comment has no sense):
.
.
.
   /**
    private void exitForm(java.awt.event.WindowEvent evt) {
        System.exit (0);
    }
   */
    public static void main (String args[]) {
        new Visual ().show ();
    }
.
.
note: Comment body is in guarded block

3. Using PropertySheet Edit JavaDoc comment. Click OK button. You will see Error: Attempt to modify guarded block. It is correct, but look at code. You will see this:

   //** private void exitForm(java.awt.event.WindowEvent evt) {
     * System.exit (0);
     * }
     */**
    private void exitForm(java.awt.event.WindowEvent evt) {
        System.exit (0);
    }
   */
    public static void main (String args[]) {
        new Visual ().show ();
    }
Comment 1 Marek Grummich 2000-07-25 09:09:59 UTC
Priority is changed to P4 (normal).
Comment 2 Svata Dedic 2000-09-21 12:58:59 UTC
It seems that the bug is in Editor's rollback after it throws
BadLocationException. Java module calls PositionBounds.setText() on the text
region; the BadLocationException is thrown, but the changes are not rolled back
as appropriate.
Comment 3 Jan Lahoda 2001-01-24 15:29:59 UTC
Only changed version to Development.
Comment 4 Jan Chalupa 2001-03-12 10:35:35 UTC
Version: 'Dev' -> 3.2
Comment 5 David Konecny 2001-04-11 12:07:33 UTC
This is duplicate of issue http://www.netbeans.org/issues/show_bug.cgi?id=7700 
which was already fixed. In mentioned issue, the CRLF in comment caused that 
characters AFTER the end of comment were modified (means deleted). And in this 
case it means that guarded section was incorrectly modified.

*** This issue has been marked as a duplicate of 7700 ***
Comment 6 Quality Engineering 2003-07-01 13:11:30 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 7 Quality Engineering 2003-07-01 13:15:28 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.