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 131266 - Wrong formatting when hint applied in switch statement
Summary: Wrong formatting when hint applied in switch statement
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-27 10:14 UTC by Jiri Prox
Modified: 2009-11-02 11:03 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 Jiri Prox 2008-03-27 10:14:53 UTC
Product Version: NetBeans IDE Dev (Build 20080326053408)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb)

Formatting is wrong when "Surround statement with try-catch" is applied in switch statement. Reformat code helps.

Steps to reproduce:
1) have a code:
    public void method() {
        int a = 0;        
        switch (a) {
            case 1:            
                FileReader fr = new FileReader("");
                    
        }
    }

2) apply hint
->
    public void method() {
        int a = 0;        
        switch (a) {
            case 1:            
        try {
            FileReader fr = new FileReader("");
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Beans.class.getName()).log(Level.SEVERE, null, ex);
        }
                    
        }
    }
Comment 1 Jan Becicka 2008-05-15 13:25:49 UTC
Max volunteered :)
Comment 2 Max Sauer 2008-11-24 14:43:54 UTC
Will be resolved LATER.
Comment 3 Quality Engineering 2009-11-02 11:03:01 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX