Community
Participate
Working Groups
Stable Build 20020214: In the following code the first catch (IllegalArgumentException) Block is always incorrectly formatted using the context menus Format as shown here: try { Object target = this.getClass().getDeclaredField(field).get(this); Class[] targetInterfaces = target.getClass().getInterfaces(); DelegateHandler delegate = new DelegateHandler(target); Object proxy = Proxy.newProxyInstance( RoleProxy.class.getClassLoader(), targetInterfaces, delegate); return proxy; } catch (IllegalArgumentException e) { } catch (SecurityException e) { } catch (IllegalAccessException e) { } catch (NoSuchFieldException e) { } Preferences Settings CodeFormatter (Status of checkboxes starting from the top): NewLines: Checked Checked Not checked Checked Checked Line splitting: 80 Style: Not checked Checked / Not checked 2 spaces per tab I cannot find a workaround. For me it's critical to use in production, but for others it will rather seem to be cosmetic.
Olivier - Can you please investigate a fix (if simple) ?
I reproduced the problem. I'll try to investigate a fix for it.
I am investigating a solution. The .class inside the code is responsible of the bad formatting. If you simply replace RoleProxy.class with RoleProxy, it works fine. The class literal seems to have a pretty bad side effect on the formatter.
Fixed and released in HEAD.
*** Bug 10749 has been marked as a duplicate of this bug. ***