Bug 29473 - wrong formatting of if...try... catch... else
Summary: wrong formatting of if...try... catch... else
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 15:03 EST by Rafael Chaves CLA
Modified: 2003-11-20 11:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2003-01-14 15:03:37 EST
Version: 2.1
Build id: 200301140800

Code formatter is formatting:

int bogus(int a) {
    if (a > 1)
        try {
            a = 1;
        } finally {
    } else
        a = 0;
    return a;
}

as:

int bogus(int a) {
    if (a > 1)
        try {
            a = 1;
        } finally {
        } else
	a = 0;
    return a;
}
Comment 1 Olivier Thomann CLA 2003-01-15 13:30:49 EST
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new 
implementation is still in progress. Therefore we cannot include it for 2.1. 
Not enough testing and we need to polish the preferences. This will be address 
for 2.2 as stated in the JDT/Core plan.
Comment 2 Philipe Mulet CLA 2003-06-12 06:35:44 EDT
Resurrecting for 3.0
Comment 3 Philipe Mulet CLA 2003-10-30 04:33:36 EST
does it work now ?
Comment 4 Olivier Thomann CLA 2003-10-30 08:35:37 EST
With the new formatter, we have:
int bogus(int a) {
	if (a > 1)
		try {
			a = 1;
		} finally {
		}
	else
		a = 0;
	return a;
}
Fixed.
Regression test added.
Comment 5 David Audel CLA 2003-11-20 11:04:10 EST
Verified.