[Bug 225646] New: Surround with try generates wrong code

  • From:
  • To:
  • Subject: [Bug 225646] New: Surround with try generates wrong code
  • Date: Fri, 01 Feb 2013 17:26:35 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=225646

             Bug #: 225646
        Issue Type: DEFECT
           Summary: Surround with try generates wrong code
    Classification: Unclassified
           Product: editor
           Version: 7.3
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Priority: P3
         Component: Refactoring
        AssignedTo: 

        ReportedBy: 

         QAContact: 



When I surround a single line and select the "surround with try" I get wrong
uncompilable code:

have this line: List<CatalogStats> catalogStats =
platformService.getCatalogStats(Arrays.asList(ids));
-select it (e.g. triple click)
-select "surround with try {..." hint from the left hand light bulb

result:
        List<CatalogStats> catalogStats =
platformService.getCatalogStats(Arrays.asList(ids));
        List<CatalogStats> catalogStats = null;
        try {
            ogStats > catalogStats =
platformService.getCatalogStats(Arrays.asList(ids));
        } catch (Exception e) {
        }
the surrounded variable is declared two and a half men (I mean, times :-)),
being the one inside the try{} block with partial type before.

Product Version = NetBeans IDE 7.3 RC1 (Build 201301240957)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_11
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


[Bug 225646] New: Surround with try generates wrong code

alied 02/01/2013

[Bug 225646] Surround with try generates wrong code

alied 02/01/2013

[Bug 225646] Surround with try generates wrong code

ralphbenjamin 02/04/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close