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 121919 - [60cat] Surround with try/catch duplicates comment
Summary: [60cat] Surround with try/catch duplicates comment
Status: RESOLVED DUPLICATE of bug 124499
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 15:15 UTC by tboerkel
Modified: 2009-05-25 20:59 UTC (History)
0 users

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 tboerkel 2007-11-14 15:15:20 UTC
[ BUILD # : 200711060000 ]
[ JDK VERSION : 1.6.0_03 ]

Repro:
  public void test() {
    if(true) {
      throw new Exception();

    // Comment
    } else {
      System.out.println();
    }
  }


Now use hint in line with throw to surround with try/catch. Result:
  public void test() {
    if(true) {
      try {
        throw new Exception();

        // Comment
      } catch (Exception ex) {
        Logger.getLogger(Test1.class.getName()).log(Level.SEVERE,
null, ex);
      }

    // Comment
    } else {
      System.out.println();
    }
  }


Comment line is being duplicated!
Comment 1 Vitezslav Stejskal 2007-11-15 09:54:25 UTC
Still broken in 6.0RC1.
Comment 2 rost 2008-09-18 14:24:56 UTC
Still broken in 6.1 (with all updates available until today).
Comment 3 Alexei Mokeev 2009-04-10 11:11:36 UTC
Reproduced on 20090408 trunk.
Comment 4 Alexey Butenko 2009-05-18 09:43:19 UTC
Looks like duplicate of 120596
Comment 5 Max Sauer 2009-05-18 09:56:02 UTC
Looks like it is, thanks.

*** This issue has been marked as a duplicate of 124499 ***